Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 21, 2008, 1:33:42 AM (16 years ago)
Author:
landauf
Message:

big commit, but not much changes in code:

  • put CommandEvaluation into it's own .cc and .h files
  • put some basic ConsoleCommands into ConsoleCommandCompilation.cc and .h
  • created a new class, ConsoleCommand, inheriting from ExecutorStatic, implementing all command-related features that were located in the Executor until now (at the moment only accessLevel_, but more will come - from reto and me)
  • renamed ConsoleCommand-macros to SetConsoleCommand (all related macros were changed the same way)
  • added a new command named "killdelays", that kills all delayed commands. helpful to stop disco ;)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/console/src/core/Identifier.h

    r1313 r1341  
    176176
    177177            /** @brief Returns the map that stores all console commands. @return The const_iterator */
    178             inline const std::map<std::string, ExecutorStatic*>& getConsoleCommandMap() const { return this->consoleCommands_; }
     178            inline const std::map<std::string, ConsoleCommand*>& getConsoleCommandMap() const { return this->consoleCommands_; }
    179179            /** @brief Returns a const_iterator to the beginning of the map that stores all console commands. @return The const_iterator */
    180             inline std::map<std::string, ExecutorStatic*>::const_iterator getConsoleCommandMapBegin() const { return this->consoleCommands_.begin(); }
     180            inline std::map<std::string, ConsoleCommand*>::const_iterator getConsoleCommandMapBegin() const { return this->consoleCommands_.begin(); }
    181181            /** @brief Returns a const_iterator to the end of the map that stores all console commands. @return The const_iterator */
    182             inline std::map<std::string, ExecutorStatic*>::const_iterator getConsoleCommandMapEnd() const { return this->consoleCommands_.end(); }
     182            inline std::map<std::string, ConsoleCommand*>::const_iterator getConsoleCommandMapEnd() const { return this->consoleCommands_.end(); }
    183183
    184184            /** @brief Returns the map that stores all console commands with their names in lowercase. @return The const_iterator */
    185             inline const std::map<std::string, ExecutorStatic*>& getLowercaseConsoleCommandMap() const { return this->consoleCommands_LC_; }
     185            inline const std::map<std::string, ConsoleCommand*>& getLowercaseConsoleCommandMap() const { return this->consoleCommands_LC_; }
    186186            /** @brief Returns a const_iterator to the beginning of the map that stores all console commands with their names in lowercase. @return The const_iterator */
    187             inline std::map<std::string, ExecutorStatic*>::const_iterator getLowercaseConsoleCommandMapBegin() const { return this->consoleCommands_LC_.begin(); }
     187            inline std::map<std::string, ConsoleCommand*>::const_iterator getLowercaseConsoleCommandMapBegin() const { return this->consoleCommands_LC_.begin(); }
    188188            /** @brief Returns a const_iterator to the end of the map that stores all console commands with their names in lowercase. @return The const_iterator */
    189             inline std::map<std::string, ExecutorStatic*>::const_iterator getLowercaseConsoleCommandMapEnd() const { return this->consoleCommands_LC_.end(); }
     189            inline std::map<std::string, ConsoleCommand*>::const_iterator getLowercaseConsoleCommandMapEnd() const { return this->consoleCommands_LC_.end(); }
    190190
    191191
     
    214214            virtual XMLPortObjectContainer* getXMLPortObjectContainer(const std::string& sectionname) = 0;
    215215
    216             ExecutorStatic& addConsoleCommand(ExecutorStatic* executor, bool bCreateShortcut);
    217             ExecutorStatic* getConsoleCommand(const std::string& name) const;
    218             ExecutorStatic* getLowercaseConsoleCommand(const std::string& name) const;
     216            ConsoleCommand& addConsoleCommand(ConsoleCommand* command, bool bCreateShortcut);
     217            ConsoleCommand* getConsoleCommand(const std::string& name) const;
     218            ConsoleCommand* getLowercaseConsoleCommand(const std::string& name) const;
    219219
    220220        protected:
     
    271271
    272272            bool bHasConsoleCommands_;                                     //!< True if this class has at least one assigned console command
    273             std::map<std::string, ExecutorStatic*> consoleCommands_;       //!< All console commands of this class
    274             std::map<std::string, ExecutorStatic*> consoleCommands_LC_;    //!< All console commands of this class with their names in lowercase
     273            std::map<std::string, ConsoleCommand*> consoleCommands_;       //!< All console commands of this class
     274            std::map<std::string, ConsoleCommand*> consoleCommands_LC_;    //!< All console commands of this class with their names in lowercase
    275275    };
    276276
Note: See TracChangeset for help on using the changeset viewer.