Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 17, 2016, 10:29:21 PM (8 years ago)
Author:
landauf
Message:

merged branch cpp11_v3 back to trunk

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/libraries/core/command/ConsoleCommand.h

    r10624 r11071  
    6060    }
    6161
    62     namespace AccessLevel
     62    /**
     63        @brief Possible access levels: A command can only be executed if the program is in the state which is requested by the access level.
     64    */
     65    enum class AccessLevel
    6366    {
    64         /**
    65             @brief Possible access levels: A command can only be executed if the program is in the state which is requested by the access level.
    66         */
    67         enum Enum
    68         {
    69             All,
    70             Standalone,
    71             Master,
    72             Server,
    73             Client,
    74             Online,
    75             Offline,
    76             None
    77         };
    78     }
     67        All,
     68        Standalone,
     69        Master,
     70        Server,
     71        Client,
     72        Online,
     73        Offline,
     74        None
     75    };
    7976
    8077    /**
     
    195192                        { if (this->command_) { this->command_->popFunction(); } return *this; }
    196193
    197                     /// Sets the current function-pointer to NULL, which also deactivates the command.
     194                    /// Sets the current function-pointer to nullptr, which also deactivates the command.
    198195                    inline ConsoleCommandManipulator& resetFunction()
    199196                        { if (this->command_) { this->command_->resetFunction(); } return *this; }
     
    205202                    inline ConsoleCommandManipulator& pushObject(void* object)
    206203                        { if (this->command_) { this->command_->pushObject(object); } return *this; }
    207                     /// Removes the current object from the object-stack and restores the old object (or NULL if there's no object left on the stack).
     204                    /// Removes the current object from the object-stack and restores the old object (or nullptr if there's no object left on the stack).
    208205                    inline ConsoleCommandManipulator& popObject()
    209206                        { if (this->command_) { this->command_->popObject(); } return *this; }
     
    249246
    250247                    /// Changes the access level of the command.
    251                     inline ConsoleCommandManipulator& accessLevel(AccessLevel::Enum level)
     248                    inline ConsoleCommandManipulator& accessLevel(AccessLevel level)
    252249                        { if (this->command_) { this->command_->accessLevel(level); } return *this; }
    253250
     
    332329
    333330            /// Changes the access level of the command.
    334             inline ConsoleCommand& accessLevel(AccessLevel::Enum level)
     331            inline ConsoleCommand& accessLevel(AccessLevel level)
    335332                { this->accessLevel_ = level; return *this; }
    336333            /// Returns the access level of the command.
    337             inline AccessLevel::Enum getAccessLevel() const
     334            inline AccessLevel getAccessLevel() const
    338335                { return this->accessLevel_; }
    339336
     
    394391            bool bActive_;                                                  ///< True if the command should be active (it can still be inactive, for example if the function is missing)
    395392            bool bHidden_;                                                  ///< True if the command is hidden (it is still executable, but not visible in the list of available commands)
    396             AccessLevel::Enum accessLevel_;                                 ///< The access level (the state of the game in which you can access the command)
     393            AccessLevel accessLevel_;                                       ///< The access level (the state of the game in which you can access the command)
    397394            std::string baseName_;                                          ///< The name that was first assigned to the command
    398395            std::vector<CommandName> names_;                                ///< All names and aliases of this command
Note: See TracChangeset for help on using the changeset viewer.