Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 5, 2015, 8:25:11 PM (9 years ago)
Author:
landauf
Message:

moved static contents from ConsoleCommand to ConsoleCommandManager

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core7/src/libraries/core/command/ConsoleCommand.h

    r9983 r10346  
    226226#include "ArgumentCompletionFunctions.h"
    227227#include "Executor.h"
     228#include "ConsoleCommandManager.h"
    228229
    229230
     
    655656            LanguageEntryLabel descriptionReturnvalue_;                     ///< A description of the return-value
    656657            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 exist
    667             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 exist
    670             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);
    684658    };
    685659
     
    711685    */
    712686    inline ConsoleCommand::ConsoleCommandManipulator ModifyConsoleCommand(const std::string& name)
    713         { return ConsoleCommand::getCommand(name, true); }
     687        { return ConsoleCommandManager::getCommand(name, true); }
    714688    /**
    715689        @brief Returns a manipulator for a command with the given group and name.
     
    720694    */
    721695    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); }
    723697}
    724698
Note: See TracChangeset for help on using the changeset viewer.