Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 30, 2009, 3:14:45 PM (15 years ago)
Author:
rgrieder
Message:

Unified enumeration layout according to the style guide (which I have edited recently ;)).
There is one exception though: XMLPort::Mode. Since that would involve 182 changed files, I have decided not to rename it for now. Moreover its syntax is not too bad ;)

Location:
code/branches/core4/src/core
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core4/src/core/CommandEvaluation.cc

    r3250 r3257  
    3939    {
    4040        this->initialize("");
    41         this->state_ = CS_Uninitialized;
     41        this->state_ = CommandState::Uninitialized;
    4242    }
    4343
     
    6464
    6565        this->errorMessage_ = "";
    66         this->state_ = CS_Empty;
     66        this->state_ = CommandState::Empty;
    6767    }
    6868
     
    104104            switch (this->state_)
    105105            {
    106                 case CS_Uninitialized:
    107                     break;
    108                 case CS_Empty:
    109                     break;
    110                 case CS_ShortcutOrIdentifier:
     106                case CommandState::Uninitialized:
     107                    break;
     108                case CommandState::Empty:
     109                    break;
     110                case CommandState::ShortcutOrIdentifier:
    111111                    if (this->function_)
    112112                    {
     
    119119                        return (this->command_ = this->functionclass_->getName() + " ");
    120120                    break;
    121                 case CS_Function:
     121                case CommandState::Function:
    122122                    if (this->function_)
    123123                    {
     
    128128                    }
    129129                    break;
    130                 case CS_ParamPreparation:
    131                 case CS_Params:
     130                case CommandState::ParamPreparation:
     131                case CommandState::Params:
    132132                {
    133133                    if (this->argument_ == "" && this->possibleArgument_ == "")
     
    149149                    break;
    150150                }
    151                 case CS_Finished:
    152                     break;
    153                 case CS_Error:
     151                case CommandState::Finished:
     152                    break;
     153                case CommandState::Error:
    154154                    break;
    155155            }
     
    163163        switch (this->state_)
    164164        {
    165             case CS_Uninitialized:
    166                 break;
    167             case CS_Empty:
    168             case CS_ShortcutOrIdentifier:
     165            case CommandState::Uninitialized:
     166                break;
     167            case CommandState::Empty:
     168            case CommandState::ShortcutOrIdentifier:
    169169                if (this->listOfPossibleFunctions_.size() == 0)
    170170                    return CommandEvaluation::dump(this->listOfPossibleIdentifiers_);
     
    174174                    return (CommandEvaluation::dump(this->listOfPossibleFunctions_) + "\n" + CommandEvaluation::dump(this->listOfPossibleIdentifiers_));
    175175                break;
    176             case CS_Function:
     176            case CommandState::Function:
    177177                return CommandEvaluation::dump(this->listOfPossibleFunctions_);
    178178                break;
    179             case CS_ParamPreparation:
    180             case CS_Params:
     179            case CommandState::ParamPreparation:
     180            case CommandState::Params:
    181181                if (this->listOfPossibleArguments_.size() > 0)
    182182                    return CommandEvaluation::dump(this->listOfPossibleArguments_);
    183183                else
    184184                    return CommandEvaluation::dump(this->function_);
    185             case CS_Finished:
     185            case CommandState::Finished:
    186186                if (this->function_)
    187187                    return CommandEvaluation::dump(this->function_);
    188188                break;
    189             case CS_Error:
     189            case CommandState::Error:
    190190                return this->errorMessage_;
    191191                break;
     
    200200
    201201        for (unsigned int i = 0; i < MAX_FUNCTOR_ARGUMENTS; i++)
    202             this->param_[i] = MT_null;
     202            this->param_[i] = MT_Type::Null;
    203203
    204204        if (!this->isValid())
     
    230230            return this->param_[index];
    231231
    232         return MT_null;
     232        return MT_Type::Null;
    233233    }
    234234
     
    238238            return this->function_->hasReturnvalue();
    239239
    240         return MT_null;
     240        return MT_Type::Null;
    241241    }
    242242
  • code/branches/core4/src/core/CommandEvaluation.h

    r1747 r3257  
    4141namespace orxonox
    4242{
    43     enum CommandState
     43    namespace CommandState
    4444    {
    45         CS_Uninitialized,
    46         CS_Empty,
    47         CS_ShortcutOrIdentifier,
    48         CS_Function,
    49         CS_ParamPreparation,
    50         CS_Params,
    51         CS_Finished,
    52         CS_Error
    53     };
     45        enum Value
     46        {
     47            Uninitialized,
     48            Empty,
     49            ShortcutOrIdentifier,
     50            Function,
     51            ParamPreparation,
     52            Params,
     53            Finished,
     54            Error
     55        };
     56    }
    5457
    5558    class _CoreExport CommandEvaluation
     
    112115
    113116            std::string errorMessage_;
    114             CommandState state_;
     117            CommandState::Value state_;
    115118
    116119            bool bEvaluatedParams_;
  • code/branches/core4/src/core/CommandExecutor.cc

    r3250 r3257  
    141141    void CommandExecutor::parseIfNeeded(const std::string& command)
    142142    {
    143         if (CommandExecutor::getEvaluation().state_ == CS_Uninitialized)
     143        if (CommandExecutor::getEvaluation().state_ == CommandState::Uninitialized)
    144144        {
    145145            CommandExecutor::parse(command);
     
    169169        switch (CommandExecutor::getEvaluation().state_)
    170170        {
    171             case CS_Uninitialized:
     171            case CommandState::Uninitialized:
    172172            {
    173173                // Impossible
    174174                break;
    175175            }
    176             case CS_Empty:
     176            case CommandState::Empty:
    177177            {
    178178                if (CommandExecutor::argumentsGiven() == 0)
     
    184184                else
    185185                {
    186                     CommandExecutor::getEvaluation().state_ = CS_ShortcutOrIdentifier;
     186                    CommandExecutor::getEvaluation().state_ = CommandState::ShortcutOrIdentifier;
    187187                    // Move on to next case
    188188                }
    189189            }
    190             case CS_ShortcutOrIdentifier:
     190            case CommandState::ShortcutOrIdentifier:
    191191            {
    192192                if (CommandExecutor::argumentsGiven() > 1)
     
    199199                    {
    200200                        // It's a shortcut
    201                         CommandExecutor::getEvaluation().state_ = CS_ParamPreparation;
     201                        CommandExecutor::getEvaluation().state_ = CommandState::ParamPreparation;
    202202                        CommandExecutor::getEvaluation().functionclass_ = 0;
    203203                        // Move on to next case
     
    206206                    {
    207207                        // It's a functionname
    208                         CommandExecutor::getEvaluation().state_ = CS_Function;
     208                        CommandExecutor::getEvaluation().state_ = CommandState::Function;
    209209                        CommandExecutor::getEvaluation().function_ = 0;
    210210                        // Move on to next case
     
    213213                    {
    214214                        // The first argument is bad
    215                         CommandExecutor::getEvaluation().state_ = CS_Error;
     215                        CommandExecutor::getEvaluation().state_ = CommandState::Error;
    216216                        AddLanguageEntry("commandexecutorunknownfirstargument", "is not a shortcut nor a classname");
    217217                        CommandExecutor::getEvaluation().errorMessage_ = "Error: " + CommandExecutor::getArgument(0) + " " + GetLocalisation("commandexecutorunknownfirstargument") + ".";
     
    238238                            CommandExecutor::getEvaluation().bCommandChanged_ = true;
    239239                        }
    240                         CommandExecutor::getEvaluation().state_ = CS_ParamPreparation;
     240                        CommandExecutor::getEvaluation().state_ = CommandState::ParamPreparation;
    241241                        CommandExecutor::getEvaluation().functionclass_ = 0;
    242242                        CommandExecutor::getEvaluation().command_ = CommandExecutor::getEvaluation().function_->getName();
     
    258258                            CommandExecutor::getEvaluation().bCommandChanged_ = true;
    259259                        }
    260                         CommandExecutor::getEvaluation().state_ = CS_Function;
     260                        CommandExecutor::getEvaluation().state_ = CommandState::Function;
    261261                        CommandExecutor::getEvaluation().function_ = 0;
    262262                        CommandExecutor::getEvaluation().command_ = CommandExecutor::getEvaluation().functionclass_->getName() + " ";
     
    266266                    {
    267267                        // No possibilities
    268                         CommandExecutor::getEvaluation().state_ = CS_Error;
     268                        CommandExecutor::getEvaluation().state_ = CommandState::Error;
    269269                        AddLanguageEntry("commandexecutorunknownfirstargumentstart", "There is no command or classname starting with");
    270270                        CommandExecutor::getEvaluation().errorMessage_ = "Error: " + GetLocalisation("commandexecutorunknownfirstargumentstart") + " " + CommandExecutor::getArgument(0) + ".";
     
    285285                }
    286286            }
    287             case CS_Function:
     287            case CommandState::Function:
    288288            {
    289289                if (CommandExecutor::getEvaluation().functionclass_)
     
    298298                        {
    299299                            // It's a function
    300                             CommandExecutor::getEvaluation().state_ = CS_ParamPreparation;
     300                            CommandExecutor::getEvaluation().state_ = CommandState::ParamPreparation;
    301301                            // Move on to next case
    302302                        }
     
    304304                        {
    305305                            // The second argument is bad
    306                             CommandExecutor::getEvaluation().state_ = CS_Error;
     306                            CommandExecutor::getEvaluation().state_ = CommandState::Error;
    307307                            AddLanguageEntry("commandexecutorunknownsecondargument", "is not a function of");
    308308                            CommandExecutor::getEvaluation().errorMessage_ = "Error: " + CommandExecutor::getArgument(1) + " " + GetLocalisation("commandexecutorunknownsecondargument") + " " + CommandExecutor::getEvaluation().functionclass_->getName() + ".";
     
    326326                                CommandExecutor::getEvaluation().bCommandChanged_ = true;
    327327                            }
    328                             CommandExecutor::getEvaluation().state_ = CS_ParamPreparation;
     328                            CommandExecutor::getEvaluation().state_ = CommandState::ParamPreparation;
    329329                            CommandExecutor::getEvaluation().command_ = CommandExecutor::getEvaluation().functionclass_->getName() + " " + CommandExecutor::getEvaluation().function_->getName();
    330330                            if (CommandExecutor::getEvaluation().function_->getParamCount() > 0)
     
    338338                        {
    339339                            // No possibilities
    340                             CommandExecutor::getEvaluation().state_ = CS_Error;
     340                            CommandExecutor::getEvaluation().state_ = CommandState::Error;
    341341                            AddLanguageEntry("commandexecutorunknownsecondargumentstart", "has no function starting with");
    342342                            CommandExecutor::getEvaluation().errorMessage_ = "Error: " + CommandExecutor::getEvaluation().functionclass_->getName() + " " + GetLocalisation("commandexecutorunknownsecondargumentstart") + " " + CommandExecutor::getArgument(1) + ".";
     
    355355                else
    356356                {
    357                     // There is no classname - move on to CS_ParamPreparation
    358                 }
    359             }
    360             case CS_ParamPreparation:
     357                    // There is no classname - move on to CommandState::ParamPreparation
     358                }
     359            }
     360            case CommandState::ParamPreparation:
    361361            {
    362362                if (CommandExecutor::getEvaluation().function_->getParamCount() == 0 || CommandExecutor::enoughArgumentsGiven(CommandExecutor::getEvaluation().function_))
    363363                {
    364                     CommandExecutor::getEvaluation().state_ = CS_Finished;
     364                    CommandExecutor::getEvaluation().state_ = CommandState::Finished;
    365365                    return;
    366366                }
     
    372372
    373373                    CommandExecutor::createListOfPossibleArguments(CommandExecutor::getLastArgument(), CommandExecutor::getEvaluation().function_, argumentNumber);
    374                     CommandExecutor::getEvaluation().state_ = CS_Params;
     374                    CommandExecutor::getEvaluation().state_ = CommandState::Params;
    375375
    376376                    if (CommandExecutor::getEvaluation().bCommandChanged_)
     
    381381                }
    382382            }
    383             case CS_Params:
     383            case CommandState::Params:
    384384            {
    385385                if (CommandExecutor::getEvaluation().listOfPossibleArguments_.size() == 1)
     
    388388                    CommandExecutor::getEvaluation().argument_ = (*CommandExecutor::getEvaluation().listOfPossibleArguments_.begin()).getString();
    389389                    CommandExecutor::getEvaluation().possibleArgument_ = (*CommandExecutor::getEvaluation().listOfPossibleArguments_.begin()).getString();
    390                     CommandExecutor::getEvaluation().state_ = CS_ParamPreparation;
     390                    CommandExecutor::getEvaluation().state_ = CommandState::ParamPreparation;
    391391                    return;
    392392                }
     
    394394                {
    395395                    // The user tries something new - we let him do
    396                     CommandExecutor::getEvaluation().state_ = CS_ParamPreparation;
     396                    CommandExecutor::getEvaluation().state_ = CommandState::ParamPreparation;
    397397                    CommandExecutor::getEvaluation().argument_ = CommandExecutor::getLastArgument();
    398398                    return;
     
    409409                    CommandExecutor::getEvaluation().argument_ = CommandExecutor::getCommonBegin(CommandExecutor::getEvaluation().listOfPossibleArguments_);
    410410                    CommandExecutor::getEvaluation().possibleArgument_ = CommandExecutor::getPossibleArgument(CommandExecutor::getLastArgument(), CommandExecutor::getEvaluation().function_, argumentNumber);
    411                     CommandExecutor::getEvaluation().state_ = CS_ParamPreparation;
     411                    CommandExecutor::getEvaluation().state_ = CommandState::ParamPreparation;
    412412                    return;
    413413                }
    414414            }
    415             case CS_Finished:
     415            case CommandState::Finished:
    416416            {
    417417                // Nothing more to do
    418418                break;
    419419            }
    420             case CS_Error:
     420            case CommandState::Error:
    421421            {
    422422                // Bad, very bad
  • code/branches/core4/src/core/CommandLine.cc

    r3255 r3257  
    5454        if (bParsingFile && this->bCommandLineOnly_)
    5555            ThrowException(Argument, "Command line argument '" + getName() + "' is not allowed in files.");
    56         if (value_.getType() == MT_bool)
     56        if (value_.getType() == MT_Type::Bool)
    5757        {
    5858            // simulate command line switch
     
    295295                infoStr << "      ";
    296296            infoStr << "--" << it->second->getName() << " ";
    297             if (it->second->getValue().getType() != MT_bool)
     297            if (it->second->getValue().getType() != MT_Type::Bool)
    298298                infoStr << "ARG ";
    299299            else
  • code/branches/core4/src/core/CommandLine.h

    r3255 r3257  
    213213        OrxAssert(!_getInstance().existsArgument(name),
    214214            "Cannot add a command line argument with name '" + name + "' twice.");
    215         OrxAssert(MultiType(defaultValue).getType() != MT_bool || MultiType(defaultValue).getBool() != true,
     215        OrxAssert(MultiType(defaultValue).getType() != MT_Type::Bool || MultiType(defaultValue).getBool() != true,
    216216               "Boolean command line arguments with positive default values are not supported." << std::endl
    217217            << "Please use SetCommandLineSwitch and adjust your argument: " << name);
  • code/branches/core4/src/core/ConfigValueContainer.cc

    r3196 r3257  
    7878        for (unsigned int i = 0; i < this->valueVector_.size(); i++)
    7979        {
    80             ConfigFileManager::getInstance().getValue(this->type_, this->sectionname_, this->varname_, i, this->valueVector_[i], this->value_.isType(MT_string));
     80            ConfigFileManager::getInstance().getValue(this->type_, this->sectionname_, this->varname_, i, this->valueVector_[i], this->value_.isType(MT_Type::String));
    8181            this->defvalueStringVector_.push_back(this->valueVector_[i]);
    8282        }
     
    109109            if (this->tset(input))
    110110            {
    111                 ConfigFileManager::getInstance().setValue(this->type_, this->sectionname_, this->varname_, input, this->value_.isType(MT_string));
     111                ConfigFileManager::getInstance().setValue(this->type_, this->sectionname_, this->varname_, input, this->value_.isType(MT_Type::String));
    112112                return true;
    113113            }
     
    128128            if (this->tset(index, input))
    129129            {
    130                 ConfigFileManager::getInstance().setValue(this->type_, this->sectionname_, this->varname_, index, input, this->value_.isType(MT_string));
     130                ConfigFileManager::getInstance().setValue(this->type_, this->sectionname_, this->varname_, index, input, this->value_.isType(MT_Type::String));
    131131                return true;
    132132            }
     
    228228                this->valueVector_.erase(this->valueVector_.begin() + index);
    229229                for (unsigned int i = index; i < this->valueVector_.size(); i++)
    230                     ConfigFileManager::getInstance().setValue(this->type_, this->sectionname_, this->varname_, i, this->valueVector_[i], this->value_.isType(MT_string));
     230                    ConfigFileManager::getInstance().setValue(this->type_, this->sectionname_, this->varname_, i, this->valueVector_[i], this->value_.isType(MT_Type::String));
    231231                ConfigFileManager::getInstance().deleteVectorEntries(this->type_, this->sectionname_, this->varname_, this->valueVector_.size());
    232232
     
    264264    {
    265265        if (!this->bIsVector_)
    266             this->value_ = ConfigFileManager::getInstance().getValue(this->type_, this->sectionname_, this->varname_, this->defvalueString_, this->value_.isType(MT_string));
     266            this->value_ = ConfigFileManager::getInstance().getValue(this->type_, this->sectionname_, this->varname_, this->defvalueString_, this->value_.isType(MT_Type::String));
    267267        else
    268268        {
     
    273273                if (i < this->defvalueStringVector_.size())
    274274                {
    275                     this->value_ = ConfigFileManager::getInstance().getValue(this->type_, this->sectionname_, this->varname_, i, this->defvalueStringVector_[i], this->value_.isType(MT_string));
     275                    this->value_ = ConfigFileManager::getInstance().getValue(this->type_, this->sectionname_, this->varname_, i, this->defvalueStringVector_[i], this->value_.isType(MT_Type::String));
    276276                }
    277277                else
    278278                {
    279                     this->value_ = ConfigFileManager::getInstance().getValue(this->type_, this->sectionname_, this->varname_, i, MultiType(), this->value_.isType(MT_string));
     279                    this->value_ = ConfigFileManager::getInstance().getValue(this->type_, this->sectionname_, this->varname_, i, MultiType(), this->value_.isType(MT_Type::String));
    280280                }
    281281
  • code/branches/core4/src/core/ConsoleCommand.h

    r3196 r3257  
    7171    namespace AccessLevel
    7272    {
    73         enum Level
     73        enum Value
    7474        {
    7575            None,
     
    106106                { this->Executor::setDefaultValue(index, param); return (*this); }
    107107
    108             inline ConsoleCommand& accessLevel(AccessLevel::Level level)
     108            inline ConsoleCommand& accessLevel(AccessLevel::Value level)
    109109                { this->accessLevel_ = level; return (*this); }
    110             inline AccessLevel::Level getAccessLevel() const
     110            inline AccessLevel::Value getAccessLevel() const
    111111                { return this->accessLevel_; }
    112112
     
    130130            }
    131131
    132             inline ConsoleCommand& keybindMode(KeybindMode::Enum mode)
     132            inline ConsoleCommand& keybindMode(KeybindMode::Value mode)
    133133                { this->keybindMode_ = mode; return *this; }
    134             inline KeybindMode::Enum getKeybindMode() const
     134            inline KeybindMode::Value getKeybindMode() const
    135135                { return this->keybindMode_; }
    136136
     
    141141
    142142        private:
    143             AccessLevel::Level accessLevel_;
     143            AccessLevel::Value accessLevel_;
    144144            ArgumentCompleter* argumentCompleter_[5];
    145145            ArgumentCompletionList argumentList_;
    146146
    147             KeybindMode::Enum keybindMode_;
     147            KeybindMode::Value keybindMode_;
    148148            int inputConfiguredParam_;
    149149    };
  • code/branches/core4/src/core/CorePrereqs.h

    r3243 r3257  
    7474    namespace KeybindMode
    7575    {
    76         enum Enum
     76        enum Value
    7777        {
    7878            OnPress,
  • code/branches/core4/src/core/Executor.h

    r3250 r3257  
    175175            inline bool hasReturnvalue() const
    176176                { return this->functor_->hasReturnvalue(); }
    177             inline FunctionType getType() const
     177            inline FunctionType::Value getType() const
    178178                { return this->functor_->getType(); }
    179179            inline const MultiType& getReturnvalue() const
     
    201201                    return this->defaultValue_[index];
    202202
    203                 return MT_null;
     203                return MT_Type::Null;
    204204            }
    205205
  • code/branches/core4/src/core/Functor.h

    r3250 r3257  
    4141    const unsigned int MAX_FUNCTOR_ARGUMENTS = 5;
    4242
    43     enum FunctionType
     43    namespace FunctionType
    4444    {
    45         FT_MEMBER,
    46         FT_CONSTMEMBER,
    47         FT_STATIC
    48     };
     45        enum Value
     46        {
     47            Member,
     48            ConstMember,
     49            Static
     50        };
     51    }
    4952
    5053
     
    98101            virtual ~Functor() {}
    99102
    100             virtual void operator()(const MultiType& param1 = MT_null, const MultiType& param2 = MT_null, const MultiType& param3 = MT_null, const MultiType& param4 = MT_null, const MultiType& param5 = MT_null) = 0;
     103            virtual void operator()(const MultiType& param1 = MT_Type::Null, const MultiType& param2 = MT_Type::Null, const MultiType& param3 = MT_Type::Null, const MultiType& param4 = MT_Type::Null, const MultiType& param5 = MT_Type::Null) = 0;
    101104
    102105            inline unsigned int getParamCount() const { return this->numParams_; }
    103106            inline bool hasReturnvalue() const { return this->hasReturnValue_; }
    104             inline FunctionType getType() const { return this->type_; }
     107            inline FunctionType::Value getType() const { return this->type_; }
    105108            inline const MultiType& getReturnvalue() const { return this->returnedValue_; }
    106109
     
    113116            unsigned int numParams_;
    114117            bool hasReturnValue_;
    115             FunctionType type_;
     118            FunctionType::Value type_;
    116119            MultiType returnedValue_;
    117120
     
    124127        public:
    125128            virtual ~FunctorStatic() {}
    126             virtual void operator()(const MultiType& param1 = MT_null, const MultiType& param2 = MT_null, const MultiType& param3 = MT_null, const MultiType& param4 = MT_null, const MultiType& param5 = MT_null) = 0;
     129            virtual void operator()(const MultiType& param1 = MT_Type::Null, const MultiType& param2 = MT_Type::Null, const MultiType& param3 = MT_Type::Null, const MultiType& param4 = MT_Type::Null, const MultiType& param5 = MT_Type::Null) = 0;
    127130    };
    128131
     
    139142            virtual ~FunctorMember() {}
    140143
    141             virtual void operator()(T* object, const MultiType& param1 = MT_null, const MultiType& param2 = MT_null, const MultiType& param3 = MT_null, const MultiType& param4 = MT_null, const MultiType& param5 = MT_null) = 0;
    142             virtual void operator()(const T* object, const MultiType& param1 = MT_null, const MultiType& param2 = MT_null, const MultiType& param3 = MT_null, const MultiType& param4 = MT_null, const MultiType& param5 = MT_null) = 0;
    143 
    144             virtual void operator()(const MultiType& param1 = MT_null, const MultiType& param2 = MT_null, const MultiType& param3 = MT_null, const MultiType& param4 = MT_null, const MultiType& param5 = MT_null)
     144            virtual void operator()(T* object, const MultiType& param1 = MT_Type::Null, const MultiType& param2 = MT_Type::Null, const MultiType& param3 = MT_Type::Null, const MultiType& param4 = MT_Type::Null, const MultiType& param5 = MT_Type::Null) = 0;
     145            virtual void operator()(const T* object, const MultiType& param1 = MT_Type::Null, const MultiType& param2 = MT_Type::Null, const MultiType& param3 = MT_Type::Null, const MultiType& param4 = MT_Type::Null, const MultiType& param5 = MT_Type::Null) = 0;
     146
     147            virtual void operator()(const MultiType& param1 = MT_Type::Null, const MultiType& param2 = MT_Type::Null, const MultiType& param3 = MT_Type::Null, const MultiType& param4 = MT_Type::Null, const MultiType& param5 = MT_Type::Null)
    145148            {
    146149                if (this->bConstObject_)
     
    322325                this->numParams_ = numparams; \
    323326                this->hasReturnValue_ = returnvalue; \
    324                 this->type_ = FT_STATIC; \
     327                this->type_ = FunctionType::Static; \
    325328                this->functionPointer_ = functionPointer; \
    326329                \
     
    329332            } \
    330333    \
    331             void operator()(const MultiType& param1 = MT_null, const MultiType& param2 = MT_null, const MultiType& param3 = MT_null, const MultiType& param4 = MT_null, const MultiType& param5 = MT_null) \
     334            void operator()(const MultiType& param1 = MT_Type::Null, const MultiType& param2 = MT_Type::Null, const MultiType& param3 = MT_Type::Null, const MultiType& param4 = MT_Type::Null, const MultiType& param5 = MT_Type::Null) \
    332335            { \
    333336                FUNCTOR_STORE_RETURNVALUE(returnvalue, (*this->functionPointer_)(FUNCTOR_FUNCTION_CALL(numparams))); \
     
    363366                this->numParams_ = numparams; \
    364367                this->hasReturnValue_ = returnvalue; \
    365                 this->type_ = FT_MEMBER; \
     368                this->type_ = FunctionType::Member; \
    366369                this->functionPointer_ = functionPointer; \
    367370            } \
    368371    \
    369             void operator()(T* object, const MultiType& param1 = MT_null, const MultiType& param2 = MT_null, const MultiType& param3 = MT_null, const MultiType& param4 = MT_null, const MultiType& param5 = MT_null) \
     372            void operator()(T* object, const MultiType& param1 = MT_Type::Null, const MultiType& param2 = MT_Type::Null, const MultiType& param3 = MT_Type::Null, const MultiType& param4 = MT_Type::Null, const MultiType& param5 = MT_Type::Null) \
    370373            { \
    371374                FUNCTOR_STORE_RETURNVALUE(returnvalue, (*object.*this->functionPointer_)(FUNCTOR_FUNCTION_CALL(numparams))); \
    372375            } \
    373376    \
    374             void operator()(const T* object, const MultiType& param1 = MT_null, const MultiType& param2 = MT_null, const MultiType& param3 = MT_null, const MultiType& param4 = MT_null, const MultiType& param5 = MT_null) \
     377            void operator()(const T* object, const MultiType& param1 = MT_Type::Null, const MultiType& param2 = MT_Type::Null, const MultiType& param3 = MT_Type::Null, const MultiType& param4 = MT_Type::Null, const MultiType& param5 = MT_Type::Null) \
    375378            { \
    376379                COUT(1) << "An error occurred in Functor.h:" << std::endl; \
     
    396399                this->numParams_ = numparams; \
    397400                this->hasReturnValue_ = returnvalue; \
    398                 this->type_ = FT_CONSTMEMBER; \
     401                this->type_ = FunctionType::ConstMember; \
    399402                this->functionPointer_ = functionPointer; \
    400403            } \
    401404    \
    402             void operator()(T* object, const MultiType& param1 = MT_null, const MultiType& param2 = MT_null, const MultiType& param3 = MT_null, const MultiType& param4 = MT_null, const MultiType& param5 = MT_null) \
     405            void operator()(T* object, const MultiType& param1 = MT_Type::Null, const MultiType& param2 = MT_Type::Null, const MultiType& param3 = MT_Type::Null, const MultiType& param4 = MT_Type::Null, const MultiType& param5 = MT_Type::Null) \
    403406            { \
    404407                FUNCTOR_STORE_RETURNVALUE(returnvalue, (*object.*this->functionPointer_)(FUNCTOR_FUNCTION_CALL(numparams))); \
    405408            } \
    406409    \
    407             void operator()(const T* object, const MultiType& param1 = MT_null, const MultiType& param2 = MT_null, const MultiType& param3 = MT_null, const MultiType& param4 = MT_null, const MultiType& param5 = MT_null) \
     410            void operator()(const T* object, const MultiType& param1 = MT_Type::Null, const MultiType& param2 = MT_Type::Null, const MultiType& param3 = MT_Type::Null, const MultiType& param4 = MT_Type::Null, const MultiType& param5 = MT_Type::Null) \
    408411            { \
    409412                FUNCTOR_STORE_RETURNVALUE(returnvalue, (*object.*this->functionPointer_)(FUNCTOR_FUNCTION_CALL(numparams))); \
  • code/branches/core4/src/core/input/Button.cc

    r3250 r3257  
    127127                    '\\', false, '"', false, '(', ')', false, '\0');
    128128
    129                 KeybindMode::Enum mode = KeybindMode::None;
     129                KeybindMode::Value mode = KeybindMode::None;
    130130                float paramModifier = 1.0f;
    131131                std::string commandStr = "";
  • code/branches/core4/src/core/input/Button.h

    r2662 r3257  
    5454        void parse();
    5555        void readConfigValue(ConfigFileType configFile);
    56         bool execute(KeybindMode::Enum mode, float abs = 1.0f, float rel = 1.0f);
     56        bool execute(KeybindMode::Value mode, float abs = 1.0f, float rel = 1.0f);
    5757
    5858        //! Container to allow for better configValue support
     
    7979    };
    8080
    81     inline bool Button::execute(KeybindMode::Enum mode, float abs, float rel)
     81    inline bool Button::execute(KeybindMode::Value mode, float abs, float rel)
    8282    {
    8383        // execute all the parsed commands in the string
Note: See TracChangeset for help on using the changeset viewer.