Changeset 9777 in orxonox.OLD for branches/new_class_id/src/lib/shell
- Timestamp:
- Sep 20, 2006, 9:49:13 AM (18 years ago)
- Location:
- branches/new_class_id/src/lib/shell
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/new_class_id/src/lib/shell/shell_command.cc
r9734 r9777 300 300 if (sc != NULL) 301 301 { 302 for(std::vector<BaseObject*>::const_iterator bo = boList.begin(); bo != boList.end(); ++bo) 303 { 304 PRINT(0)("Command '%s' on '%s::%s'\n", sc->getCName(), (*bo)->getClassCName(), (*bo)->getCName()); 305 (*sc->executor)((*bo), inputSplits.subSet(paramBegin)); 306 } 302 303 if(sc->executor->getType() == Executor<const SubString>::FunctionStatic ) 304 { 305 PRINT(0)("Static Command '%s' of Class '%s' with parameters\n", sc->getCName(), sc->shellClass->getCName()); 306 (*sc->executor)(NULL, inputSplits.subSet(paramBegin)); 307 } 308 else 309 for(std::vector<BaseObject*>::const_iterator bo = boList.begin(); bo != boList.end(); ++bo) 310 { 311 PRINT(0)("Command '%s' on '%s::%s'\n", sc->getCName(), (*bo)->getClassCName(), (*bo)->getCName()); 312 (*sc->executor)((*bo), inputSplits.subSet(paramBegin)); 313 } 307 314 return true; 308 315 } … … 377 384 else 378 385 { 379 // if(this->completors[parameter] == NULL)380 // delete this->completors[parameter];381 // this->completors[parameter] = completorPlugin.clone();386 // if(this->completors[parameter] == NULL) 387 // delete this->completors[parameter]; 388 // this->completors[parameter] = completorPlugin.clone(); 382 389 } 383 390 return this; -
branches/new_class_id/src/lib/shell/shell_command.h
r9769 r9777 56 56 */ 57 57 #define SHELL_COMMAND_STATIC(command, class, function) \ 58 OrxShell::ShellCommand* shell_command_##class##_##command = OrxShell::ShellCommand::registerCommand(#command, #class, createExecutor<class, BaseObject>( function))58 OrxShell::ShellCommand* shell_command_##class##_##command = OrxShell::ShellCommand::registerCommand(#command, #class, createExecutor<class, BaseObject>(&class::function)) 59 59 60 60 -
branches/new_class_id/src/lib/shell/some_shell_commands.cc
r9721 r9777 29 29 30 30 #include "network_game_rules.h" 31 31 SHELL_COMMAND(say, NetworkGameRules, shellSay)->setAlias("say"); 32 32 33 33 #include "player_stats.h" 34 34 SHELL_COMMAND(nick, PlayerStats, shellNick)->setAlias("nick"); 35 35 36 36 // #include "class_list.h" … … 40 40 41 41 #include "p_node.h" 42 43 42 SHELL_COMMAND(debugNode, PNode, debugNode); 43 SHELL_COMMAND(setPosition, PNode, setAbsCoor); 44 44 45 45 #include "render_2d.h" 46 46 SHELL_COMMAND(toggleNodeVisibility, Render2D, toggleNodesVisibility); 47 47 48 48 49 49 #include "material.h" 50 51 52 50 SHELL_COMMAND(setDiffuseTexture, Material, setDiffuseMap) 51 ->defaultValues(MT_NULL, (int)GL_TEXTURE_2D) 52 ->completionPlugin(0, CompletorFileSystem()); 53 53 54 54 #include "loading/resource_manager.h" 55 55 SHELL_COMMAND(debug, ResourceManager, debug); 56 #include "loading/load_param_class_description.h" 57 OrxShell::ShellCommand* shell_command_LPCD_printAll = 58 OrxShell::ShellCommand::registerCommand("printAll", "LoadParamClassDescription", 59 new Executor2_static<LoadParamClassDescription, const SubString, const std::string&, bool>(&LoadParamClassDescription::printAll)) 60 //SHELL_COMMAND_STATIC(print, LoadParamClassDescription, printAll) 61 ->defaultValues(MT_NULL, true);
Note: See TracChangeset
for help on using the changeset viewer.