- Timestamp:
- Apr 5, 2015, 8:25:11 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core7/src/libraries/core/command/ConsoleCommand.h
r9983 r10346 226 226 #include "ArgumentCompletionFunctions.h" 227 227 #include "Executor.h" 228 #include "ConsoleCommandManager.h" 228 229 229 230 … … 655 656 LanguageEntryLabel descriptionReturnvalue_; ///< A description of the return-value 656 657 LanguageEntryLabel descriptionParam_[MAX_FUNCTOR_ARGUMENTS]; ///< A description for each argument 657 658 public:659 /// Returns the map with all groups and commands.660 static inline const std::map<std::string, std::map<std::string, ConsoleCommand*> >& getCommands()661 { return ConsoleCommand::getCommandMap(); }662 /// Returns the map with all groups and commands in lowercase.663 static inline const std::map<std::string, std::map<std::string, ConsoleCommand*> >& getCommandsLC()664 { return ConsoleCommand::getCommandMapLC(); }665 666 /// Returns a command (shortcut) with given name. @param name The name of the command shortcut @param bPrintError If true, an error is printed if the command doesn't exist667 static inline ConsoleCommand* getCommand(const std::string& name, bool bPrintError = false)668 { return ConsoleCommand::getCommand("", name, bPrintError); }669 /// Returns a command (shortcut) with given name in lowercase. @param name The lowercase name of the command shortcut @param bPrintError If true, an error is printed if the command doesn't exist670 static inline ConsoleCommand* getCommandLC(const std::string& name, bool bPrintError = false)671 { return ConsoleCommand::getCommandLC("", name, bPrintError); }672 673 static ConsoleCommand* getCommand(const std::string& group, const std::string& name, bool bPrintError = false);674 static ConsoleCommand* getCommandLC(const std::string& group, const std::string& name, bool bPrintError = false);675 676 static void destroyAll();677 678 private:679 static std::map<std::string, std::map<std::string, ConsoleCommand*> >& getCommandMap();680 static std::map<std::string, std::map<std::string, ConsoleCommand*> >& getCommandMapLC();681 682 static void registerCommand(const std::string& group, const std::string& name, ConsoleCommand* command);683 static void unregisterCommand(ConsoleCommand* command);684 658 }; 685 659 … … 711 685 */ 712 686 inline ConsoleCommand::ConsoleCommandManipulator ModifyConsoleCommand(const std::string& name) 713 { return ConsoleCommand ::getCommand(name, true); }687 { return ConsoleCommandManager::getCommand(name, true); } 714 688 /** 715 689 @brief Returns a manipulator for a command with the given group and name. … … 720 694 */ 721 695 inline ConsoleCommand::ConsoleCommandManipulator ModifyConsoleCommand(const std::string& group, const std::string& name) 722 { return ConsoleCommand ::getCommand(group, name, true); }696 { return ConsoleCommandManager::getCommand(group, name, true); } 723 697 } 724 698
Note: See TracChangeset
for help on using the changeset viewer.