Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

wrap ConsoleCommands in StaticallyInitializedInstances

File:
1 edited

Legend:

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

    r10348 r10352  
    104104
    105105        public:
     106            /**
     107             * @brief Defines the name of a command, consisting of an optional group ("" means no group) and the name itself.
     108             */
     109            struct CommandName
     110            {
     111                CommandName(const std::string& group, const std::string& name) : group_(group), name_(name) {}
     112                std::string group_;
     113                std::string name_;
     114            };
     115
    106116            /**
    107117                @brief Helper class that is used to manipulate console commands.
     
    360370                { return this; }
    361371
     372            inline const std::vector<CommandName>& getNames()
     373                { return this->names_; }
     374
    362375        private:
    363376            void init(const std::string& group, const std::string& name, const ExecutorPtr& executor, bool bInitialized);
     
    383396            AccessLevel::Enum accessLevel_;                                 ///< The access level (the state of the game in which you can access the command)
    384397            std::string baseName_;                                          ///< The name that was first assigned to the command
     398            std::vector<CommandName> names_;                                ///< All names and aliases of this command
    385399            FunctorPtr baseFunctor_;                                        ///< The functor that defines the header of the command-function
    386400
Note: See TracChangeset for help on using the changeset viewer.