Changeset 10354 for code/branches/core7/src/libraries/core
- Timestamp:
- Apr 11, 2015, 10:36:15 PM (10 years ago)
- Location:
- code/branches/core7/src/libraries/core/command
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core7/src/libraries/core/command/ConsoleCommandIncludes.cc
r10352 r10354 35 35 void StaticallyInitializedConsoleCommand::load() 36 36 { 37 for (size_t i = 0; i < this->command_->getNames().size(); ++i) 38 { 39 const ConsoleCommand::CommandName& name = this->command_->getNames()[i]; 40 ConsoleCommandManager::registerCommand(name.group_, name.name_, this->command_); 41 } 37 ConsoleCommandManager::registerCommand(this->command_); 42 38 } 43 39 } -
code/branches/core7/src/libraries/core/command/ConsoleCommandManager.cc
r10346 r10354 118 118 static std::map<std::string, std::map<std::string, ConsoleCommand*> > commandMapLC; 119 119 return commandMapLC; 120 } 121 122 /** 123 @brief Registers a new command with the groups and names that are defined by ConsoleCommand::getNames(). 124 */ 125 /* static */ void ConsoleCommandManager::registerCommand(ConsoleCommand* command) 126 { 127 for (size_t i = 0; i < command->getNames().size(); ++i) 128 { 129 const ConsoleCommand::CommandName& name = command->getNames()[i]; 130 ConsoleCommandManager::registerCommand(name.group_, name.name_, command); 131 } 120 132 } 121 133 -
code/branches/core7/src/libraries/core/command/ConsoleCommandManager.h
r10346 r10354 45 45 { 46 46 public: 47 static void registerCommand(ConsoleCommand* command); 47 48 static void registerCommand(const std::string& group, const std::string& name, ConsoleCommand* command); 48 49 static void unregisterCommand(ConsoleCommand* command);
Note: See TracChangeset
for help on using the changeset viewer.