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
Files:
97 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
  • code/branches/core4/src/network/NetworkPrereqs.h

    r3214 r3257  
    132132    namespace PacketFlag
    133133    {
    134       enum Enum
     134      enum Value
    135135      {
    136136        Reliable   = 1,
  • code/branches/core4/src/network/packet/Acknowledgement.cc

    r3214 r3257  
    3737#define PACKET_FLAGS_ACK    0
    3838#define _PACKETID           0
    39 #define _ACKID              _PACKETID + sizeof(packet::ENUM::Type)
     39#define _ACKID              _PACKETID + sizeof(packet::Type::Value)
    4040 
    4141Acknowledgement::Acknowledgement( unsigned int id, unsigned int clientID )
     
    4444  flags_ = flags_ | PACKET_FLAGS_ACK;
    4545  data_=new uint8_t[ getSize() ];
    46   *(ENUM::Type *)(data_ + _PACKETID ) = ENUM::Acknowledgement;
     46  *(Type::Value *)(data_ + _PACKETID ) = Type::Acknowledgement;
    4747  *(uint32_t *)(data_ + _ACKID ) = id;
    4848  clientID_=clientID;
  • code/branches/core4/src/network/packet/Chat.cc

    r3214 r3257  
    3838#define   PACKET_FLAGS_CHAT PacketFlag::Reliable
    3939#define   _PACKETID         0
    40 const int _PLAYERID     =   _PACKETID + sizeof(ENUM::Type);
     40const int _PLAYERID     =   _PACKETID + sizeof(Type::Value);
    4141#define   _MESSAGELENGTH    _PLAYERID + sizeof(uint32_t)
    4242#define   _MESSAGE          _MESSAGELENGTH + sizeof(uint32_t)
     
    4848  messageLength_ = message.length()+1;
    4949  data_=new unsigned char[ getSize() ];
    50   *(ENUM::Type *)(data_ + _PACKETID ) = ENUM::Chat;
     50  *(Type::Value *)(data_ + _PACKETID ) = Type::Chat;
    5151  *(unsigned int *)(data_ + _PLAYERID ) = playerID;
    5252  *(unsigned int *)(data_ + _MESSAGELENGTH ) = messageLength_;
  • code/branches/core4/src/network/packet/ClassID.cc

    r3214 r3257  
    7474  //set the appropriate packet id
    7575  assert(this->data_);
    76   *(ENUM::Type *)(this->data_ + _PACKETID ) = ENUM::ClassID;
     76  *(Type::Value *)(this->data_ + _PACKETID ) = Type::ClassID;
    7777 
    7878  uint8_t *temp=data_+sizeof(uint32_t);
  • code/branches/core4/src/network/packet/DeleteObjects.cc

    r3214 r3257  
    3939#define PACKET_FLAG_DELETE  PacketFlag::Reliable
    4040#define _PACKETID           0
    41 #define _QUANTITY           _PACKETID + sizeof(ENUM::Type)
     41#define _QUANTITY           _PACKETID + sizeof(Type::Value)
    4242#define _OBJECTIDS          _QUANTITY + sizeof(uint32_t)
    4343 
     
    6262    return false;
    6363  COUT(4) << "sending DeleteObjects: ";
    64   unsigned int size = sizeof(ENUM::Type) + sizeof(uint32_t)*(number+1);
     64  unsigned int size = sizeof(Type::Value) + sizeof(uint32_t)*(number+1);
    6565  data_ = new uint8_t[size];
    6666  uint8_t *tdata = data_;
    67   *reinterpret_cast<ENUM::Type*>(tdata) = ENUM::DeleteObjects;
    68   tdata += sizeof(ENUM::Type);
     67  *reinterpret_cast<Type::Value*>(tdata) = Type::DeleteObjects;
     68  tdata += sizeof(Type::Value);
    6969  *(uint32_t *)tdata = number;
    7070  tdata += sizeof(uint32_t);
  • code/branches/core4/src/network/packet/FunctionCalls.cc

    r3214 r3257  
    4949  currentMemBlocks_ = 1;
    5050  data_=new uint8_t[ FUNCTIONCALLS_MEM_ALLOCATION ];
    51   *(ENUM::Type *)(data_ + _PACKETID ) = ENUM::FunctionCalls;
     51  *(Type::Value *)(data_ + _PACKETID ) = Type::FunctionCalls;
    5252  *(uint32_t*)(data_+sizeof(uint32_t)) = 0; // set nrOfCalls to 0
    5353}
  • code/branches/core4/src/network/packet/FunctionIDs.cc

    r3214 r3257  
    6868  //set the appropriate packet id
    6969  assert(this->data_);
    70   *(ENUM::Type *)(this->data_ + _PACKETID ) = ENUM::FunctionIDs;
     70  *(Type::Value *)(this->data_ + _PACKETID ) = Type::FunctionIDs;
    7171 
    7272  uint8_t *temp=data_+sizeof(uint32_t);
  • code/branches/core4/src/network/packet/Gamestate.h

    r3214 r3257  
    4747class _NetworkExport GamestateHeader{
    4848  public:
    49     GamestateHeader(uint8_t *data){ assert(data); data_ = data; *(uint32_t*)data_ = ENUM::Gamestate; }
     49    GamestateHeader(uint8_t *data){ assert(data); data_ = data; *(uint32_t*)data_ = Type::Gamestate; }
    5050    GamestateHeader(uint8_t *data, GamestateHeader* h)
    5151    { assert(data); data_=data; memcpy(data_, h->data_, getSize()); }
  • code/branches/core4/src/network/packet/Packet.cc

    r3214 r3257  
    6363Packet::Packet(){
    6464  flags_ = PACKET_FLAG_DEFAULT;
    65   packetDirection_ = ENUM::Outgoing;
     65  packetDirection_ = Direction::Outgoing;
    6666  clientID_=0;
    6767  data_=0;
     
    7676Packet::Packet(uint8_t *data, unsigned int clientID){
    7777  flags_ = PACKET_FLAG_DEFAULT;
    78   packetDirection_ = ENUM::Incoming;
     78  packetDirection_ = Direction::Incoming;
    7979  clientID_=clientID;
    8080  data_=data;
     
    125125
    126126bool Packet::send(){
    127   if(packetDirection_ != ENUM::Outgoing && packetDirection_ != ENUM::Bidirectional ){
     127  if(packetDirection_ != Direction::Outgoing && packetDirection_ != Direction::Bidirectional ){
    128128    assert(0);
    129129    return false;
     
    147147  }
    148148#ifndef NDEBUG
    149   switch( *(ENUM::Type *)(data_ + _PACKETID) )
     149  switch( *(Type::Value *)(data_ + _PACKETID) )
    150150  {
    151     case ENUM::Acknowledgement:
    152     case ENUM::Chat:
    153     case ENUM::ClassID:
    154     case ENUM::Gamestate:
    155     case ENUM::Welcome:
    156     case ENUM::DeleteObjects:
    157     case ENUM::FunctionIDs:
    158     case ENUM::FunctionCalls:
     151    case Type::Acknowledgement:
     152    case Type::Chat:
     153    case Type::ClassID:
     154    case Type::Gamestate:
     155    case Type::Welcome:
     156    case Type::DeleteObjects:
     157    case Type::FunctionIDs:
     158    case Type::FunctionCalls:
    159159      break;
    160160    default:
     
    175175  unsigned int clientID = ClientInformation::findClient(&peer->address)->getID();
    176176  Packet *p = 0;
    177   COUT(6) << "packet type: " << *(ENUM::Type *)&data[_PACKETID] << std::endl;
    178   switch( *(ENUM::Type *)(data + _PACKETID) )
     177  COUT(6) << "packet type: " << *(Type::Value *)&data[_PACKETID] << std::endl;
     178  switch( *(Type::Value *)(data + _PACKETID) )
    179179  {
    180     case ENUM::Acknowledgement:
     180    case Type::Acknowledgement:
    181181      COUT(5) << "ack" << std::endl;
    182182      p = new Acknowledgement( data, clientID );
    183183      break;
    184     case ENUM::Chat:
     184    case Type::Chat:
    185185      COUT(5) << "chat" << std::endl;
    186186      p = new Chat( data, clientID );
    187187      break;
    188     case ENUM::ClassID:
     188    case Type::ClassID:
    189189      COUT(5) << "classid" << std::endl;
    190190      p = new ClassID( data, clientID );
    191191      break;
    192     case ENUM::Gamestate:
     192    case Type::Gamestate:
    193193      COUT(5) << "gamestate" << std::endl;
    194194      // TODO: remove brackets
    195195      p = new Gamestate( data, clientID );
    196196      break;
    197     case ENUM::Welcome:
     197    case Type::Welcome:
    198198      COUT(5) << "welcome" << std::endl;
    199199      p = new Welcome( data, clientID );
    200200      break;
    201     case ENUM::DeleteObjects:
     201    case Type::DeleteObjects:
    202202      COUT(5) << "deleteobjects" << std::endl;
    203203      p = new DeleteObjects( data, clientID );
    204204      break;
    205     case ENUM::FunctionCalls:
     205    case Type::FunctionCalls:
    206206      COUT(5) << "functionCalls" << std::endl;
    207207      p = new FunctionCalls( data, clientID );
    208208      break;
    209     case ENUM::FunctionIDs:
     209    case Type::FunctionIDs:
    210210      COUT(5) << "functionIDs" << std::endl;
    211211      p = new FunctionIDs( data, clientID );
  • code/branches/core4/src/network/packet/Packet.h

    r3214 r3257  
    3636namespace packet{
    3737
    38 namespace ENUM{
    39   enum Direction{
     38namespace Direction{
     39  enum Value{
    4040    Incoming,
    4141    Outgoing,
    4242    Bidirectional
    4343  };
    44   enum Type{
     44}
     45namespace Type{
     46  enum Value{
    4547    Acknowledgement,
    4648    Chat,
     
    8486    uint32_t flags_;
    8587    unsigned int clientID_;
    86     ENUM::Direction packetDirection_;
     88    Direction::Value packetDirection_;
    8789    /** Pointer to the data. Be careful when deleting it because it might
    8890        point to a location that was allocated by ENet.
  • code/branches/core4/src/network/packet/Welcome.cc

    r3214 r3257  
    4141#define PACKET_FLAGS_CLASSID  PacketFlag::Reliable
    4242#define _PACKETID             0
    43 #define _CLIENTID             _PACKETID + sizeof(ENUM::Type)
     43#define _CLIENTID             _PACKETID + sizeof(Type::Value)
    4444#define _ENDIANTEST           _CLIENTID + sizeof(uint32_t)
    4545
     
    5151  data_=new uint8_t[ getSize() ];
    5252  assert(data_);
    53   *(packet::ENUM::Type *)(data_ + _PACKETID ) = packet::ENUM::Welcome;
     53  *(packet::Type::Value *)(data_ + _PACKETID ) = packet::Type::Welcome;
    5454  *(uint32_t *)(data_ + _CLIENTID ) = static_cast<uint32_t>(clientID);
    5555  *(uint32_t *)(data_ + _ENDIANTEST ) = 0xFEDC4321;
     
    7070
    7171unsigned int Welcome::getSize() const{
    72   return sizeof(packet::ENUM::Type) + 2*sizeof(uint32_t);
     72  return sizeof(packet::Type::Value) + 2*sizeof(uint32_t);
    7373}
    7474
  • code/branches/core4/src/network/synchronisable/Synchronisable.cc

    r3239 r3257  
    6565    this->dataSize_ = 0;
    6666    // set standard priority
    67     this->setPriority( priority::normal );
     67    this->setPriority( Priority::Normal );
    6868
    6969    // get creator id
  • code/branches/core4/src/network/synchronisable/Synchronisable.h

    r3214 r3257  
    5151{
    5252
    53   namespace objectDirection{
    54     enum objectdirection{
    55       toclient=0x1,
    56       toserver=0x2,
    57       bidirectional=0x3
     53  namespace ObjectDirection{
     54    enum Value{
     55      ToClient=0x1,
     56      ToServer=0x2,
     57      Bidirectional=0x3
    5858    };
    5959  }
    6060
    61   namespace priority{
    62     enum prio{
    63       very_high   = -100,
    64       high        = -15,
    65       normal      = 0,
    66       low         = 15,
    67       very_low    = 100
     61  namespace Priority{
     62    enum Value{
     63      VeryHigh    = -100,
     64      High        = -15,
     65      Normal      = 0,
     66      Low         = 15,
     67      VeryLow     = 100
    6868    };
    6969  }
  • code/branches/core4/src/network/synchronisable/SynchronisableVariable.h

    r3214 r3257  
    4141namespace orxonox{
    4242 
    43   namespace variableDirection{
    44     enum syncdirection{
    45       toclient=0x1,
    46       toserver=0x2
     43  namespace VariableDirection{
     44    enum Value{
     45      ToClient=0x1,
     46      ToServer=0x2
    4747    };
    48     enum bidirectional{
    49       serverMaster=0x1,
    50       clientMaster=0x2
     48  }
     49  namespace Bidirectionality{
     50    enum Value{
     51      ServerMaster=0x1,
     52      ClientMaster=0x2
    5153    };
    5254  }
     
    6971  {
    7072    public:
    71       SynchronisableVariable(T& variable, uint8_t syncDirection=variableDirection::toclient, NetworkCallbackBase *cb=0);
     73      SynchronisableVariable(T& variable, uint8_t syncDirection=VariableDirection::ToClient, NetworkCallbackBase *cb=0);
    7274      virtual ~SynchronisableVariable();
    7375
     
    8890  {
    8991    public:
    90       SynchronisableVariableBidirectional(T& variable, uint8_t master=variableDirection::serverMaster, NetworkCallbackBase *cb=0);
     92      SynchronisableVariableBidirectional(T& variable, uint8_t master=Bidirectionality::ServerMaster, NetworkCallbackBase *cb=0);
    9193      virtual ~SynchronisableVariableBidirectional();
    9294     
  • code/branches/core4/src/orxonox/OrxonoxPrereqs.h

    r3196 r3257  
    6565    namespace LODParticle
    6666    {
    67         enum LOD
     67        enum Value
    6868        {
    69             off = 0,
    70             low = 1,
    71             normal = 2,
    72             high = 3
     69            Off = 0,
     70            Low = 1,
     71            Normal = 2,
     72            High = 3
    7373        };
    7474    }
  • code/branches/core4/src/orxonox/objects/GlobalShader.cc

    r3196 r3257  
    6666    void GlobalShader::registerVariables()
    6767    {
    68         registerVariable(this->bVisible_,                                         variableDirection::toclient, new NetworkCallback<GlobalShader>(this, &GlobalShader::changedVisibility));
    69         registerVariable(const_cast<std::string&>(this->shader_.getCompositor()), variableDirection::toclient, new NetworkCallback<Shader>(&this->shader_, &Shader::changedCompositor));
     68        registerVariable(this->bVisible_,                                         VariableDirection::ToClient, new NetworkCallback<GlobalShader>(this, &GlobalShader::changedVisibility));
     69        registerVariable(const_cast<std::string&>(this->shader_.getCompositor()), VariableDirection::ToClient, new NetworkCallback<Shader>(&this->shader_, &Shader::changedCompositor));
    7070    }
    7171
  • code/branches/core4/src/orxonox/objects/Level.cc

    r3239 r3257  
    8787    void Level::registerVariables()
    8888    {
    89         registerVariable(this->xmlfilename_, variableDirection::toclient, new NetworkCallback<Level>(this, &Level::networkcallback_applyXMLFile));
    90         registerVariable(this->name_,        variableDirection::toclient, new NetworkCallback<Level>(this, &Level::changedName));
    91         registerVariable(this->description_, variableDirection::toclient);
     89        registerVariable(this->xmlfilename_, VariableDirection::ToClient, new NetworkCallback<Level>(this, &Level::networkcallback_applyXMLFile));
     90        registerVariable(this->name_,        VariableDirection::ToClient, new NetworkCallback<Level>(this, &Level::changedName));
     91        registerVariable(this->description_, VariableDirection::ToClient);
    9292    }
    9393
  • code/branches/core4/src/orxonox/objects/Scene.cc

    r3239 r3257  
    115115    void Scene::registerVariables()
    116116    {
    117         registerVariable(this->skybox_,             variableDirection::toclient, new NetworkCallback<Scene>(this, &Scene::networkcallback_applySkybox));
    118         registerVariable(this->ambientLight_,       variableDirection::toclient, new NetworkCallback<Scene>(this, &Scene::networkcallback_applyAmbientLight));
    119         registerVariable(this->negativeWorldRange_, variableDirection::toclient, new NetworkCallback<Scene>(this, &Scene::networkcallback_negativeWorldRange));
    120         registerVariable(this->positiveWorldRange_, variableDirection::toclient, new NetworkCallback<Scene>(this, &Scene::networkcallback_positiveWorldRange));
    121         registerVariable(this->gravity_,            variableDirection::toclient, new NetworkCallback<Scene>(this, &Scene::networkcallback_gravity));
    122         registerVariable(this->bHasPhysics_,        variableDirection::toclient, new NetworkCallback<Scene>(this, &Scene::networkcallback_hasPhysics));
    123         registerVariable(this->bShadows_,           variableDirection::toclient, new NetworkCallback<Scene>(this, &Scene::networkcallback_applyShadows));
     117        registerVariable(this->skybox_,             VariableDirection::ToClient, new NetworkCallback<Scene>(this, &Scene::networkcallback_applySkybox));
     118        registerVariable(this->ambientLight_,       VariableDirection::ToClient, new NetworkCallback<Scene>(this, &Scene::networkcallback_applyAmbientLight));
     119        registerVariable(this->negativeWorldRange_, VariableDirection::ToClient, new NetworkCallback<Scene>(this, &Scene::networkcallback_negativeWorldRange));
     120        registerVariable(this->positiveWorldRange_, VariableDirection::ToClient, new NetworkCallback<Scene>(this, &Scene::networkcallback_positiveWorldRange));
     121        registerVariable(this->gravity_,            VariableDirection::ToClient, new NetworkCallback<Scene>(this, &Scene::networkcallback_gravity));
     122        registerVariable(this->bHasPhysics_,        VariableDirection::ToClient, new NetworkCallback<Scene>(this, &Scene::networkcallback_hasPhysics));
     123        registerVariable(this->bShadows_,           VariableDirection::ToClient, new NetworkCallback<Scene>(this, &Scene::networkcallback_applyShadows));
    124124    }
    125125
  • code/branches/core4/src/orxonox/objects/collisionshapes/BoxCollisionShape.cc

    r3196 r3257  
    5757    void BoxCollisionShape::registerVariables()
    5858    {
    59         registerVariable(this->halfExtents_, variableDirection::toclient, new NetworkCallback<CollisionShape>(this, &CollisionShape::updateShape));
     59        registerVariable(this->halfExtents_, VariableDirection::ToClient, new NetworkCallback<CollisionShape>(this, &CollisionShape::updateShape));
    6060    }
    6161
  • code/branches/core4/src/orxonox/objects/collisionshapes/CollisionShape.cc

    r3239 r3257  
    7777    void CollisionShape::registerVariables()
    7878    {
    79         registerVariable(this->parentID_, variableDirection::toclient, new NetworkCallback<CollisionShape>(this, &CollisionShape::parentChanged));
     79        registerVariable(this->parentID_, VariableDirection::ToClient, new NetworkCallback<CollisionShape>(this, &CollisionShape::parentChanged));
    8080    }
    8181
  • code/branches/core4/src/orxonox/objects/collisionshapes/ConeCollisionShape.cc

    r3196 r3257  
    5757    void ConeCollisionShape::registerVariables()
    5858    {
    59         registerVariable(this->radius_, variableDirection::toclient, new NetworkCallback<CollisionShape>(this, &CollisionShape::updateShape));
    60         registerVariable(this->height_, variableDirection::toclient, new NetworkCallback<CollisionShape>(this, &CollisionShape::updateShape));
     59        registerVariable(this->radius_, VariableDirection::ToClient, new NetworkCallback<CollisionShape>(this, &CollisionShape::updateShape));
     60        registerVariable(this->height_, VariableDirection::ToClient, new NetworkCallback<CollisionShape>(this, &CollisionShape::updateShape));
    6161    }
    6262
  • code/branches/core4/src/orxonox/objects/collisionshapes/PlaneCollisionShape.cc

    r3196 r3257  
    5858    void PlaneCollisionShape::registerVariables()
    5959    {
    60         registerVariable(this->normal_, variableDirection::toclient, new NetworkCallback<CollisionShape>(this, &CollisionShape::updateShape));
    61         registerVariable(this->offset_, variableDirection::toclient, new NetworkCallback<CollisionShape>(this, &CollisionShape::updateShape));
     60        registerVariable(this->normal_, VariableDirection::ToClient, new NetworkCallback<CollisionShape>(this, &CollisionShape::updateShape));
     61        registerVariable(this->offset_, VariableDirection::ToClient, new NetworkCallback<CollisionShape>(this, &CollisionShape::updateShape));
    6262    }
    6363
  • code/branches/core4/src/orxonox/objects/collisionshapes/SphereCollisionShape.cc

    r3196 r3257  
    5656    void SphereCollisionShape::registerVariables()
    5757    {
    58         registerVariable(this->radius_, variableDirection::toclient, new NetworkCallback<CollisionShape>(this, &CollisionShape::updateShape));
     58        registerVariable(this->radius_, VariableDirection::ToClient, new NetworkCallback<CollisionShape>(this, &CollisionShape::updateShape));
    5959    }
    6060
  • code/branches/core4/src/orxonox/objects/controllers/ArtificialController.cc

    r3239 r3257  
    208208            switch (base->getState())
    209209            {
    210                 case BaseState::controlTeam1:
     210                case BaseState::ControlTeam1:
    211211                    team1 = 0;
    212212                    break;
    213                 case BaseState::controlTeam2:
     213                case BaseState::ControlTeam2:
    214214                    team1 = 1;
    215215                    break;
    216                 case BaseState::uncontrolled:
     216                case BaseState::Uncontrolled:
    217217                default:
    218218                    team1 = -1;
     
    224224            switch (base->getState())
    225225            {
    226                 case BaseState::controlTeam1:
     226                case BaseState::ControlTeam1:
    227227                    team2 = 0;
    228228                    break;
    229                 case BaseState::controlTeam2:
     229                case BaseState::ControlTeam2:
    230230                    team2 = 1;
    231231                    break;
    232                 case BaseState::uncontrolled:
     232                case BaseState::Uncontrolled:
    233233                default:
    234234                    team2 = -1;
  • code/branches/core4/src/orxonox/objects/gametypes/Gametype.h

    r3196 r3257  
    4545    namespace PlayerState
    4646    {
    47         enum Enum
     47        enum Value
    4848        {
    4949            Uninitialized,
     
    5757    {
    5858        PlayerInfo* info_;
    59         PlayerState::Enum state_;
     59        PlayerState::Value state_;
    6060        int frags_;
    6161        int killed_;
  • code/branches/core4/src/orxonox/objects/gametypes/TeamBaseMatch.cc

    r3239 r3257  
    6666                if (teamnr == 0)
    6767                {
    68                     base->setState(BaseState::controlTeam1);
     68                    base->setState(BaseState::ControlTeam1);
    6969                    this->gtinfo_.sendAnnounceMessage("The red team captured a base");
    7070                }
    7171                if (teamnr == 1)
    7272                {
    73                     base->setState(BaseState::controlTeam2);
     73                    base->setState(BaseState::ControlTeam2);
    7474                    this->gtinfo_.sendAnnounceMessage("The blue team captured a base");
    7575                }
     
    107107            switch (base->getState())
    108108            {
    109                 case BaseState::controlTeam1:
     109                case BaseState::ControlTeam1:
    110110                    teamnrbase = 0;
    111111                    break;
    112                 case BaseState::controlTeam2:
     112                case BaseState::ControlTeam2:
    113113                    teamnrbase = 1;
    114114                    break;
    115                 case BaseState::uncontrolled:
     115                case BaseState::Uncontrolled:
    116116                default:
    117117                    teamnrbase = -1;
     
    155155        for (std::set<TeamBaseMatchBase*>::const_iterator it = this->bases_.begin(); it != this->bases_.end(); ++it)
    156156        {
    157             if((*it)->getState() == BaseState::controlTeam1)
     157            if((*it)->getState() == BaseState::ControlTeam1)
    158158            {
    159159                amountControlled++;
    160160            }
    161             if((*it)->getState() == BaseState::controlTeam2)
     161            if((*it)->getState() == BaseState::ControlTeam2)
    162162            {
    163163                amountControlled2++;
     
    241241        for (std::set<TeamBaseMatchBase*>::const_iterator it = this->bases_.begin(); it != this->bases_.end(); ++it)
    242242        {
    243             if ((*it)->getState() == BaseState::controlTeam1 && team == 0)
     243            if ((*it)->getState() == BaseState::ControlTeam1 && team == 0)
    244244                count++;
    245             if ((*it)->getState() == BaseState::controlTeam2 && team == 1)
     245            if ((*it)->getState() == BaseState::ControlTeam2 && team == 1)
    246246                count++;
    247247        }
     
    253253    {
    254254        this->bases_.insert(base);
    255         base->setState(BaseState::uncontrolled);
     255        base->setState(BaseState::Uncontrolled);
    256256    }
    257257
  • code/branches/core4/src/orxonox/objects/infos/GametypeInfo.cc

    r3196 r3257  
    6161    void GametypeInfo::registerVariables()
    6262    {
    63         registerVariable(this->bStarted_,               variableDirection::toclient);
    64         registerVariable(this->bEnded_,                 variableDirection::toclient);
    65         registerVariable(this->startCountdown_,         variableDirection::toclient);
    66         registerVariable(this->bStartCountdownRunning_, variableDirection::toclient);
    67         registerVariable(this->hudtemplate_,            variableDirection::toclient);
     63        registerVariable(this->bStarted_,               VariableDirection::ToClient);
     64        registerVariable(this->bEnded_,                 VariableDirection::ToClient);
     65        registerVariable(this->startCountdown_,         VariableDirection::ToClient);
     66        registerVariable(this->bStartCountdownRunning_, VariableDirection::ToClient);
     67        registerVariable(this->hudtemplate_,            VariableDirection::ToClient);
    6868    }
    6969
  • code/branches/core4/src/orxonox/objects/infos/HumanPlayer.cc

    r3196 r3257  
    7979    void HumanPlayer::registerVariables()
    8080    {
    81         registerVariable(this->synchronize_nick_, variableDirection::toserver, new NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_changednick));
     81        registerVariable(this->synchronize_nick_, VariableDirection::ToServer, new NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_changednick));
    8282
    83         registerVariable(this->clientID_,           variableDirection::toclient, new NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_clientIDchanged));
    84         registerVariable(this->server_initialized_, variableDirection::toclient, new NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_server_initialized));
    85         registerVariable(this->client_initialized_, variableDirection::toserver, new NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_client_initialized));
     83        registerVariable(this->clientID_,           VariableDirection::ToClient, new NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_clientIDchanged));
     84        registerVariable(this->server_initialized_, VariableDirection::ToClient, new NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_server_initialized));
     85        registerVariable(this->client_initialized_, VariableDirection::ToServer, new NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_client_initialized));
    8686    }
    8787
     
    116116
    117117            if (!GameMode::isMaster())
    118                 this->setObjectMode(objectDirection::bidirectional);
     118                this->setObjectMode(ObjectDirection::Bidirectional);
    119119            else
    120120                this->setName(this->nick_);
  • code/branches/core4/src/orxonox/objects/infos/PlayerInfo.cc

    r3239 r3257  
    7777    void PlayerInfo::registerVariables()
    7878    {
    79         registerVariable(this->name_,                 variableDirection::toclient, new NetworkCallback<PlayerInfo>(this, &PlayerInfo::changedName));
    80         registerVariable(this->controllableEntityID_, variableDirection::toclient, new NetworkCallback<PlayerInfo>(this, &PlayerInfo::networkcallback_changedcontrollableentityID));
    81         registerVariable(this->bReadyToSpawn_,        variableDirection::toserver);
    82         registerVariable(this->gtinfoID_,             variableDirection::toclient, new NetworkCallback<PlayerInfo>(this, &PlayerInfo::networkcallback_changedgtinfoID));
     79        registerVariable(this->name_,                 VariableDirection::ToClient, new NetworkCallback<PlayerInfo>(this, &PlayerInfo::changedName));
     80        registerVariable(this->controllableEntityID_, VariableDirection::ToClient, new NetworkCallback<PlayerInfo>(this, &PlayerInfo::networkcallback_changedcontrollableentityID));
     81        registerVariable(this->bReadyToSpawn_,        VariableDirection::ToServer);
     82        registerVariable(this->gtinfoID_,             VariableDirection::ToClient, new NetworkCallback<PlayerInfo>(this, &PlayerInfo::networkcallback_changedgtinfoID));
    8383    }
    8484
  • code/branches/core4/src/orxonox/objects/items/Engine.cc

    r3239 r3257  
    113113    void Engine::registerVariables()
    114114    {
    115         registerVariable(this->shipID_, variableDirection::toclient, new NetworkCallback<Engine>(this, &Engine::networkcallback_shipID));
    116 
    117         registerVariable(this->speedFactor_, variableDirection::toclient);
    118         registerVariable(this->boostFactor_, variableDirection::toclient);
    119 
    120         registerVariable(this->maxSpeedFront_,     variableDirection::toclient);
    121         registerVariable(this->maxSpeedBack_,      variableDirection::toclient);
    122         registerVariable(this->maxSpeedLeftRight_, variableDirection::toclient);
    123         registerVariable(this->maxSpeedUpDown_,    variableDirection::toclient);
    124 
    125         registerVariable(this->accelerationFront_,     variableDirection::toclient);
    126         registerVariable(this->accelerationBrake_,     variableDirection::toclient);
    127         registerVariable(this->accelerationBack_,      variableDirection::toclient);
    128         registerVariable(this->accelerationLeftRight_, variableDirection::toclient);
    129         registerVariable(this->accelerationUpDown_,    variableDirection::toclient);
     115        registerVariable(this->shipID_, VariableDirection::ToClient, new NetworkCallback<Engine>(this, &Engine::networkcallback_shipID));
     116
     117        registerVariable(this->speedFactor_, VariableDirection::ToClient);
     118        registerVariable(this->boostFactor_, VariableDirection::ToClient);
     119
     120        registerVariable(this->maxSpeedFront_,     VariableDirection::ToClient);
     121        registerVariable(this->maxSpeedBack_,      VariableDirection::ToClient);
     122        registerVariable(this->maxSpeedLeftRight_, VariableDirection::ToClient);
     123        registerVariable(this->maxSpeedUpDown_,    VariableDirection::ToClient);
     124
     125        registerVariable(this->accelerationFront_,     VariableDirection::ToClient);
     126        registerVariable(this->accelerationBrake_,     VariableDirection::ToClient);
     127        registerVariable(this->accelerationBack_,      VariableDirection::ToClient);
     128        registerVariable(this->accelerationLeftRight_, VariableDirection::ToClient);
     129        registerVariable(this->accelerationUpDown_,    VariableDirection::ToClient);
    130130    }
    131131
  • code/branches/core4/src/orxonox/objects/items/MultiStateEngine.cc

    r3196 r3257  
    8282    void MultiStateEngine::registerVariables()
    8383    {
    84         registerVariable(this->state_, variableDirection::toserver);
     84        registerVariable(this->state_, VariableDirection::ToServer);
    8585    }
    8686
     
    9191            if (this->getShip()->hasLocalController())
    9292            {
    93                 this->setObjectMode(objectDirection::bidirectional);
     93                this->setObjectMode(ObjectDirection::Bidirectional);
    9494
    9595                const Vector3& direction = this->getDirection();
  • code/branches/core4/src/orxonox/objects/pickup/ModifierPickup.cc

    r3196 r3257  
    8787        if (this->addTo(pawn))
    8888        {
    89             std::map<ModifierType::Enum, float>::iterator it;
     89            std::map<ModifierType::Value, float>::iterator it;
    9090
    9191            for (it = this->additiveModifiers_.begin(); it != this->additiveModifiers_.end(); it++)
     
    124124        if (this->removeFrom(pawn))
    125125        {
    126             std::map<ModifierType::Enum, float>::iterator it;
     126            std::map<ModifierType::Value, float>::iterator it;
    127127
    128128            for (it = this->additiveModifiers_.begin(); it != this->additiveModifiers_.end(); it++)
     
    158158        @return Returns the additive modifier for type (or 0 if not exists).
    159159    */
    160     float ModifierPickup::getAdditiveModifier(ModifierType::Enum type) const
    161     {
    162         std::map<ModifierType::Enum, float>::const_iterator it = this->additiveModifiers_.find(type);
     160    float ModifierPickup::getAdditiveModifier(ModifierType::Value type) const
     161    {
     162        std::map<ModifierType::Value, float>::const_iterator it = this->additiveModifiers_.find(type);
    163163        if (it != this->additiveModifiers_.end())
    164164            return (*it).second;
     
    171171        @return Returns the multiplicative modifier for type (or 1 if not exists).
    172172    */
    173     float ModifierPickup::getMultiplicativeModifier(ModifierType::Enum type) const
    174     {
    175         std::map<ModifierType::Enum, float>::const_iterator it = this->multiplicativeModifiers_.find(type);
     173    float ModifierPickup::getMultiplicativeModifier(ModifierType::Value type) const
     174    {
     175        std::map<ModifierType::Value, float>::const_iterator it = this->multiplicativeModifiers_.find(type);
    176176        if (it != this->multiplicativeModifiers_.end())
    177177            return (*it).second;
     
    184184        @param value The new additive modifier for type.
    185185    */
    186     void ModifierPickup::setAdditiveModifier(ModifierType::Enum type, float value)
     186    void ModifierPickup::setAdditiveModifier(ModifierType::Value type, float value)
    187187    {
    188188        if (this->additiveModifiers_.find(type) == this->additiveModifiers_.end())
    189             this->additiveModifiers_.insert( std::pair<ModifierType::Enum, float>(type, value) );
     189            this->additiveModifiers_.insert( std::pair<ModifierType::Value, float>(type, value) );
    190190        else
    191191            this->additiveModifiers_[type] = value;
     
    196196        @param value The new multiplicative modifier for type.
    197197    */
    198     void ModifierPickup::setMultiplicativeModifier(ModifierType::Enum type, float value)
     198    void ModifierPickup::setMultiplicativeModifier(ModifierType::Value type, float value)
    199199    {
    200200        if (this->multiplicativeModifiers_.find(type) == this->multiplicativeModifiers_.end())
    201             this->multiplicativeModifiers_.insert( std::pair<ModifierType::Enum, float>(type, value) );
     201            this->multiplicativeModifiers_.insert( std::pair<ModifierType::Value, float>(type, value) );
    202202        else
    203203            this->multiplicativeModifiers_[type] = value;
  • code/branches/core4/src/orxonox/objects/pickup/ModifierPickup.h

    r3196 r3257  
    130130        void timerCallback(Pawn* pawn);     //!< Method called when the timer runs out.
    131131    private:
    132         float getAdditiveModifier(ModifierType::Enum type) const;               //!< Get the additive modifier for a given ModifierType.
    133         float getMultiplicativeModifier(ModifierType::Enum type) const;         //!< Get the multiplicative modifier for a given ModifierType.
    134         void setAdditiveModifier(ModifierType::Enum type, float value);         //!< Set the additive modifier for a given ModifierType.
    135         void setMultiplicativeModifier(ModifierType::Enum type, float value);   //!< Set the multiplicative modifier for a given ModifierType
     132        float getAdditiveModifier(ModifierType::Value type) const;               //!< Get the additive modifier for a given ModifierType.
     133        float getMultiplicativeModifier(ModifierType::Value type) const;         //!< Get the multiplicative modifier for a given ModifierType.
     134        void setAdditiveModifier(ModifierType::Value type, float value);         //!< Set the additive modifier for a given ModifierType.
     135        void setMultiplicativeModifier(ModifierType::Value type, float value);   //!< Set the multiplicative modifier for a given ModifierType
    136136
    137         std::map<ModifierType::Enum, float> additiveModifiers_;                 //!< Map of additive modifiers, indexed by ModifierType.
    138         std::map<ModifierType::Enum, float> multiplicativeModifiers_;           //!< Map of multiplicative modifiers, indexed by ModifierType.
     137        std::map<ModifierType::Value, float> additiveModifiers_;                 //!< Map of additive modifiers, indexed by ModifierType.
     138        std::map<ModifierType::Value, float> multiplicativeModifiers_;           //!< Map of multiplicative modifiers, indexed by ModifierType.
    139139
    140140        float duration_;                                                        //!< Duration of this pickup's effect (0 for unlimited).
  • code/branches/core4/src/orxonox/objects/pickup/ModifierType.h

    r3196 r3257  
    4444            @brief Gives the available types for modifiers.
    4545        */
    46         enum Enum
     46        enum Value
    4747        {
    4848            Unknown = 0,
  • code/branches/core4/src/orxonox/objects/pickup/PickupCollection.cc

    r3239 r3257  
    4242{
    4343    typedef std::pair<std::multimap<std::string, BaseItem*>::iterator, std::multimap<std::string, BaseItem*>::iterator> item_range;
    44     typedef std::pair<std::multimap<ModifierType::Enum, float>::iterator, std::multimap<ModifierType::Enum, float>::iterator> modifier_range;
     44    typedef std::pair<std::multimap<ModifierType::Value, float>::iterator, std::multimap<ModifierType::Value, float>::iterator> modifier_range;
    4545
    4646    //! Constructor
     
    200200        @param value Value for the modifier.
    201201    */
    202     void PickupCollection::addAdditiveModifier(ModifierType::Enum type, float value)
    203     {
    204         this->additiveModifiers_.insert( std::pair<ModifierType::Enum, float>(type, value) );
     202    void PickupCollection::addAdditiveModifier(ModifierType::Value type, float value)
     203    {
     204        this->additiveModifiers_.insert( std::pair<ModifierType::Value, float>(type, value) );
    205205    }
    206206    /**
     
    209209        @return Returns the sum of the additive modifiers of the type.
    210210    */
    211     float PickupCollection::getAdditiveModifier(ModifierType::Enum type)
     211    float PickupCollection::getAdditiveModifier(ModifierType::Value type)
    212212    {
    213213        float v = 0.0f;
     
    215215        modifier_range range = this->additiveModifiers_.equal_range(type);
    216216
    217         for (std::multimap<ModifierType::Enum, float>::iterator it = range.first; it != range.second && it != this->additiveModifiers_.end(); it++)
     217        for (std::multimap<ModifierType::Value, float>::iterator it = range.first; it != range.second && it != this->additiveModifiers_.end(); it++)
    218218        {
    219219            v += (*it).second;
     
    227227        @param value Value which is to be removed.
    228228    */
    229     void PickupCollection::removeAdditiveModifier(ModifierType::Enum type, float value)
     229    void PickupCollection::removeAdditiveModifier(ModifierType::Value type, float value)
    230230    {
    231231        modifier_range range = this->additiveModifiers_.equal_range(type);
    232         for (std::multimap<ModifierType::Enum, float>::iterator it = range.first; it != range.second && it != this->additiveModifiers_.end(); it++)
     232        for (std::multimap<ModifierType::Value, float>::iterator it = range.first; it != range.second && it != this->additiveModifiers_.end(); it++)
    233233        {
    234234            if ((*it).second == value)
     
    244244        @param value Value for the modifier.
    245245    */
    246     void PickupCollection::addMultiplicativeModifier(ModifierType::Enum type, float value)
    247     {
    248         this->multiplicativeModifiers_.insert( std::pair<ModifierType::Enum, float>(type, value) );
     246    void PickupCollection::addMultiplicativeModifier(ModifierType::Value type, float value)
     247    {
     248        this->multiplicativeModifiers_.insert( std::pair<ModifierType::Value, float>(type, value) );
    249249    }
    250250    /**
     
    253253        @return Returns the product of the multiplicative modifiers of the type.
    254254    */
    255     float PickupCollection::getMultiplicativeModifier(ModifierType::Enum type)
     255    float PickupCollection::getMultiplicativeModifier(ModifierType::Value type)
    256256    {
    257257        float v = 1.0f;
    258258
    259259        modifier_range range = this->multiplicativeModifiers_.equal_range(type);
    260         for (std::multimap<ModifierType::Enum, float>::iterator it = range.first; it != range.second && it != this->multiplicativeModifiers_.end(); it++)
     260        for (std::multimap<ModifierType::Value, float>::iterator it = range.first; it != range.second && it != this->multiplicativeModifiers_.end(); it++)
    261261        {
    262262            v *= (*it).second;
     
    270270        @param value Value which is to be removed.
    271271    */
    272     void PickupCollection::removeMultiplicativeModifier(ModifierType::Enum type, float value)
     272    void PickupCollection::removeMultiplicativeModifier(ModifierType::Value type, float value)
    273273    {
    274274        modifier_range range = this->multiplicativeModifiers_.equal_range(type);
    275         for (std::multimap<ModifierType::Enum, float>::iterator it = range.first; it != range.second && it != this->multiplicativeModifiers_.end(); it++)
     275        for (std::multimap<ModifierType::Value, float>::iterator it = range.first; it != range.second && it != this->multiplicativeModifiers_.end(); it++)
    276276        {
    277277            if ((*it).second == value)
     
    289289        @return Returns the value after being processed.
    290290    */
    291     float PickupCollection::processModifiers(ModifierType::Enum type, float inputValue, bool addBeforeMultiplication)
     291    float PickupCollection::processModifiers(ModifierType::Value type, float inputValue, bool addBeforeMultiplication)
    292292    {
    293293        float outputValue = inputValue;
     
    310310        @return Returns the value after being processed.
    311311    */
    312     Vector3 PickupCollection::processModifiers(ModifierType::Enum type, Vector3 inputValue, bool addBeforeMultiplication)
     312    Vector3 PickupCollection::processModifiers(ModifierType::Value type, Vector3 inputValue, bool addBeforeMultiplication)
    313313    {
    314314        Vector3 outputValue = inputValue;
  • code/branches/core4/src/orxonox/objects/pickup/PickupCollection.h

    r3196 r3257  
    6767        void useItem(UsableItem* item);                                             //!< Use a usable item.
    6868
    69         void addAdditiveModifier(ModifierType::Enum type, float value);             //!< Add an additive modifier.
    70         void addMultiplicativeModifier(ModifierType::Enum type, float value);       //!< Add a multiplicative modifier.
     69        void addAdditiveModifier(ModifierType::Value type, float value);             //!< Add an additive modifier.
     70        void addMultiplicativeModifier(ModifierType::Value type, float value);       //!< Add a multiplicative modifier.
    7171
    72         float getAdditiveModifier(ModifierType::Enum type);                         //!< Get total additive modifier.
    73         float getMultiplicativeModifier(ModifierType::Enum type);                   //!< Get total multiplicative modifier.
     72        float getAdditiveModifier(ModifierType::Value type);                         //!< Get total additive modifier.
     73        float getMultiplicativeModifier(ModifierType::Value type);                   //!< Get total multiplicative modifier.
    7474
    75         void removeAdditiveModifier(ModifierType::Enum type, float value);          //!< Remove an additive modifier.
    76         void removeMultiplicativeModifier(ModifierType::Enum type, float value);    //!< Remove a multiplicative modifier.
     75        void removeAdditiveModifier(ModifierType::Value type, float value);          //!< Remove an additive modifier.
     76        void removeMultiplicativeModifier(ModifierType::Value type, float value);    //!< Remove a multiplicative modifier.
    7777
    78         float processModifiers(ModifierType::Enum type, float inputValue, bool addBeforeMultiplication = false);        //!< Apply the modifiers to a float.
    79         Vector3 processModifiers(ModifierType::Enum type, Vector3 inputValue, bool addBeforeMultiplication = false);    //!< Apply the modifiers to a Vector3.
     78        float processModifiers(ModifierType::Value type, float inputValue, bool addBeforeMultiplication = false);        //!< Apply the modifiers to a float.
     79        Vector3 processModifiers(ModifierType::Value type, Vector3 inputValue, bool addBeforeMultiplication = false);    //!< Apply the modifiers to a Vector3.
    8080
    8181        /**
     
    113113        bool bBlockRemovals_;   //!< Whether to block direct removals through remove().
    114114
    115         std::multimap<ModifierType::Enum, float> additiveModifiers_;        //!< Contains additive modifiers (indexed by ModifierType).
    116         std::multimap<ModifierType::Enum, float> multiplicativeModifiers_;  //!< Contains multiplicative modifiers (indexed by ModifierType).
     115        std::multimap<ModifierType::Value, float> additiveModifiers_;        //!< Contains additive modifiers (indexed by ModifierType).
     116        std::multimap<ModifierType::Value, float> multiplicativeModifiers_;  //!< Contains multiplicative modifiers (indexed by ModifierType).
    117117
    118118        std::multimap<std::string, BaseItem*> items_;                       //!< Map of items in the collection (indexed by pickupIdentifier of the items).
  • code/branches/core4/src/orxonox/objects/quest/GlobalQuest.cc

    r3196 r3257  
    147147            return false;
    148148        }
    149         return (this->isInactive(player) && !(this->status_ == questStatus::completed || this->status_ == questStatus::failed));
     149        return (this->isInactive(player) && !(this->status_ == QuestStatus::Completed || this->status_ == QuestStatus::Failed));
    150150    }
    151151
     
    189189        Throws an Exception if player is NULL.
    190190    */
    191     questStatus::Enum GlobalQuest::getStatus(const PlayerInfo* player) const
     191    QuestStatus::Value GlobalQuest::getStatus(const PlayerInfo* player) const
    192192    {
    193193        if(player == NULL) //!< We don't want NULL-Pointers!
     
    203203        }
    204204
    205         return questStatus::inactive;
     205        return QuestStatus::Inactive;
    206206    }
    207207
     
    217217        Returns false if player is NULL.
    218218    */
    219     bool GlobalQuest::setStatus(PlayerInfo* player, const questStatus::Enum & status)
     219    bool GlobalQuest::setStatus(PlayerInfo* player, const QuestStatus::Value & status)
    220220    {
    221221        if(player == NULL) //!< We don't want NULL-Pointers!
  • code/branches/core4/src/orxonox/objects/quest/GlobalQuest.h

    r3196 r3257  
    9797            virtual bool isCompletable(const PlayerInfo* player) const; //!< Checks whether the Quest can be completed.
    9898
    99             virtual questStatus::Enum getStatus(const PlayerInfo* player) const; //!< Returns the status of the Quest for a specific player.
     99            virtual QuestStatus::Value getStatus(const PlayerInfo* player) const; //!< Returns the status of the Quest for a specific player.
    100100           
    101             virtual bool setStatus(PlayerInfo* player, const questStatus::Enum & status); //!< Sets the status for a specific player.
     101            virtual bool setStatus(PlayerInfo* player, const QuestStatus::Value & status); //!< Sets the status for a specific player.
    102102
    103103        private:
    104104            std::set<PlayerInfo*> players_; //!< The set of players which possess this Quest.
    105             questStatus::Enum status_; //!< The status of this Quest.
     105            QuestStatus::Value status_; //!< The status of this Quest.
    106106            std::list<QuestEffect*> rewards_; //!< Reward QuestEffects only invoked on the player completing the Quest.
    107107           
  • code/branches/core4/src/orxonox/objects/quest/LocalQuest.cc

    r3196 r3257  
    176176        Throws an Exception if player is NULL.
    177177    */
    178     questStatus::Enum LocalQuest::getStatus(const PlayerInfo* player) const
     178    QuestStatus::Value LocalQuest::getStatus(const PlayerInfo* player) const
    179179    {
    180180        if(player == NULL) //!< No player has no defined status.
     
    183183        }
    184184
    185         std::map<const PlayerInfo*, questStatus::Enum>::const_iterator it = this->playerStatus_.find(player);
     185        std::map<const PlayerInfo*, QuestStatus::Value>::const_iterator it = this->playerStatus_.find(player);
    186186        if (it != this->playerStatus_.end()) //!< If there is a player in the map.
    187187        {
     
    189189        }
    190190       
    191         return questStatus::inactive; //!< If the player is not yet in the map, that means the status of the quest form him is 'inactive'.
     191        return QuestStatus::Inactive; //!< If the player is not yet in the map, that means the status of the quest form him is 'inactive'.
    192192    }
    193193
     
    203203        Returns false if player is NULL.
    204204    */
    205     bool LocalQuest::setStatus(PlayerInfo* player, const questStatus::Enum & status)
     205    bool LocalQuest::setStatus(PlayerInfo* player, const QuestStatus::Value & status)
    206206    {
    207207        if(player == NULL) //!< We can't set a status for no player.
  • code/branches/core4/src/orxonox/objects/quest/LocalQuest.h

    r3196 r3257  
    9191            virtual bool isCompletable(const PlayerInfo* player) const; //!< Checks whether the Quest can be completed.
    9292
    93             virtual questStatus::Enum getStatus(const PlayerInfo* player) const; //!< Returns the status of the Quest for a specific player.
    94             virtual bool setStatus(PlayerInfo* player, const questStatus::Enum & status); //!< Sets the status for a specific player.
     93            virtual QuestStatus::Value getStatus(const PlayerInfo* player) const; //!< Returns the status of the Quest for a specific player.
     94            virtual bool setStatus(PlayerInfo* player, const QuestStatus::Value & status); //!< Sets the status for a specific player.
    9595
    9696        private:
    97             std::map<const PlayerInfo*, questStatus::Enum> playerStatus_; //!< List of the status for each player, with the Player-pointer as key.
     97            std::map<const PlayerInfo*, QuestStatus::Value> playerStatus_; //!< List of the status for each player, with the Player-pointer as key.
    9898
    9999    };
  • code/branches/core4/src/orxonox/objects/quest/Quest.cc

    r3196 r3257  
    302302    bool Quest::isInactive(const PlayerInfo* player) const
    303303    {
    304         return this->getStatus(player) == questStatus::inactive;
     304        return this->getStatus(player) == QuestStatus::Inactive;
    305305    }
    306306
     
    318318    {
    319319
    320         return this->getStatus(player) == questStatus::active;
     320        return this->getStatus(player) == QuestStatus::Active;
    321321    }
    322322
     
    333333    bool Quest::isFailed(const PlayerInfo* player) const
    334334    {
    335         return this->getStatus(player) == questStatus::failed;
     335        return this->getStatus(player) == QuestStatus::Failed;
    336336    }
    337337
     
    348348    bool Quest::isCompleted(const PlayerInfo* player) const
    349349    {
    350         return this->getStatus(player) == questStatus::completed;
     350        return this->getStatus(player) == QuestStatus::Completed;
    351351    }
    352352   
     
    362362    {
    363363        QuestListener::advertiseStatusChange(this->listeners_, "fail"); //!< Tells the QuestListeners, that the status has changed to failed.
    364         this->setStatus(player, questStatus::failed);
     364        this->setStatus(player, QuestStatus::Failed);
    365365       
    366366        COUT(4) << "Quest {" << this->getId() << "} is failed for player: " << player << " ." <<std::endl;
     
    381381    {
    382382        QuestListener::advertiseStatusChange(this->listeners_, "complete"); //!< Tells the QuestListeners, that the status has changed to completed.
    383         this->setStatus(player, questStatus::completed);
     383        this->setStatus(player, QuestStatus::Completed);
    384384       
    385385        COUT(4) << "Quest {" << this->getId() << "} is completed for player: " << player << " ." <<std::endl;
     
    409409        QuestListener::advertiseStatusChange(this->listeners_, "start"); //!< Tells the QuestListeners, that the status has changed to active.
    410410       
    411         this->setStatus(player, questStatus::active);
     411        this->setStatus(player, QuestStatus::Active);
    412412       
    413413        this->getDescription()->sendAddQuestNotification();
  • code/branches/core4/src/orxonox/objects/quest/Quest.h

    r3196 r3257  
    4343namespace orxonox
    4444{
    45     namespace questStatus
     45    namespace QuestStatus
    4646    {
    47 
    4847        //!Different states of a Quest.
    49         enum Enum
     48        enum Value
    5049        {
    51             inactive,
    52             active,
    53             failed,
    54             completed
     50            Inactive,
     51            Active,
     52            Failed,
     53            Completed
    5554        };
    56 
    5755    }
    5856
     
    133131                { return this->completeEffects_; }
    134132
    135             virtual questStatus::Enum getStatus(const PlayerInfo* player) const = 0; //!< Returns the status of the Quest for a specific player.
    136             virtual bool setStatus(PlayerInfo* player, const questStatus::Enum & status) = 0; //!< Changes the status for a specific player.
     133            virtual QuestStatus::Value getStatus(const PlayerInfo* player) const = 0; //!< Returns the status of the Quest for a specific player.
     134            virtual bool setStatus(PlayerInfo* player, const QuestStatus::Value & status) = 0; //!< Changes the status for a specific player.
    137135           
    138136        private:
  • code/branches/core4/src/orxonox/objects/quest/QuestEffectBeacon.cc

    r3196 r3257  
    5353        RegisterObject(QuestEffectBeacon);
    5454       
    55         this->status_ = QuestEffectBeaconStatus::active;
     55        this->status_ = QuestEffectBeaconStatus::Active;
    5656        this->times_ = INFINITE_TIME;
    5757    }
     
    162162        if(activate)
    163163        {
    164         this->status_ = QuestEffectBeaconStatus::active;
    165         return true;
    166         }
    167        
    168         this->status_ = QuestEffectBeaconStatus::inactive;
     164        this->status_ = QuestEffectBeaconStatus::Active;
     165        return true;
     166        }
     167       
     168        this->status_ = QuestEffectBeaconStatus::Inactive;
    169169        return true;
    170170    }
     
    190190        if(this->getTimes() == 0) //!< Set the QuestEffectBeacon to inactive when the number of times it can be executed is reduced to 0.
    191191        {
    192             this->status_ = QuestEffectBeaconStatus::inactive;
     192            this->status_ = QuestEffectBeaconStatus::Inactive;
    193193        }
    194194       
  • code/branches/core4/src/orxonox/objects/quest/QuestEffectBeacon.h

    r3196 r3257  
    4444    namespace QuestEffectBeaconStatus
    4545    {
    46 
    4746        //! The status of the beacon, can be either active or inactive.
    48         enum Enum
     47        enum Value
    4948        {
    50             inactive,
    51             active
     49            Inactive,
     50            Active
    5251        };
    53 
    5452    }
    5553
     
    9896            */
    9997            inline bool isActive(void)
    100             { return this->status_ == QuestEffectBeaconStatus::active; }
     98            { return this->status_ == QuestEffectBeaconStatus::Active; }
    10199           
    102100            bool setActive(bool activate); //!< Set the status of the QuestEffectBeacon.
     
    117115            std::list<QuestEffect*> effects_; //!< The list of QuestEffects to be invoked on the executing player.
    118116            int times_; //!< Number of times the beacon can be exectued.
    119             QuestEffectBeaconStatus::Enum status_; //!< The status of the QUestEffectBeacon, Can be eighter active or inactive.
     117            QuestEffectBeaconStatus::Value status_; //!< The status of the QUestEffectBeacon, Can be eighter active or inactive.
    120118           
    121119            bool setTimes(const int & n); //!< Set the number of times the QuestEffectBeacon can be executed.
  • code/branches/core4/src/orxonox/objects/quest/QuestHint.cc

    r3196 r3257  
    9595
    9696        //! Find the player.
    97         std::map<const PlayerInfo*, questHintStatus::Enum>::const_iterator it = this->playerStatus_.find(player);
     97        std::map<const PlayerInfo*, QuestHintStatus::Value>::const_iterator it = this->playerStatus_.find(player);
    9898        if (it != this->playerStatus_.end()) //!< If the player is in the map.
    9999        {
     
    101101        }
    102102       
    103         return questStatus::inactive;
     103        return QuestStatus::Inactive;
    104104    }
    105105
     
    118118            if(!(this->isActive(player)))  //!< If the hint is already active, activation is pointless.
    119119            {
    120                 this->playerStatus_[player] = questHintStatus::active;
     120                this->playerStatus_[player] = QuestHintStatus::Active;
    121121               
    122122                this->getDescription()->sendAddHintNotification();
  • code/branches/core4/src/orxonox/objects/quest/QuestHint.h

    r3196 r3257  
    4242namespace orxonox
    4343{
    44     namespace questHintStatus
     44    namespace QuestHintStatus
    4545    {
    46 
    4746        //! The state of the hint.
    48         enum Enum
     47        enum Value
    4948        {
    50             inactive,
    51             active
     49            Inactive,
     50            Active
    5251        };
    53 
    5452    }
    5553
     
    9189        private:
    9290            Quest* quest_; //!< The Quest the QuestHint belongs to.
    93             std::map<const PlayerInfo*, questHintStatus::Enum> playerStatus_; //!< List of the states for each player, with the Player-pointer as key.
     91            std::map<const PlayerInfo*, QuestHintStatus::Value> playerStatus_; //!< List of the states for each player, with the Player-pointer as key.
    9492
    9593    };
  • code/branches/core4/src/orxonox/objects/quest/QuestListener.cc

    r3196 r3257  
    5151        RegisterObject(QuestListener);
    5252       
    53         this->mode_ = questListenerMode::all;
     53        this->mode_ = QuestListenerMode::All;
    5454        this->quest_ = NULL;
    5555    }
     
    132132        if(mode == "all")
    133133        {
    134             this->mode_ = questListenerMode::all;
     134            this->mode_ = QuestListenerMode::All;
    135135        }
    136136        else if(mode == "start")
    137137        {
    138             this->mode_ = questListenerMode::start;
     138            this->mode_ = QuestListenerMode::Start;
    139139        }
    140140        else if(mode == "fail")
    141141        {
    142             this->mode_ = questListenerMode::fail;
     142            this->mode_ = QuestListenerMode::Fail;
    143143        }
    144144        else if(mode == "complete")
    145145        {
    146             this->mode_ = questListenerMode::complete;
     146            this->mode_ = QuestListenerMode::Complete;
    147147        }
    148148        else
    149149        {
    150150            COUT(2) << "QuestListener with invalid mode '" << mode << "' created. Mode set to 'all'." << std::endl;
    151         this->mode_ = questListenerMode::all;
     151        this->mode_ = QuestListenerMode::All;
    152152        return false;
    153153        }
     
    164164    std::string QuestListener::getMode(void)
    165165    {
    166         if(this->mode_ == questListenerMode::all)
     166        if(this->mode_ == QuestListenerMode::All)
    167167        {
    168168            return "all";
    169169        }
    170         else if(this->mode_ == questListenerMode::start)
     170        else if(this->mode_ == QuestListenerMode::Start)
    171171        {
    172172            return "start";
    173173        }
    174         else if(this->mode_ == questListenerMode::fail)
     174        else if(this->mode_ == QuestListenerMode::Fail)
    175175        {
    176176            return "fail";
    177177        }
    178         else if(this->mode_ == questListenerMode::complete)
     178        else if(this->mode_ == QuestListenerMode::Complete)
    179179        {
    180180            return "complete";
  • code/branches/core4/src/orxonox/objects/quest/QuestListener.h

    r3196 r3257  
    4343namespace orxonox
    4444{
    45     namespace questListenerMode
     45    namespace QuestListenerMode
    4646    {
    47 
    4847        //! The mode of the QuestListener.
    49         enum Enum
     48        enum Value
    5049        {
    51             all,
    52             start,
    53             fail,
    54             complete
     50            All,
     51            Start,
     52            Fail,
     53            Complete
    5554        };
    56 
    5755    }
    5856
     
    9391       
    9492    private:
    95         questListenerMode::Enum mode_; //!< The mode of the QuestListener.
     93        QuestListenerMode::Value mode_; //!< The mode of the QuestListener.
    9694        Quest* quest_; //!< A pointer to the Quest the QuestListener is reacting to.
    9795   
  • code/branches/core4/src/orxonox/objects/weaponsystem/projectiles/ParticleProjectile.cc

    r3196 r3257  
    4444        if (GameMode::showsGraphics())
    4545        {
    46             this->particles_ = new ParticleInterface(this->getScene()->getSceneManager(), "Orxonox/shot3_small", LODParticle::normal);
     46            this->particles_ = new ParticleInterface(this->getScene()->getSceneManager(), "Orxonox/shot3_small", LODParticle::Normal);
    4747            this->attachOgreObject(this->particles_->getParticleSystem());
    4848            this->particles_->setKeepParticlesInLocalSpace(0);
  • code/branches/core4/src/orxonox/objects/worldentities/Backlight.cc

    r3196 r3257  
    108108    void Backlight::registerVariables()
    109109    {
    110         registerVariable(this->width_,         variableDirection::toclient, new NetworkCallback<Backlight>(this, &Backlight::update_width));
    111         registerVariable(this->lifetime_,      variableDirection::toclient, new NetworkCallback<Backlight>(this, &Backlight::update_lifetime));
    112         registerVariable(this->length_,        variableDirection::toclient, new NetworkCallback<Backlight>(this, &Backlight::update_length));
    113         registerVariable(this->maxelements_,   variableDirection::toclient, new NetworkCallback<Backlight>(this, &Backlight::update_maxelements));
    114         registerVariable(this->trailmaterial_, variableDirection::toclient, new NetworkCallback<Backlight>(this, &Backlight::update_trailmaterial));
     110        registerVariable(this->width_,         VariableDirection::ToClient, new NetworkCallback<Backlight>(this, &Backlight::update_width));
     111        registerVariable(this->lifetime_,      VariableDirection::ToClient, new NetworkCallback<Backlight>(this, &Backlight::update_lifetime));
     112        registerVariable(this->length_,        VariableDirection::ToClient, new NetworkCallback<Backlight>(this, &Backlight::update_length));
     113        registerVariable(this->maxelements_,   VariableDirection::ToClient, new NetworkCallback<Backlight>(this, &Backlight::update_maxelements));
     114        registerVariable(this->trailmaterial_, VariableDirection::ToClient, new NetworkCallback<Backlight>(this, &Backlight::update_trailmaterial));
    115115    }
    116116
  • code/branches/core4/src/orxonox/objects/worldentities/BigExplosion.cc

    r3239 r3257  
    5656*/
    5757        this->bStop_ = false;
    58         this->LOD_ = LODParticle::normal;
     58        this->LOD_ = LODParticle::Normal;
    5959
    6060/*      this->stf_ = "setTimeFactor ";
     
    307307    void BigExplosion::registerVariables()
    308308    {
    309         registerVariable((int&)(this->LOD_), variableDirection::toclient, new NetworkCallback<BigExplosion>(this, &BigExplosion::LODchanged));
    310         registerVariable(this->bStop_,       variableDirection::toclient, new NetworkCallback<BigExplosion>(this, &BigExplosion::checkStop));
     309        registerVariable((int&)(this->LOD_), VariableDirection::ToClient, new NetworkCallback<BigExplosion>(this, &BigExplosion::LODchanged));
     310        registerVariable(this->bStop_,       VariableDirection::ToClient, new NetworkCallback<BigExplosion>(this, &BigExplosion::checkStop));
    311311    }
    312312
  • code/branches/core4/src/orxonox/objects/worldentities/BigExplosion.h

    r3196 r3257  
    4747            void registerVariables();
    4848
    49             inline void setLOD(LODParticle::LOD level)
     49            inline void setLOD(LODParticle::Value level)
    5050                { this->LOD_ = level; this->LODchanged(); }
    51             inline LODParticle::LOD getLOD() const
     51            inline LODParticle::Value getLOD() const
    5252                { return this->LOD_; }
    5353
     
    9898            ParticleInterface*    explosionFire_;
    9999
    100             LODParticle::LOD      LOD_;
     100            LODParticle::Value      LOD_;
    101101            Timer<BigExplosion> destroyTimer_;
    102102    };
  • code/branches/core4/src/orxonox/objects/worldentities/Billboard.cc

    r3196 r3257  
    6969    void Billboard::registerVariables()
    7070    {
    71         registerVariable(this->material_, variableDirection::toclient, new NetworkCallback<Billboard>(this, &Billboard::changedMaterial));
    72         registerVariable(this->colour_,   variableDirection::toclient, new NetworkCallback<Billboard>(this, &Billboard::changedColour));
    73 //        registerVariable(this->rotation_, variableDirection::toclient, new NetworkCallback<Billboard>(this, &Billboard::changedRotation));
     71        registerVariable(this->material_, VariableDirection::ToClient, new NetworkCallback<Billboard>(this, &Billboard::changedMaterial));
     72        registerVariable(this->colour_,   VariableDirection::ToClient, new NetworkCallback<Billboard>(this, &Billboard::changedColour));
     73//        registerVariable(this->rotation_, VariableDirection::ToClient, new NetworkCallback<Billboard>(this, &Billboard::changedRotation));
    7474    }
    7575
  • code/branches/core4/src/orxonox/objects/worldentities/BlinkingBillboard.cc

    r3196 r3257  
    6666    void BlinkingBillboard::registerVariables()
    6767    {
    68 //        registerVariable(this->amplitude_, variableDirection::toclient);
    69 //        registerVariable(this->frequency_, variableDirection::toclient);
    70 //        registerVariable(this->phase_,     variableDirection::toclient);
     68//        registerVariable(this->amplitude_, VariableDirection::ToClient);
     69//        registerVariable(this->frequency_, VariableDirection::ToClient);
     70//        registerVariable(this->phase_,     VariableDirection::ToClient);
    7171    }
    7272
  • code/branches/core4/src/orxonox/objects/worldentities/ControllableEntity.cc

    r3239 r3257  
    7979
    8080        this->setConfigValues();
    81         this->setPriority( priority::very_high );
     81        this->setPriority( Priority::VeryHigh );
    8282        this->registerVariables();
    8383    }
     
    238238            {
    239239                this->client_overwrite_ = this->server_overwrite_;
    240                 this->setObjectMode(objectDirection::bidirectional);
     240                this->setObjectMode(ObjectDirection::Bidirectional);
    241241            }
    242242        }
     
    254254        this->bHasLocalController_ = false;
    255255        this->bHasHumanController_ = false;
    256         this->setObjectMode(objectDirection::toclient);
     256        this->setObjectMode(ObjectDirection::ToClient);
    257257
    258258        this->changedPlayer();
     
    368368    void ControllableEntity::registerVariables()
    369369    {
    370         registerVariable(this->cameraPositionTemplate_,  variableDirection::toclient);
    371         registerVariable(this->hudtemplate_,             variableDirection::toclient);
    372 
    373         registerVariable(this->server_position_,         variableDirection::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerPosition));
    374         registerVariable(this->server_linear_velocity_,  variableDirection::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerLinearVelocity));
    375         registerVariable(this->server_orientation_,      variableDirection::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerOrientation));
    376         registerVariable(this->server_angular_velocity_, variableDirection::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerAngularVelocity));
    377 
    378         registerVariable(this->server_overwrite_,        variableDirection::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processOverwrite));
    379         registerVariable(this->client_overwrite_,        variableDirection::toserver);
    380 
    381         registerVariable(this->client_position_,         variableDirection::toserver, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientPosition));
    382         registerVariable(this->client_linear_velocity_,  variableDirection::toserver, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientLinearVelocity));
    383         registerVariable(this->client_orientation_,      variableDirection::toserver, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientOrientation));
    384         registerVariable(this->client_angular_velocity_, variableDirection::toserver, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientAngularVelocity));
     370        registerVariable(this->cameraPositionTemplate_,  VariableDirection::ToClient);
     371        registerVariable(this->hudtemplate_,             VariableDirection::ToClient);
     372
     373        registerVariable(this->server_position_,         VariableDirection::ToClient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerPosition));
     374        registerVariable(this->server_linear_velocity_,  VariableDirection::ToClient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerLinearVelocity));
     375        registerVariable(this->server_orientation_,      VariableDirection::ToClient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerOrientation));
     376        registerVariable(this->server_angular_velocity_, VariableDirection::ToClient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerAngularVelocity));
     377
     378        registerVariable(this->server_overwrite_,        VariableDirection::ToClient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processOverwrite));
     379        registerVariable(this->client_overwrite_,        VariableDirection::ToServer);
     380
     381        registerVariable(this->client_position_,         VariableDirection::ToServer, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientPosition));
     382        registerVariable(this->client_linear_velocity_,  VariableDirection::ToServer, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientLinearVelocity));
     383        registerVariable(this->client_orientation_,      VariableDirection::ToServer, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientOrientation));
     384        registerVariable(this->client_angular_velocity_, VariableDirection::ToServer, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientAngularVelocity));
    385385       
    386386
    387         registerVariable(this->playerID_,                variableDirection::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::networkcallback_changedplayerID));
     387        registerVariable(this->playerID_,                VariableDirection::ToClient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::networkcallback_changedplayerID));
    388388    }
    389389
  • code/branches/core4/src/orxonox/objects/worldentities/ExplosionChunk.cc

    r3196 r3257  
    4848
    4949        this->bStop_ = false;
    50         this->LOD_ = LODParticle::normal;
     50        this->LOD_ = LODParticle::Normal;
    5151
    5252        if ( GameMode::showsGraphics() )
     
    104104    void ExplosionChunk::registerVariables()
    105105    {
    106         registerVariable((int&)(this->LOD_), variableDirection::toclient, new NetworkCallback<ExplosionChunk>(this, &ExplosionChunk::LODchanged));
    107         registerVariable(this->bStop_,       variableDirection::toclient, new NetworkCallback<ExplosionChunk>(this, &ExplosionChunk::checkStop));
     106        registerVariable((int&)(this->LOD_), VariableDirection::ToClient, new NetworkCallback<ExplosionChunk>(this, &ExplosionChunk::LODchanged));
     107        registerVariable(this->bStop_,       VariableDirection::ToClient, new NetworkCallback<ExplosionChunk>(this, &ExplosionChunk::checkStop));
    108108    }
    109109
  • code/branches/core4/src/orxonox/objects/worldentities/ExplosionChunk.h

    r3196 r3257  
    4646            void registerVariables();
    4747
    48             inline void setLOD(LODParticle::LOD level)
     48            inline void setLOD(LODParticle::Value level)
    4949                { this->LOD_ = level; this->LODchanged(); }
    50             inline LODParticle::LOD getLOD() const
     50            inline LODParticle::Value getLOD() const
    5151                { return this->LOD_; }
    5252
     
    6060            ParticleInterface*    fire_;
    6161            ParticleInterface*    smoke_;
    62             LODParticle::LOD      LOD_;
     62            LODParticle::Value      LOD_;
    6363            Timer<ExplosionChunk> destroyTimer_;
    6464    };
  • code/branches/core4/src/orxonox/objects/worldentities/FadingBillboard.cc

    r3196 r3257  
    6464    void FadingBillboard::registerVariables()
    6565    {
    66         registerVariable(this->turnontime_,  variableDirection::toclient);
    67         registerVariable(this->turnofftime_, variableDirection::toclient);
     66        registerVariable(this->turnontime_,  VariableDirection::ToClient);
     67        registerVariable(this->turnofftime_, VariableDirection::ToClient);
    6868    }
    6969
  • code/branches/core4/src/orxonox/objects/worldentities/Light.cc

    r3250 r3257  
    4545
    4646    // Be sure we don't do bad conversions
    47     BOOST_STATIC_ASSERT((int)Ogre::Light::LT_POINT       == (int)Light::LT_POINT);
    48     BOOST_STATIC_ASSERT((int)Ogre::Light::LT_DIRECTIONAL == (int)Light::LT_DIRECTIONAL);
    49     BOOST_STATIC_ASSERT((int)Ogre::Light::LT_SPOTLIGHT   == (int)Light::LT_SPOTLIGHT);
     47    BOOST_STATIC_ASSERT((int)Ogre::Light::LT_POINT       == (int)Light::Point);
     48    BOOST_STATIC_ASSERT((int)Ogre::Light::LT_DIRECTIONAL == (int)Light::Directional);
     49    BOOST_STATIC_ASSERT((int)Ogre::Light::LT_SPOTLIGHT   == (int)Light::Spotlight);
    5050
    5151    Light::Light(BaseObject* creator) : StaticEntity(creator)
     
    5656        this->diffuse_ = ColourValue::White;
    5757        this->specular_ = ColourValue::White;
    58         this->type_ = Light::LT_POINT;
     58        this->type_ = Light::Point;
    5959        this->attenuation_ = Vector4(100000, 1, 0, 0);
    6060        this->spotlightRange_ = Vector3(40.0f, 30.0f, 1.0f);
     
    106106    void Light::registerVariables()
    107107    {
    108         registerVariable((int&)this->type_,     variableDirection::toclient, new NetworkCallback<Light>(this, &Light::updateType));
    109         registerVariable(this->diffuse_,        variableDirection::toclient, new NetworkCallback<Light>(this, &Light::updateDiffuseColour));
    110         registerVariable(this->specular_,       variableDirection::toclient, new NetworkCallback<Light>(this, &Light::updateSpecularColour));
    111         registerVariable(this->attenuation_,    variableDirection::toclient, new NetworkCallback<Light>(this, &Light::updateAttenuation));
    112         registerVariable(this->spotlightRange_, variableDirection::toclient, new NetworkCallback<Light>(this, &Light::updateSpotlightRange));
     108        registerVariable((int&)this->type_,     VariableDirection::ToClient, new NetworkCallback<Light>(this, &Light::updateType));
     109        registerVariable(this->diffuse_,        VariableDirection::ToClient, new NetworkCallback<Light>(this, &Light::updateDiffuseColour));
     110        registerVariable(this->specular_,       VariableDirection::ToClient, new NetworkCallback<Light>(this, &Light::updateSpecularColour));
     111        registerVariable(this->attenuation_,    VariableDirection::ToClient, new NetworkCallback<Light>(this, &Light::updateAttenuation));
     112        registerVariable(this->spotlightRange_, VariableDirection::ToClient, new NetworkCallback<Light>(this, &Light::updateSpotlightRange));
    113113    }
    114114
     
    127127    void Light::updateAttenuation()
    128128    {
    129         if (this->light_ && this->type_ != Light::LT_DIRECTIONAL)
     129        if (this->light_ && this->type_ != Light::Directional)
    130130            this->light_->setAttenuation(this->attenuation_.x, this->attenuation_.y, this->attenuation_.z, this->attenuation_.w);
    131131    }
     
    133133    void Light::updateSpotlightRange()
    134134    {
    135         if (this->light_ && this->type_ == Light::LT_SPOTLIGHT)
     135        if (this->light_ && this->type_ == Light::Spotlight)
    136136            this->light_->setSpotlightRange(Degree(this->spotlightRange_.x), Degree(this->spotlightRange_.y), this->spotlightRange_.z);
    137137    }
     
    140140    {
    141141        if (type == "point")
    142             this->setType(Light::LT_POINT);
     142            this->setType(Light::Point);
    143143        else if (type == "directional")
    144             this->setType(Light::LT_DIRECTIONAL);
     144            this->setType(Light::Directional);
    145145        else if (type == "spotlight")
    146             this->setType(Light::LT_SPOTLIGHT);
     146            this->setType(Light::Spotlight);
    147147        else
    148             this->setType(Light::LT_POINT);
     148            this->setType(Light::Point);
    149149    }
    150150
     
    153153        switch (this->type_)
    154154        {
    155             case Light::LT_DIRECTIONAL:
     155            case Light::Directional:
    156156                return "directional";
    157             case Light::LT_SPOTLIGHT:
     157            case Light::Spotlight:
    158158                return "spotlight";
    159             case Light::LT_POINT:
     159            case Light::Point:
    160160            default:
    161161                return "point";
     
    169169            this->light_->setType(static_cast<Ogre::Light::LightTypes>(this->type_));
    170170
    171             if (this->type_ != Light::LT_DIRECTIONAL)
     171            if (this->type_ != Light::Directional)
    172172                this->updateAttenuation();
    173             if (this->type_ == Light::LT_SPOTLIGHT)
     173            if (this->type_ == Light::Spotlight)
    174174                this->updateSpotlightRange();
    175175        }
  • code/branches/core4/src/orxonox/objects/worldentities/Light.h

    r3196 r3257  
    4545            {
    4646                /// Point light sources give off light equally in all directions, so require only position not direction
    47                 LT_POINT,
     47                Point,
    4848                /// Directional lights simulate parallel light beams from a distant source, hence have direction but no position
    49                 LT_DIRECTIONAL,
     49                Directional,
    5050                /// Spotlights simulate a cone of light from a source so require position and direction, plus extra values for falloff
    51                 LT_SPOTLIGHT
     51                Spotlight
    5252            };
    5353
  • code/branches/core4/src/orxonox/objects/worldentities/Model.cc

    r3196 r3257  
    6565    void Model::registerVariables()
    6666    {
    67         registerVariable(this->meshSrc_,    variableDirection::toclient, new NetworkCallback<Model>(this, &Model::changedMesh));
    68         registerVariable(this->bCastShadows_, variableDirection::toclient, new NetworkCallback<Model>(this, &Model::changedShadows));
     67        registerVariable(this->meshSrc_,    VariableDirection::ToClient, new NetworkCallback<Model>(this, &Model::changedMesh));
     68        registerVariable(this->bCastShadows_, VariableDirection::ToClient, new NetworkCallback<Model>(this, &Model::changedShadows));
    6969    }
    7070
  • code/branches/core4/src/orxonox/objects/worldentities/MovableEntity.cc

    r3239 r3257  
    5252        this->continuousResynchroTimer_ = 0;
    5353
    54         this->setPriority(priority::low);
     54        this->setPriority(Priority::Low);
    5555
    5656        this->registerVariables();
     
    8989    void MovableEntity::registerVariables()
    9090    {
    91         registerVariable(this->linearVelocity_,        variableDirection::toclient, new NetworkCallback<MovableEntity>(this, &MovableEntity::processLinearVelocity));
    92         registerVariable(this->angularVelocity_,       variableDirection::toclient, new NetworkCallback<MovableEntity>(this, &MovableEntity::processAngularVelocity));
     91        registerVariable(this->linearVelocity_,        VariableDirection::ToClient, new NetworkCallback<MovableEntity>(this, &MovableEntity::processLinearVelocity));
     92        registerVariable(this->angularVelocity_,       VariableDirection::ToClient, new NetworkCallback<MovableEntity>(this, &MovableEntity::processAngularVelocity));
    9393
    94         registerVariable(this->overwrite_position_,    variableDirection::toclient, new NetworkCallback<MovableEntity>(this, &MovableEntity::overwritePosition));
    95         registerVariable(this->overwrite_orientation_, variableDirection::toclient, new NetworkCallback<MovableEntity>(this, &MovableEntity::overwriteOrientation));
     94        registerVariable(this->overwrite_position_,    VariableDirection::ToClient, new NetworkCallback<MovableEntity>(this, &MovableEntity::overwritePosition));
     95        registerVariable(this->overwrite_orientation_, VariableDirection::ToClient, new NetworkCallback<MovableEntity>(this, &MovableEntity::overwriteOrientation));
    9696    }
    9797
  • code/branches/core4/src/orxonox/objects/worldentities/ParticleEmitter.cc

    r3196 r3257  
    5353
    5454        this->particles_ = 0;
    55         this->LOD_ = LODParticle::normal;
     55        this->LOD_ = LODParticle::Normal;
    5656
    5757        this->registerVariables();
     
    7171        SUPER(ParticleEmitter, XMLPort, xmlelement, mode);
    7272
    73         XMLPortParam(ParticleEmitter, "lod",    setLODxml, getLODxml, xmlelement, mode).defaultValues(LODParticle::normal);
     73        XMLPortParam(ParticleEmitter, "lod",    setLODxml, getLODxml, xmlelement, mode).defaultValues(LODParticle::Normal);
    7474        XMLPortParam(ParticleEmitter, "source", setSource, getSource, xmlelement, mode);
    7575    }
     
    7777    void ParticleEmitter::registerVariables()
    7878    {
    79         registerVariable(this->source_, variableDirection::toclient, new NetworkCallback<ParticleEmitter>(this, &ParticleEmitter::sourceChanged));
    80         registerVariable((int&)(this->LOD_),    variableDirection::toclient, new NetworkCallback<ParticleEmitter>(this, &ParticleEmitter::LODchanged));
     79        registerVariable(this->source_, VariableDirection::ToClient, new NetworkCallback<ParticleEmitter>(this, &ParticleEmitter::sourceChanged));
     80        registerVariable((int&)(this->LOD_),    VariableDirection::ToClient, new NetworkCallback<ParticleEmitter>(this, &ParticleEmitter::LODchanged));
    8181    }
    8282
  • code/branches/core4/src/orxonox/objects/worldentities/ParticleEmitter.h

    r3196 r3257  
    5757                { return this->source_; }
    5858
    59             inline void setLOD(LODParticle::LOD level)
     59            inline void setLOD(LODParticle::Value level)
    6060                { this->LOD_ = level; this->LODchanged(); }
    61             inline LODParticle::LOD getLOD() const
     61            inline LODParticle::Value getLOD() const
    6262                { return this->LOD_; }
    6363
    6464        protected:
    6565            inline void setLODxml(unsigned int level)
    66                 { this->LOD_ = (LODParticle::LOD)level; this->LODchanged(); }
     66                { this->LOD_ = (LODParticle::Value)level; this->LODchanged(); }
    6767            inline unsigned int getLODxml() const
    6868                { return (unsigned int)this->LOD_; }
     
    7373            ParticleInterface* particles_;
    7474            std::string        source_;
    75             LODParticle::LOD   LOD_;
     75            LODParticle::Value   LOD_;
    7676    };
    7777}
  • code/branches/core4/src/orxonox/objects/worldentities/Planet.cc

    r3196 r3257  
    157157    void Planet::registerVariables()
    158158    {
    159         registerVariable(this->atmosphere_, variableDirection::toclient);
    160         registerVariable(this->meshSrc_, variableDirection::toclient, new NetworkCallback<Planet>(this, &Planet::changedMesh));
    161         registerVariable(this->bCastShadows_, variableDirection::toclient, new NetworkCallback<Planet>(this, &Planet::changedShadows));
    162         registerVariable(this->atmosphereSize, variableDirection::toclient);
    163         registerVariable(this->imageSize, variableDirection::toclient);
     159        registerVariable(this->atmosphere_, VariableDirection::ToClient);
     160        registerVariable(this->meshSrc_, VariableDirection::ToClient, new NetworkCallback<Planet>(this, &Planet::changedMesh));
     161        registerVariable(this->bCastShadows_, VariableDirection::ToClient, new NetworkCallback<Planet>(this, &Planet::changedShadows));
     162        registerVariable(this->atmosphereSize, VariableDirection::ToClient);
     163        registerVariable(this->imageSize, VariableDirection::ToClient);
    164164    }
    165165
  • code/branches/core4/src/orxonox/objects/worldentities/PongBall.cc

    r3239 r3257  
    7272        registerVariable( this->relMercyOffset_ );
    7373        registerVariable( this->batID_[0] );
    74         registerVariable( this->batID_[1], variableDirection::toclient, new NetworkCallback<PongBall>( this, &PongBall::applyBats) );
     74        registerVariable( this->batID_[1], VariableDirection::ToClient, new NetworkCallback<PongBall>( this, &PongBall::applyBats) );
    7575    }
    7676
  • code/branches/core4/src/orxonox/objects/worldentities/StaticEntity.cc

    r3196 r3257  
    4343        RegisterObject(StaticEntity);
    4444       
    45         this->setPriority(priority::very_low);
     45        this->setPriority(Priority::VeryLow);
    4646
    4747        this->registerVariables();
     
    5454    void StaticEntity::registerVariables()
    5555    {
    56         registerVariable(this->getPosition(),    variableDirection::toclient, new NetworkCallback<StaticEntity>(this, &StaticEntity::positionChanged));
    57         registerVariable(this->getOrientation(), variableDirection::toclient, new NetworkCallback<StaticEntity>(this, &StaticEntity::orientationChanged));
     56        registerVariable(this->getPosition(),    VariableDirection::ToClient, new NetworkCallback<StaticEntity>(this, &StaticEntity::positionChanged));
     57        registerVariable(this->getOrientation(), VariableDirection::ToClient, new NetworkCallback<StaticEntity>(this, &StaticEntity::orientationChanged));
    5858    }
    5959
  • code/branches/core4/src/orxonox/objects/worldentities/WorldEntity.cc

    r3239 r3257  
    175175    void WorldEntity::registerVariables()
    176176    {
    177         registerVariable(this->mainStateName_,  variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::changedMainState));
    178 
    179         registerVariable(this->bActive_,        variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::changedActivity));
    180         registerVariable(this->bVisible_,       variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::changedVisibility));
    181 
    182         registerVariable(this->getScale3D(),    variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::scaleChanged));
     177        registerVariable(this->mainStateName_,  VariableDirection::ToClient, new NetworkCallback<WorldEntity>(this, &WorldEntity::changedMainState));
     178
     179        registerVariable(this->bActive_,        VariableDirection::ToClient, new NetworkCallback<WorldEntity>(this, &WorldEntity::changedActivity));
     180        registerVariable(this->bVisible_,       VariableDirection::ToClient, new NetworkCallback<WorldEntity>(this, &WorldEntity::changedVisibility));
     181
     182        registerVariable(this->getScale3D(),    VariableDirection::ToClient, new NetworkCallback<WorldEntity>(this, &WorldEntity::scaleChanged));
    183183
    184184        // Physics stuff
    185         registerVariable(this->mass_,           variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::massChanged));
    186         registerVariable(this->restitution_,    variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::restitutionChanged));
    187         registerVariable(this->angularFactor_,  variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::angularFactorChanged));
    188         registerVariable(this->linearDamping_,  variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::linearDampingChanged));
    189         registerVariable(this->angularDamping_, variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::angularDampingChanged));
    190         registerVariable(this->friction_,       variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::frictionChanged));
     185        registerVariable(this->mass_,           VariableDirection::ToClient, new NetworkCallback<WorldEntity>(this, &WorldEntity::massChanged));
     186        registerVariable(this->restitution_,    VariableDirection::ToClient, new NetworkCallback<WorldEntity>(this, &WorldEntity::restitutionChanged));
     187        registerVariable(this->angularFactor_,  VariableDirection::ToClient, new NetworkCallback<WorldEntity>(this, &WorldEntity::angularFactorChanged));
     188        registerVariable(this->linearDamping_,  VariableDirection::ToClient, new NetworkCallback<WorldEntity>(this, &WorldEntity::linearDampingChanged));
     189        registerVariable(this->angularDamping_, VariableDirection::ToClient, new NetworkCallback<WorldEntity>(this, &WorldEntity::angularDampingChanged));
     190        registerVariable(this->friction_,       VariableDirection::ToClient, new NetworkCallback<WorldEntity>(this, &WorldEntity::frictionChanged));
    191191        registerVariable(this->bCollisionCallbackActive_,
    192                                                 variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::collisionCallbackActivityChanged));
     192                                                VariableDirection::ToClient, new NetworkCallback<WorldEntity>(this, &WorldEntity::collisionCallbackActivityChanged));
    193193        registerVariable(this->bCollisionResponseActive_,
    194                                                 variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::collisionResponseActivityChanged));
     194                                                VariableDirection::ToClient, new NetworkCallback<WorldEntity>(this, &WorldEntity::collisionResponseActivityChanged));
    195195        registerVariable((int&)this->collisionTypeSynchronised_,
    196                                                 variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::collisionTypeChanged));
     196                                                VariableDirection::ToClient, new NetworkCallback<WorldEntity>(this, &WorldEntity::collisionTypeChanged));
    197197        registerVariable(this->bPhysicsActiveSynchronised_,
    198                                                 variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::physicsActivityChanged));
     198                                                VariableDirection::ToClient, new NetworkCallback<WorldEntity>(this, &WorldEntity::physicsActivityChanged));
    199199
    200200        // Attach to parent if necessary
    201         registerVariable(this->parentID_,       variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::networkcallback_parentChanged));
     201        registerVariable(this->parentID_,       VariableDirection::ToClient, new NetworkCallback<WorldEntity>(this, &WorldEntity::networkcallback_parentChanged));
    202202    }
    203203
  • code/branches/core4/src/orxonox/objects/worldentities/pawns/Pawn.cc

    r3214 r3257  
    117117    void Pawn::registerVariables()
    118118    {
    119         registerVariable(this->bAlive_,        variableDirection::toclient);
    120         registerVariable(this->health_,        variableDirection::toclient);
    121         registerVariable(this->initialHealth_, variableDirection::toclient);
    122         registerVariable(this->bReload_,       variableDirection::toserver);
     119        registerVariable(this->bAlive_,        VariableDirection::ToClient);
     120        registerVariable(this->health_,        VariableDirection::ToClient);
     121        registerVariable(this->initialHealth_, VariableDirection::ToClient);
     122        registerVariable(this->bReload_,       VariableDirection::ToServer);
    123123    }
    124124
  • code/branches/core4/src/orxonox/objects/worldentities/pawns/SpaceShip.cc

    r3239 r3257  
    9090    void SpaceShip::registerVariables()
    9191    {
    92         registerVariable(this->primaryThrust_,  variableDirection::toclient);
    93         registerVariable(this->auxilaryThrust_, variableDirection::toclient);
    94         registerVariable(this->rotationThrust_, variableDirection::toclient);
     92        registerVariable(this->primaryThrust_,  VariableDirection::ToClient);
     93        registerVariable(this->auxilaryThrust_, VariableDirection::ToClient);
     94        registerVariable(this->rotationThrust_, VariableDirection::ToClient);
    9595    }
    9696
  • code/branches/core4/src/orxonox/objects/worldentities/pawns/Spectator.cc

    r3196 r3257  
    9393    void Spectator::registerVariables()
    9494    {
    95         registerVariable(this->bGreetingFlareVisible_, variableDirection::toclient, new NetworkCallback<Spectator>(this, &Spectator::changedFlareVisibility));
    96         registerVariable(this->bGreeting_,             variableDirection::toserver, new NetworkCallback<Spectator>(this, &Spectator::changedGreeting));
     95        registerVariable(this->bGreetingFlareVisible_, VariableDirection::ToClient, new NetworkCallback<Spectator>(this, &Spectator::changedFlareVisibility));
     96        registerVariable(this->bGreeting_,             VariableDirection::ToServer, new NetworkCallback<Spectator>(this, &Spectator::changedGreeting));
    9797    }
    9898
     
    145145        ControllableEntity::setPlayer(player);
    146146
    147 //        this->setObjectMode(objectDirection::toclient);
     147//        this->setObjectMode(ObjectDirection::ToClient);
    148148    }
    149149
  • code/branches/core4/src/orxonox/objects/worldentities/pawns/TeamBaseMatchBase.cc

    r3239 r3257  
    4343        RegisterObject(TeamBaseMatchBase);
    4444
    45         this->state_ = BaseState::uncontrolled;
     45        this->state_ = BaseState::Uncontrolled;
    4646
    4747        TeamBaseMatch* gametype = orxonox_cast<TeamBaseMatch*>(this->getGametype());
     
    6666        switch (this->state_)
    6767        {
    68             case BaseState::controlTeam1:
     68            case BaseState::ControlTeam1:
    6969                colour = gametype->getTeamColour(0);
    7070                break;
    71             case BaseState::controlTeam2:
     71            case BaseState::ControlTeam2:
    7272                colour = gametype->getTeamColour(1);
    7373                break;
    74             case BaseState::uncontrolled:
     74            case BaseState::Uncontrolled:
    7575            default:
    7676                colour = ColourValue(0.5, 0.5, 0.5, 1.0);
  • code/branches/core4/src/orxonox/objects/worldentities/pawns/TeamBaseMatchBase.h

    r3196 r3257  
    3838    namespace BaseState
    3939    {
    40         enum Enum
     40        enum Value
    4141        {
    42             uncontrolled,
    43             controlTeam1,
    44             controlTeam2,
     42            Uncontrolled,
     43            ControlTeam1,
     44            ControlTeam2,
    4545        };
    4646    }
     
    5858
    5959            // Set the state of a base to whatever the argument of the function is
    60             void setState(BaseState::Enum state)
     60            void setState(BaseState::Value state)
    6161            {
    6262                this->state_ = state;
     
    6666
    6767            // Get the state of a base as a return value
    68             BaseState::Enum getState() const
     68            BaseState::Value getState() const
    6969            {
    7070                return this->state_;
     
    7575            void changeTeamColour();
    7676
    77             BaseState::Enum state_;
     77            BaseState::Value state_;
    7878    };
    7979}
  • code/branches/core4/src/orxonox/objects/worldentities/triggers/DistanceTrigger.cc

    r3239 r3257  
    141141  }
    142142
    143   bool DistanceTrigger::isTriggered(TriggerMode mode)
     143  bool DistanceTrigger::isTriggered(TriggerMode::Value mode)
    144144  {
    145145    if (Trigger::isTriggered(mode))
  • code/branches/core4/src/orxonox/objects/worldentities/triggers/DistanceTrigger.h

    r3196 r3257  
    5959
    6060    protected:
    61       virtual bool isTriggered(TriggerMode mode);
     61      virtual bool isTriggered(TriggerMode::Value mode);
    6262      virtual void notifyMaskUpdate() {}
    6363
  • code/branches/core4/src/orxonox/objects/worldentities/triggers/EventTrigger.cc

    r3196 r3257  
    5454    }
    5555
    56     bool EventTrigger::isTriggered(TriggerMode mode)
     56    bool EventTrigger::isTriggered(TriggerMode::Value mode)
    5757    {
    5858        if (Trigger::isTriggered(mode))
  • code/branches/core4/src/orxonox/objects/worldentities/triggers/EventTrigger.h

    r3196 r3257  
    4747
    4848        protected:
    49             virtual bool isTriggered(TriggerMode mode);
     49            virtual bool isTriggered(TriggerMode::Value mode);
    5050
    5151        private:
  • code/branches/core4/src/orxonox/objects/worldentities/triggers/PlayerTrigger.h

    r3196 r3257  
    7070           
    7171    protected:
    72         virtual bool isTriggered(TriggerMode mode) = 0;
     72        virtual bool isTriggered(TriggerMode::Value mode) = 0;
    7373       
    7474        /**
  • code/branches/core4/src/orxonox/objects/worldentities/triggers/Trigger.cc

    r3196 r3257  
    4646    RegisterObject(Trigger);
    4747
    48     this->mode_ = TM_EventTriggerAND;
     48    this->mode_ = TriggerMode::EventTriggerAND;
    4949
    5050    this->bFirstTick_ = true;
     
    163163  }
    164164
    165   bool Trigger::isTriggered(TriggerMode mode)
     165  bool Trigger::isTriggered(TriggerMode::Value mode)
    166166  {
    167167//    if (this->bUpdating_)
     
    175175      switch (mode)
    176176      {
    177         case TM_EventTriggerAND:
     177        case TriggerMode::EventTriggerAND:
    178178          returnval = checkAnd();
    179179          break;
    180         case TM_EventTriggerOR:
     180        case TriggerMode::EventTriggerOR:
    181181          returnval = checkOr();
    182182          break;
    183         case TM_EventTriggerXOR:
     183        case TriggerMode::EventTriggerXOR:
    184184          returnval = checkXor();
    185185          break;
     
    270270  {
    271271    if (modeName == "and")
    272       this->setMode(TM_EventTriggerAND);
     272      this->setMode(TriggerMode::EventTriggerAND);
    273273    else if (modeName == "or")
    274       this->setMode(TM_EventTriggerOR);
     274      this->setMode(TriggerMode::EventTriggerOR);
    275275    else if (modeName == "xor")
    276       this->setMode(TM_EventTriggerXOR);
     276      this->setMode(TriggerMode::EventTriggerXOR);
    277277  }
    278278
    279279  std::string Trigger::getModeString() const
    280280  {
    281     if (this->mode_ == TM_EventTriggerAND)
     281    if (this->mode_ == TriggerMode::EventTriggerAND)
    282282      return std::string("and");
    283     else if (this->mode_ == TM_EventTriggerOR)
     283    else if (this->mode_ == TriggerMode::EventTriggerOR)
    284284      return std::string("or");
    285     else if (this->mode_ == TM_EventTriggerXOR)
     285    else if (this->mode_ == TriggerMode::EventTriggerXOR)
    286286      return std::string("xor");
    287287    else
  • code/branches/core4/src/orxonox/objects/worldentities/triggers/Trigger.h

    r3196 r3257  
    4141namespace orxonox
    4242{
    43   enum TriggerMode
     43  namespace TriggerMode
    4444  {
    45     TM_EventTriggerAND,
    46     TM_EventTriggerOR,
    47     TM_EventTriggerXOR,
    48   };
     45    enum Value
     46    {
     47      EventTriggerAND,
     48      EventTriggerOR,
     49      EventTriggerXOR,
     50    };
     51  }
    4952
    5053  class _OrxonoxExport Trigger : public StaticEntity, public Tickable
     
    6467
    6568      void setMode(const std::string& modeName);
    66       inline void setMode(TriggerMode mode)
     69      inline void setMode(TriggerMode::Value mode)
    6770        { this->mode_ = mode; }
    68       inline TriggerMode getMode() const
     71      inline TriggerMode::Value getMode() const
    6972        { return mode_; }
    7073
     
    103106    protected:
    104107      inline bool isTriggered() { return this->isTriggered(this->mode_); }
    105       virtual bool isTriggered(TriggerMode mode);
     108      virtual bool isTriggered(TriggerMode::Value mode);
    106109      virtual void triggered(bool bIsTriggered);
    107110
     
    118121      bool bFirstTick_;
    119122
    120       TriggerMode mode_;
     123      TriggerMode::Value mode_;
    121124      bool bInvertMode_;
    122125      bool bSwitch_;
  • code/branches/core4/src/orxonox/tools/ParticleInterface.cc

    r3196 r3257  
    5151    ParticleInterface* ParticleInterface::currentParticleInterface_s = 0;
    5252
    53     ParticleInterface::ParticleInterface(Ogre::SceneManager* scenemanager, const std::string& templateName, LODParticle::LOD detaillevel)
     53    ParticleInterface::ParticleInterface(Ogre::SceneManager* scenemanager, const std::string& templateName, LODParticle::Value detaillevel)
    5454    {
    5555        RegisterObject(ParticleInterface);
  • code/branches/core4/src/orxonox/tools/ParticleInterface.h

    r3196 r3257  
    4545    {
    4646        public:
    47             ParticleInterface(Ogre::SceneManager* scenemanager, const std::string& templateName, LODParticle::LOD detaillevel);
     47            ParticleInterface(Ogre::SceneManager* scenemanager, const std::string& templateName, LODParticle::Value detaillevel);
    4848            virtual ~ParticleInterface();
    4949
  • code/branches/core4/src/util/MultiType.cc

    r3196 r3257  
    4141        @param type The type
    4242    */
    43     bool MultiType::convert(MT_Type type)
     43    bool MultiType::convert(MT_Type::Value type)
    4444    {
    4545        switch (type)
    4646        {
    47             case MT_null:
     47            case MT_Type::Null:
    4848                this->reset(); return true;
    49             case MT_char:
     49            case MT_Type::Char:
    5050                return this->convert<char>(); break;
    51             case MT_uchar:
     51            case MT_Type::UnsignedChar:
    5252                return this->convert<unsigned char>(); break;
    53             case MT_short:
     53            case MT_Type::Short:
    5454                return this->convert<short>(); break;
    55             case MT_ushort:
     55            case MT_Type::UnsignedShort:
    5656                return this->convert<unsigned short>(); break;
    57             case MT_int:
     57            case MT_Type::Int:
    5858                return this->convert<int>(); break;
    59             case MT_uint:
     59            case MT_Type::UnsignedInt:
    6060                return this->convert<unsigned int>(); break;
    61             case MT_long:
     61            case MT_Type::Long:
    6262                return this->convert<long>(); break;
    63             case MT_ulong:
     63            case MT_Type::UnsignedLong:
    6464                return this->convert<unsigned long>(); break;
    65             case MT_longlong:
     65            case MT_Type::LongLong:
    6666                return this->convert<long long>(); break;
    67             case MT_ulonglong:
     67            case MT_Type::UnsignedLongLong:
    6868                return this->convert<unsigned long long>(); break;
    69             case MT_float:
     69            case MT_Type::Float:
    7070                return this->convert<float>(); break;
    71             case MT_double:
     71            case MT_Type::Double:
    7272                return this->convert<double>(); break;
    73             case MT_longdouble:
     73            case MT_Type::LongDouble:
    7474                return this->convert<long double>(); break;
    75             case MT_bool:
     75            case MT_Type::Bool:
    7676                return this->convert<bool>(); break;
    77             case MT_void:
     77            case MT_Type::VoidPointer:
    7878                return this->convert<void*>(); break;
    79             case MT_string:
     79            case MT_Type::String:
    8080                return this->convert<std::string>(); break;
    81             case MT_vector2:
     81            case MT_Type::Vector2:
    8282                return this->convert<orxonox::Vector2>(); break;
    83             case MT_vector3:
     83            case MT_Type::Vector3:
    8484                return this->convert<orxonox::Vector3>(); break;
    85             case MT_vector4:
     85            case MT_Type::Vector4:
    8686                return this->convert<orxonox::Vector4>(); break;
    87             case MT_colourvalue:
     87            case MT_Type::ColourValue:
    8888                return this->convert<orxonox::ColourValue>(); break;
    89             case MT_quaternion:
     89            case MT_Type::Quaternion:
    9090                return this->convert<orxonox::Quaternion>(); break;
    91             case MT_radian:
     91            case MT_Type::Radian:
    9292                return this->convert<orxonox::Radian>(); break;
    93             case MT_degree:
     93            case MT_Type::Degree:
    9494                return this->convert<orxonox::Degree>(); break;
    9595            default:
     
    104104    std::string MultiType::getTypename() const
    105105    {
    106         MT_Type type = (this->value_) ? this->value_->type_ : MT_null;
     106        MT_Type::Value type = (this->value_) ? this->value_->type_ : MT_Type::Null;
    107107
    108108        switch (type)
    109109        {
    110             case MT_char:
     110            case MT_Type::Char:
    111111                return "char"; break;
    112             case MT_uchar:
     112            case MT_Type::UnsignedChar:
    113113                return "unsigned char"; break;
    114             case MT_short:
     114            case MT_Type::Short:
    115115                return "short"; break;
    116             case MT_ushort:
     116            case MT_Type::UnsignedShort:
    117117                return "unsigned short"; break;
    118             case MT_int:
     118            case MT_Type::Int:
    119119                return "int"; break;
    120             case MT_uint:
     120            case MT_Type::UnsignedInt:
    121121                return "unsigned int"; break;
    122             case MT_long:
     122            case MT_Type::Long:
    123123                return "long"; break;
    124             case MT_ulong:
     124            case MT_Type::UnsignedLong:
    125125                return "unsigned long"; break;
    126             case MT_longlong:
     126            case MT_Type::LongLong:
    127127                return "long long"; break;
    128             case MT_ulonglong:
     128            case MT_Type::UnsignedLongLong:
    129129                return "unsigned long long"; break;
    130             case MT_float:
     130            case MT_Type::Float:
    131131                return "float"; break;
    132             case MT_double:
     132            case MT_Type::Double:
    133133                return "double"; break;
    134             case MT_longdouble:
     134            case MT_Type::LongDouble:
    135135                return "long double"; break;
    136             case MT_bool:
     136            case MT_Type::Bool:
    137137                return "bool"; break;
    138             case MT_void:
     138            case MT_Type::VoidPointer:
    139139                return "void*"; break;
    140             case MT_string:
     140            case MT_Type::String:
    141141                return "std::string"; break;
    142             case MT_vector2:
     142            case MT_Type::Vector2:
    143143                return "orxonox::Vector2"; break;
    144             case MT_vector3:
     144            case MT_Type::Vector3:
    145145                return "orxonox::Vector3"; break;
    146             case MT_vector4:
     146            case MT_Type::Vector4:
    147147                return "orxonox::Vector4"; break;
    148             case MT_colourvalue:
     148            case MT_Type::ColourValue:
    149149                return "orxonox::ColourValue"; break;
    150             case MT_quaternion:
     150            case MT_Type::Quaternion:
    151151                return "orxonox::Quaternion"; break;
    152             case MT_radian:
     152            case MT_Type::Radian:
    153153                return "orxonox::Radian"; break;
    154             case MT_degree:
     154            case MT_Type::Degree:
    155155                return "orxonox::Degree"; break;
    156156            default:
     
    159159    }
    160160
    161     MultiType::operator char()                 const { return (this->value_) ? ((this->value_->type_ == MT_char       ) ? (static_cast<MT_Value<char>                *>(this->value_))->value_ : (*this->value_)) : 0;                      } /** @brief Returns the current value, converted to the requested type. */
    162     MultiType::operator unsigned char()        const { return (this->value_) ? ((this->value_->type_ == MT_uchar      ) ? (static_cast<MT_Value<unsigned char>       *>(this->value_))->value_ : (*this->value_)) : 0;                      } /** @brief Returns the current value, converted to the requested type. */
    163     MultiType::operator short()                const { return (this->value_) ? ((this->value_->type_ == MT_short      ) ? (static_cast<MT_Value<short>               *>(this->value_))->value_ : (*this->value_)) : 0;                      } /** @brief Returns the current value, converted to the requested type. */
    164     MultiType::operator unsigned short()       const { return (this->value_) ? ((this->value_->type_ == MT_ushort     ) ? (static_cast<MT_Value<unsigned short>      *>(this->value_))->value_ : (*this->value_)) : 0;                      } /** @brief Returns the current value, converted to the requested type. */
    165     MultiType::operator int()                  const { return (this->value_) ? ((this->value_->type_ == MT_int        ) ? (static_cast<MT_Value<int>                 *>(this->value_))->value_ : (*this->value_)) : 0;                      } /** @brief Returns the current value, converted to the requested type. */
    166     MultiType::operator unsigned int()         const { return (this->value_) ? ((this->value_->type_ == MT_uint       ) ? (static_cast<MT_Value<unsigned int>        *>(this->value_))->value_ : (*this->value_)) : 0;                      } /** @brief Returns the current value, converted to the requested type. */
    167     MultiType::operator long()                 const { return (this->value_) ? ((this->value_->type_ == MT_long       ) ? (static_cast<MT_Value<long>                *>(this->value_))->value_ : (*this->value_)) : 0;                      } /** @brief Returns the current value, converted to the requested type. */
    168     MultiType::operator unsigned long()        const { return (this->value_) ? ((this->value_->type_ == MT_ulong      ) ? (static_cast<MT_Value<unsigned long>       *>(this->value_))->value_ : (*this->value_)) : 0;                      } /** @brief Returns the current value, converted to the requested type. */
    169     MultiType::operator long long()            const { return (this->value_) ? ((this->value_->type_ == MT_longlong   ) ? (static_cast<MT_Value<long long>           *>(this->value_))->value_ : (*this->value_)) : 0;                      } /** @brief Returns the current value, converted to the requested type. */
    170     MultiType::operator unsigned long long()   const { return (this->value_) ? ((this->value_->type_ == MT_ulonglong  ) ? (static_cast<MT_Value<unsigned long long>  *>(this->value_))->value_ : (*this->value_)) : 0;                      } /** @brief Returns the current value, converted to the requested type. */
    171     MultiType::operator float()                const { return (this->value_) ? ((this->value_->type_ == MT_float      ) ? (static_cast<MT_Value<float>               *>(this->value_))->value_ : (*this->value_)) : 0;                      } /** @brief Returns the current value, converted to the requested type. */
    172     MultiType::operator double()               const { return (this->value_) ? ((this->value_->type_ == MT_double     ) ? (static_cast<MT_Value<double>              *>(this->value_))->value_ : (*this->value_)) : 0;                      } /** @brief Returns the current value, converted to the requested type. */
    173     MultiType::operator long double()          const { return (this->value_) ? ((this->value_->type_ == MT_longdouble ) ? (static_cast<MT_Value<long double>         *>(this->value_))->value_ : (*this->value_)) : 0;                      } /** @brief Returns the current value, converted to the requested type. */
    174     MultiType::operator bool()                 const { return (this->value_) ? ((this->value_->type_ == MT_bool       ) ? (static_cast<MT_Value<bool>                *>(this->value_))->value_ : (*this->value_)) : 0;                      } /** @brief Returns the current value, converted to the requested type. */
    175     MultiType::operator void*()                const { return (this->value_) ? ((this->value_->type_ == MT_void       ) ? (static_cast<MT_Value<void*>               *>(this->value_))->value_ : (*this->value_)) : 0;                      } /** @brief Returns the current value, converted to the requested type. */
    176     MultiType::operator std::string()          const { return (this->value_) ? ((this->value_->type_ == MT_string     ) ? (static_cast<MT_Value<std::string>         *>(this->value_))->value_ : (*this->value_)) : NilValue<std::string>();          } /** @brief Returns the current value, converted to the requested type. */
    177     MultiType::operator orxonox::Vector2()     const { return (this->value_) ? ((this->value_->type_ == MT_vector2    ) ? (static_cast<MT_Value<orxonox::Vector2>    *>(this->value_))->value_ : (*this->value_)) : NilValue<orxonox::Vector2>();     } /** @brief Returns the current value, converted to the requested type. */
    178     MultiType::operator orxonox::Vector3()     const { return (this->value_) ? ((this->value_->type_ == MT_vector3    ) ? (static_cast<MT_Value<orxonox::Vector3>    *>(this->value_))->value_ : (*this->value_)) : NilValue<orxonox::Vector3>();     } /** @brief Returns the current value, converted to the requested type. */
    179     MultiType::operator orxonox::Vector4()     const { return (this->value_) ? ((this->value_->type_ == MT_vector4    ) ? (static_cast<MT_Value<orxonox::Vector4>    *>(this->value_))->value_ : (*this->value_)) : NilValue<orxonox::Vector4>();     } /** @brief Returns the current value, converted to the requested type. */
    180     MultiType::operator orxonox::ColourValue() const { return (this->value_) ? ((this->value_->type_ == MT_colourvalue) ? (static_cast<MT_Value<orxonox::ColourValue>*>(this->value_))->value_ : (*this->value_)) : NilValue<orxonox::ColourValue>(); } /** @brief Returns the current value, converted to the requested type. */
    181     MultiType::operator orxonox::Quaternion()  const { return (this->value_) ? ((this->value_->type_ == MT_quaternion ) ? (static_cast<MT_Value<orxonox::Quaternion> *>(this->value_))->value_ : (*this->value_)) : NilValue<orxonox::Quaternion>();  } /** @brief Returns the current value, converted to the requested type. */
    182     MultiType::operator orxonox::Radian()      const { return (this->value_) ? ((this->value_->type_ == MT_radian     ) ? (static_cast<MT_Value<orxonox::Radian>     *>(this->value_))->value_ : (*this->value_)) : NilValue<orxonox::Radian>();      } /** @brief Returns the current value, converted to the requested type. */
    183     MultiType::operator orxonox::Degree()      const { return (this->value_) ? ((this->value_->type_ == MT_degree     ) ? (static_cast<MT_Value<orxonox::Degree>     *>(this->value_))->value_ : (*this->value_)) : NilValue<orxonox::Degree>();      } /** @brief Returns the current value, converted to the requested type. */
    184 
    185     template <> void MultiType::createNewValueContainer(const char& value)                 { this->value_ = new MT_Value<char>                (value, MT_char       ); } /** @brief Creates a new value container for the given type. */
    186     template <> void MultiType::createNewValueContainer(const unsigned char& value)        { this->value_ = new MT_Value<unsigned char>       (value, MT_uchar      ); } /** @brief Creates a new value container for the given type. */
    187     template <> void MultiType::createNewValueContainer(const short& value)                { this->value_ = new MT_Value<short>               (value, MT_short      ); } /** @brief Creates a new value container for the given type. */
    188     template <> void MultiType::createNewValueContainer(const unsigned short& value)       { this->value_ = new MT_Value<unsigned short>      (value, MT_ushort     ); } /** @brief Creates a new value container for the given type. */
    189     template <> void MultiType::createNewValueContainer(const int& value)                  { this->value_ = new MT_Value<int>                 (value, MT_int        ); } /** @brief Creates a new value container for the given type. */
    190     template <> void MultiType::createNewValueContainer(const unsigned int& value)         { this->value_ = new MT_Value<unsigned int>        (value, MT_uint       ); } /** @brief Creates a new value container for the given type. */
    191     template <> void MultiType::createNewValueContainer(const long& value)                 { this->value_ = new MT_Value<long>                (value, MT_long       ); } /** @brief Creates a new value container for the given type. */
    192     template <> void MultiType::createNewValueContainer(const unsigned long& value)        { this->value_ = new MT_Value<unsigned long>       (value, MT_ulong      ); } /** @brief Creates a new value container for the given type. */
    193     template <> void MultiType::createNewValueContainer(const long long& value)            { this->value_ = new MT_Value<long long>           (value, MT_longlong   ); } /** @brief Creates a new value container for the given type. */
    194     template <> void MultiType::createNewValueContainer(const unsigned long long& value)   { this->value_ = new MT_Value<unsigned long long>  (value, MT_ulonglong  ); } /** @brief Creates a new value container for the given type. */
    195     template <> void MultiType::createNewValueContainer(const float& value)                { this->value_ = new MT_Value<float>               (value, MT_float      ); } /** @brief Creates a new value container for the given type. */
    196     template <> void MultiType::createNewValueContainer(const double& value)               { this->value_ = new MT_Value<double>              (value, MT_double     ); } /** @brief Creates a new value container for the given type. */
    197     template <> void MultiType::createNewValueContainer(const long double& value)          { this->value_ = new MT_Value<long double>         (value, MT_longdouble ); } /** @brief Creates a new value container for the given type. */
    198     template <> void MultiType::createNewValueContainer(const bool& value)                 { this->value_ = new MT_Value<bool>                (value, MT_bool       ); } /** @brief Creates a new value container for the given type. */
    199     template <> void MultiType::createNewValueContainer(      void* const& value)          { this->value_ = new MT_Value<void*>               (value, MT_void       ); } /** @brief Creates a new value container for the given type. */
    200     template <> void MultiType::createNewValueContainer(const std::string& value)          { this->value_ = new MT_Value<std::string>         (value, MT_string     ); } /** @brief Creates a new value container for the given type. */
    201     template <> void MultiType::createNewValueContainer(const orxonox::Vector2& value)     { this->value_ = new MT_Value<orxonox::Vector2>    (value, MT_vector2    ); } /** @brief Creates a new value container for the given type. */
    202     template <> void MultiType::createNewValueContainer(const orxonox::Vector3& value)     { this->value_ = new MT_Value<orxonox::Vector3>    (value, MT_vector3    ); } /** @brief Creates a new value container for the given type. */
    203     template <> void MultiType::createNewValueContainer(const orxonox::Vector4& value)     { this->value_ = new MT_Value<orxonox::Vector4>    (value, MT_vector4    ); } /** @brief Creates a new value container for the given type. */
    204     template <> void MultiType::createNewValueContainer(const orxonox::ColourValue& value) { this->value_ = new MT_Value<orxonox::ColourValue>(value, MT_colourvalue); } /** @brief Creates a new value container for the given type. */
    205     template <> void MultiType::createNewValueContainer(const orxonox::Quaternion& value)  { this->value_ = new MT_Value<orxonox::Quaternion> (value, MT_quaternion ); } /** @brief Creates a new value container for the given type. */
    206     template <> void MultiType::createNewValueContainer(const orxonox::Radian& value)      { this->value_ = new MT_Value<orxonox::Radian>     (value, MT_radian     ); } /** @brief Creates a new value container for the given type. */
    207     template <> void MultiType::createNewValueContainer(const orxonox::Degree& value)      { this->value_ = new MT_Value<orxonox::Degree>     (value, MT_degree     ); } /** @brief Creates a new value container for the given type. */
     161    MultiType::operator char()                 const { return (this->value_) ? ((this->value_->type_ == MT_Type::Char            ) ? (static_cast<MT_Value<char>                *>(this->value_))->value_ : (*this->value_)) : 0;                      } /** @brief Returns the current value, converted to the requested type. */
     162    MultiType::operator unsigned char()        const { return (this->value_) ? ((this->value_->type_ == MT_Type::UnsignedChar    ) ? (static_cast<MT_Value<unsigned char>       *>(this->value_))->value_ : (*this->value_)) : 0;                      } /** @brief Returns the current value, converted to the requested type. */
     163    MultiType::operator short()                const { return (this->value_) ? ((this->value_->type_ == MT_Type::Short           ) ? (static_cast<MT_Value<short>               *>(this->value_))->value_ : (*this->value_)) : 0;                      } /** @brief Returns the current value, converted to the requested type. */
     164    MultiType::operator unsigned short()       const { return (this->value_) ? ((this->value_->type_ == MT_Type::UnsignedShort   ) ? (static_cast<MT_Value<unsigned short>      *>(this->value_))->value_ : (*this->value_)) : 0;                      } /** @brief Returns the current value, converted to the requested type. */
     165    MultiType::operator int()                  const { return (this->value_) ? ((this->value_->type_ == MT_Type::Int             ) ? (static_cast<MT_Value<int>                 *>(this->value_))->value_ : (*this->value_)) : 0;                      } /** @brief Returns the current value, converted to the requested type. */
     166    MultiType::operator unsigned int()         const { return (this->value_) ? ((this->value_->type_ == MT_Type::UnsignedInt     ) ? (static_cast<MT_Value<unsigned int>        *>(this->value_))->value_ : (*this->value_)) : 0;                      } /** @brief Returns the current value, converted to the requested type. */
     167    MultiType::operator long()                 const { return (this->value_) ? ((this->value_->type_ == MT_Type::Long            ) ? (static_cast<MT_Value<long>                *>(this->value_))->value_ : (*this->value_)) : 0;                      } /** @brief Returns the current value, converted to the requested type. */
     168    MultiType::operator unsigned long()        const { return (this->value_) ? ((this->value_->type_ == MT_Type::UnsignedLong    ) ? (static_cast<MT_Value<unsigned long>       *>(this->value_))->value_ : (*this->value_)) : 0;                      } /** @brief Returns the current value, converted to the requested type. */
     169    MultiType::operator long long()            const { return (this->value_) ? ((this->value_->type_ == MT_Type::LongLong        ) ? (static_cast<MT_Value<long long>           *>(this->value_))->value_ : (*this->value_)) : 0;                      } /** @brief Returns the current value, converted to the requested type. */
     170    MultiType::operator unsigned long long()   const { return (this->value_) ? ((this->value_->type_ == MT_Type::UnsignedLongLong) ? (static_cast<MT_Value<unsigned long long>  *>(this->value_))->value_ : (*this->value_)) : 0;                      } /** @brief Returns the current value, converted to the requested type. */
     171    MultiType::operator float()                const { return (this->value_) ? ((this->value_->type_ == MT_Type::Float           ) ? (static_cast<MT_Value<float>               *>(this->value_))->value_ : (*this->value_)) : 0;                      } /** @brief Returns the current value, converted to the requested type. */
     172    MultiType::operator double()               const { return (this->value_) ? ((this->value_->type_ == MT_Type::Double          ) ? (static_cast<MT_Value<double>              *>(this->value_))->value_ : (*this->value_)) : 0;                      } /** @brief Returns the current value, converted to the requested type. */
     173    MultiType::operator long double()          const { return (this->value_) ? ((this->value_->type_ == MT_Type::LongDouble      ) ? (static_cast<MT_Value<long double>         *>(this->value_))->value_ : (*this->value_)) : 0;                      } /** @brief Returns the current value, converted to the requested type. */
     174    MultiType::operator bool()                 const { return (this->value_) ? ((this->value_->type_ == MT_Type::Bool            ) ? (static_cast<MT_Value<bool>                *>(this->value_))->value_ : (*this->value_)) : 0;                      } /** @brief Returns the current value, converted to the requested type. */
     175    MultiType::operator void*()                const { return (this->value_) ? ((this->value_->type_ == MT_Type::VoidPointer     ) ? (static_cast<MT_Value<void*>               *>(this->value_))->value_ : (*this->value_)) : 0;                      } /** @brief Returns the current value, converted to the requested type. */
     176    MultiType::operator std::string()          const { return (this->value_) ? ((this->value_->type_ == MT_Type::String          ) ? (static_cast<MT_Value<std::string>         *>(this->value_))->value_ : (*this->value_)) : NilValue<std::string>();          } /** @brief Returns the current value, converted to the requested type. */
     177    MultiType::operator orxonox::Vector2()     const { return (this->value_) ? ((this->value_->type_ == MT_Type::Vector2         ) ? (static_cast<MT_Value<orxonox::Vector2>    *>(this->value_))->value_ : (*this->value_)) : NilValue<orxonox::Vector2>();     } /** @brief Returns the current value, converted to the requested type. */
     178    MultiType::operator orxonox::Vector3()     const { return (this->value_) ? ((this->value_->type_ == MT_Type::Vector3         ) ? (static_cast<MT_Value<orxonox::Vector3>    *>(this->value_))->value_ : (*this->value_)) : NilValue<orxonox::Vector3>();     } /** @brief Returns the current value, converted to the requested type. */
     179    MultiType::operator orxonox::Vector4()     const { return (this->value_) ? ((this->value_->type_ == MT_Type::Vector4         ) ? (static_cast<MT_Value<orxonox::Vector4>    *>(this->value_))->value_ : (*this->value_)) : NilValue<orxonox::Vector4>();     } /** @brief Returns the current value, converted to the requested type. */
     180    MultiType::operator orxonox::ColourValue() const { return (this->value_) ? ((this->value_->type_ == MT_Type::ColourValue     ) ? (static_cast<MT_Value<orxonox::ColourValue>*>(this->value_))->value_ : (*this->value_)) : NilValue<orxonox::ColourValue>(); } /** @brief Returns the current value, converted to the requested type. */
     181    MultiType::operator orxonox::Quaternion()  const { return (this->value_) ? ((this->value_->type_ == MT_Type::Quaternion      ) ? (static_cast<MT_Value<orxonox::Quaternion> *>(this->value_))->value_ : (*this->value_)) : NilValue<orxonox::Quaternion>();  } /** @brief Returns the current value, converted to the requested type. */
     182    MultiType::operator orxonox::Radian()      const { return (this->value_) ? ((this->value_->type_ == MT_Type::Radian          ) ? (static_cast<MT_Value<orxonox::Radian>     *>(this->value_))->value_ : (*this->value_)) : NilValue<orxonox::Radian>();      } /** @brief Returns the current value, converted to the requested type. */
     183    MultiType::operator orxonox::Degree()      const { return (this->value_) ? ((this->value_->type_ == MT_Type::Degree          ) ? (static_cast<MT_Value<orxonox::Degree>     *>(this->value_))->value_ : (*this->value_)) : NilValue<orxonox::Degree>();      } /** @brief Returns the current value, converted to the requested type. */
     184
     185    template <> void MultiType::createNewValueContainer(const char& value)                 { this->value_ = new MT_Value<char>                (value, MT_Type::Char            ); } /** @brief Creates a new value container for the given type. */
     186    template <> void MultiType::createNewValueContainer(const unsigned char& value)        { this->value_ = new MT_Value<unsigned char>       (value, MT_Type::UnsignedChar    ); } /** @brief Creates a new value container for the given type. */
     187    template <> void MultiType::createNewValueContainer(const short& value)                { this->value_ = new MT_Value<short>               (value, MT_Type::Short           ); } /** @brief Creates a new value container for the given type. */
     188    template <> void MultiType::createNewValueContainer(const unsigned short& value)       { this->value_ = new MT_Value<unsigned short>      (value, MT_Type::UnsignedShort   ); } /** @brief Creates a new value container for the given type. */
     189    template <> void MultiType::createNewValueContainer(const int& value)                  { this->value_ = new MT_Value<int>                 (value, MT_Type::Int             ); } /** @brief Creates a new value container for the given type. */
     190    template <> void MultiType::createNewValueContainer(const unsigned int& value)         { this->value_ = new MT_Value<unsigned int>        (value, MT_Type::UnsignedInt     ); } /** @brief Creates a new value container for the given type. */
     191    template <> void MultiType::createNewValueContainer(const long& value)                 { this->value_ = new MT_Value<long>                (value, MT_Type::Long            ); } /** @brief Creates a new value container for the given type. */
     192    template <> void MultiType::createNewValueContainer(const unsigned long& value)        { this->value_ = new MT_Value<unsigned long>       (value, MT_Type::UnsignedLong    ); } /** @brief Creates a new value container for the given type. */
     193    template <> void MultiType::createNewValueContainer(const long long& value)            { this->value_ = new MT_Value<long long>           (value, MT_Type::LongLong        ); } /** @brief Creates a new value container for the given type. */
     194    template <> void MultiType::createNewValueContainer(const unsigned long long& value)   { this->value_ = new MT_Value<unsigned long long>  (value, MT_Type::UnsignedLongLong); } /** @brief Creates a new value container for the given type. */
     195    template <> void MultiType::createNewValueContainer(const float& value)                { this->value_ = new MT_Value<float>               (value, MT_Type::Float           ); } /** @brief Creates a new value container for the given type. */
     196    template <> void MultiType::createNewValueContainer(const double& value)               { this->value_ = new MT_Value<double>              (value, MT_Type::Double          ); } /** @brief Creates a new value container for the given type. */
     197    template <> void MultiType::createNewValueContainer(const long double& value)          { this->value_ = new MT_Value<long double>         (value, MT_Type::LongDouble      ); } /** @brief Creates a new value container for the given type. */
     198    template <> void MultiType::createNewValueContainer(const bool& value)                 { this->value_ = new MT_Value<bool>                (value, MT_Type::Bool            ); } /** @brief Creates a new value container for the given type. */
     199    template <> void MultiType::createNewValueContainer(      void* const& value)          { this->value_ = new MT_Value<void*>               (value, MT_Type::VoidPointer     ); } /** @brief Creates a new value container for the given type. */
     200    template <> void MultiType::createNewValueContainer(const std::string& value)          { this->value_ = new MT_Value<std::string>         (value, MT_Type::String          ); } /** @brief Creates a new value container for the given type. */
     201    template <> void MultiType::createNewValueContainer(const orxonox::Vector2& value)     { this->value_ = new MT_Value<orxonox::Vector2>    (value, MT_Type::Vector2         ); } /** @brief Creates a new value container for the given type. */
     202    template <> void MultiType::createNewValueContainer(const orxonox::Vector3& value)     { this->value_ = new MT_Value<orxonox::Vector3>    (value, MT_Type::Vector3         ); } /** @brief Creates a new value container for the given type. */
     203    template <> void MultiType::createNewValueContainer(const orxonox::Vector4& value)     { this->value_ = new MT_Value<orxonox::Vector4>    (value, MT_Type::Vector4         ); } /** @brief Creates a new value container for the given type. */
     204    template <> void MultiType::createNewValueContainer(const orxonox::ColourValue& value) { this->value_ = new MT_Value<orxonox::ColourValue>(value, MT_Type::ColourValue     ); } /** @brief Creates a new value container for the given type. */
     205    template <> void MultiType::createNewValueContainer(const orxonox::Quaternion& value)  { this->value_ = new MT_Value<orxonox::Quaternion> (value, MT_Type::Quaternion      ); } /** @brief Creates a new value container for the given type. */
     206    template <> void MultiType::createNewValueContainer(const orxonox::Radian& value)      { this->value_ = new MT_Value<orxonox::Radian>     (value, MT_Type::Radian          ); } /** @brief Creates a new value container for the given type. */
     207    template <> void MultiType::createNewValueContainer(const orxonox::Degree& value)      { this->value_ = new MT_Value<orxonox::Degree>     (value, MT_Type::Degree          ); } /** @brief Creates a new value container for the given type. */
    208208}
  • code/branches/core4/src/util/MultiType.h

    r3196 r3257  
    8282        @brief Enum of all possible types of a MultiType.
    8383    */
    84     enum MT_Type
     84    namespace MT_Type
    8585    {
    86         MT_null=0,
    87         MT_char=1,
    88         MT_uchar=2,
    89         MT_short=3,
    90         MT_ushort=4,
    91         MT_int=5,
    92         MT_uint=6,
    93         MT_long=7,
    94         MT_ulong=8,
    95         MT_longlong=9,
    96         MT_ulonglong=10,
    97         MT_float=11,
    98         MT_double=12,
    99         MT_longdouble=13,
    100         MT_bool=14,
    101         MT_void=15,
    102         MT_string=16,
    103         MT_vector2=17,
    104         MT_vector3=18,
    105         MT_vector4=19,
    106         MT_colourvalue=20,
    107         MT_quaternion=21,
    108         MT_radian=22,
    109         MT_degree=23
    110     };
     86        enum Value
     87        {
     88            Null,
     89            Char,
     90            UnsignedChar,
     91            Short,
     92            UnsignedShort,
     93            Int,
     94            UnsignedInt,
     95            Long,
     96            UnsignedLong,
     97            LongLong,
     98            UnsignedLongLong,
     99            Float,
     100            Double,
     101            LongDouble,
     102            Bool,
     103            VoidPointer,
     104            String,
     105            Vector2,
     106            Vector3,
     107            Vector4,
     108            ColourValue,
     109            Quaternion,
     110            Radian,
     111            Degree
     112        };
     113    }
    111114
    112115    /**
     
    140143        {
    141144        public:
    142             MT_ValueBase(MT_Type type) : type_(type), bHasDefaultValue_(false) {}
     145            MT_ValueBase(MT_Type::Value type) : type_(type), bHasDefaultValue_(false) {}
    143146            virtual ~MT_ValueBase() {}
    144147
     
    149152
    150153            /** @brief Returns the type of the current value. */
    151             const MT_Type& getType() const { return this->type_; }
     154            const MT_Type::Value& getType() const { return this->type_; }
    152155
    153156            /** @brief Checks whether the value is a default one. */
     
    232235            virtual uint8_t getSize() const=0;
    233236
    234             MT_Type type_;          //!< The type of the current value
     237            MT_Type::Value type_;   //!< The type of the current value
    235238            bool bHasDefaultValue_; //!< True if the last conversion wasn't successful
    236239        };
     
    263266            inline MultiType(const char* value)                 : value_(0) { this->setValue(std::string(value)); } /** @brief Constructor: Converts the char array to a std::string, assigns the value and sets the type. */
    264267            inline MultiType(const MultiType& other)            : value_(0) { this->setValue(other); }              /** @brief Copyconstructor: Assigns value and type of the other MultiType. */
    265             inline MultiType(MT_Type type)                      : value_(0) { this->setType(type); }                /** @brief Constructor: Sets the type, the next assignment will determine the value. */
     268            inline MultiType(MT_Type::Value type)               : value_(0) { this->setType(type); }                /** @brief Constructor: Sets the type, the next assignment will determine the value. */
    266269
    267270            /** @brief Destructor: Deletes the MT_Value. */
     
    271274            template <typename V> inline const MultiType& operator=(V* value)               { this->setValue(value); return (*this); } /** @brief Assigns a pointer. */
    272275            inline                       const MultiType& operator=(const MultiType& other) { this->setValue(other); return (*this); } /** @brief Assigns the value of the other MultiType and converts it to the current type of the MultiType. */
    273             inline                       const MultiType& operator=(MT_Type type)           { this->setType(type);   return (*this); } /** @brief Resets the value and changes the type. */
     276            inline                       const MultiType& operator=(MT_Type::Value type)    { this->setType(type);   return (*this); } /** @brief Resets the value and changes the type. */
    274277
    275278            inline bool                                   setValue(const char& value);
     
    310313            template <typename T> inline bool convert()                       { return this->setValue<T>((T)(*this));  } /** @brief Converts the current value to type T. */
    311314            inline bool                       convert(const MultiType& other) { return this->convert(other.getType()); } /** @brief Converts the current value to the type of the other MultiType. */
    312             bool                              convert(MT_Type type);
    313 
    314             /** @brief Current content gets deleted. New type is MT_null */
     315            bool                              convert(MT_Type::Value type);
     316
     317            /** @brief Current content gets deleted. New type is MT_Type::Null */
    315318            inline void                       reset()                         { if (this->value_) delete this->value_; this->value_ = 0; }
    316319            /** @brief Current content gets overridden with default zero value */
     
    319322            template <typename T> inline void setType()                       { this->assignValue(T());                                 } /** @brief Resets the value and changes the internal type to T. */
    320323            inline void                       setType(const MultiType& other) { this->setType(other.getType());                         } /** @brief Resets the value and changes the internal type to the type of the other MultiType. */
    321             inline void                       setType(MT_Type type)           { this->reset(); this->convert(type); this->resetValue(); } /** @brief Resets the value and changes the internal type to the given type. */
     324            inline void                       setType(MT_Type::Value type)    { this->reset(); this->convert(type); this->resetValue(); } /** @brief Resets the value and changes the internal type to the given type. */
    322325
    323326            /** @brief Returns the current type. */
    324             inline MT_Type                    getType()                 const { return (this->value_) ? this->value_->type_ : MT_null; }
     327            inline MT_Type::Value             getType()                   const { return (this->value_) ? this->value_->type_ : MT_Type::Null; }
    325328            /** @brief Returns true if the current type equals the given type. */
    326             inline bool                       isType(MT_Type type)      const { return (this->value_) ? (this->value_->type_ == type) : (type == MT_null); }
     329            inline bool                       isType(MT_Type::Value type) const { return (this->value_) ? (this->value_->type_ == type) : (type == MT_Type::Null); }
    327330            /** @brief Returns true if the current type is T. */
    328             template <typename T> inline bool isType()                  const { return false; } // Only works for specialized values - see below
    329             std::string                       getTypename()             const;
     331            template <typename T> inline bool isType()                    const { return false; } // Only works for specialized values - see below
     332            std::string                       getTypename()               const;
    330333           
    331334            /** @brief Saves the value of the MT to a bytestream (pointed at by mem) and increases mem pointer by size of MT */
    332             inline void                       exportData(uint8_t*& mem) const { assert(sizeof(MT_Type)<=8); *(uint8_t*)(mem) = this->getType(); mem+=sizeof(uint8_t); this->value_->exportData(mem); }
     335            inline void                       exportData(uint8_t*& mem) const { assert(sizeof(MT_Type::Value)<=8); *(uint8_t*)(mem) = this->getType(); mem+=sizeof(uint8_t); this->value_->exportData(mem); }
    333336            /** @brief Loads the value of the MT from a bytestream (pointed at by mem) and increases mem pointer by size of MT */
    334             inline void                       importData(uint8_t*& mem) { assert(sizeof(MT_Type)<=8); this->setType(static_cast<MT_Type>(*(uint8_t*)mem)); mem+=sizeof(uint8_t); this->value_->importData(mem); }
     337            inline void                       importData(uint8_t*& mem) { assert(sizeof(MT_Type::Value)<=8); this->setType(static_cast<MT_Type::Value>(*(uint8_t*)mem)); mem+=sizeof(uint8_t); this->value_->importData(mem); }
    335338            /** @brief Saves the value of the MT to a bytestream and increases pointer to bytestream by size of MT */
    336339            inline uint8_t*&                  operator << (uint8_t*& mem) { importData(mem); return mem; }
     
    418421
    419422        private:
    420             inline bool assignValue(const char& value)                 { if (this->value_ && this->value_->type_ == MT_char)        { return this->value_->setValue(value); } else { this->changeValueContainer<char>(value);                 return true; } } /** @brief Assigns a new value by changing type and creating a new container. */
    421             inline bool assignValue(const unsigned char& value)        { if (this->value_ && this->value_->type_ == MT_uchar)       { return this->value_->setValue(value); } else { this->changeValueContainer<unsigned char>(value);        return true; } } /** @brief Assigns a new value by changing type and creating a new container. */
    422             inline bool assignValue(const short& value)                { if (this->value_ && this->value_->type_ == MT_short)       { return this->value_->setValue(value); } else { this->changeValueContainer<short>(value);                return true; } } /** @brief Assigns a new value by changing type and creating a new container. */
    423             inline bool assignValue(const unsigned short& value)       { if (this->value_ && this->value_->type_ == MT_ushort)      { return this->value_->setValue(value); } else { this->changeValueContainer<unsigned short>(value);       return true; } } /** @brief Assigns a new value by changing type and creating a new container. */
    424             inline bool assignValue(const int& value)                  { if (this->value_ && this->value_->type_ == MT_int)         { return this->value_->setValue(value); } else { this->changeValueContainer<int>(value);                  return true; } } /** @brief Assigns a new value by changing type and creating a new container. */
    425             inline bool assignValue(const unsigned int& value)         { if (this->value_ && this->value_->type_ == MT_uint)        { return this->value_->setValue(value); } else { this->changeValueContainer<unsigned int>(value);         return true; } } /** @brief Assigns a new value by changing type and creating a new container. */
    426             inline bool assignValue(const long& value)                 { if (this->value_ && this->value_->type_ == MT_long)        { return this->value_->setValue(value); } else { this->changeValueContainer<long>(value);                 return true; } } /** @brief Assigns a new value by changing type and creating a new container. */
    427             inline bool assignValue(const unsigned long& value)        { if (this->value_ && this->value_->type_ == MT_ulong)       { return this->value_->setValue(value); } else { this->changeValueContainer<unsigned long>(value);        return true; } } /** @brief Assigns a new value by changing type and creating a new container. */
    428             inline bool assignValue(const long long& value)            { if (this->value_ && this->value_->type_ == MT_longlong)    { return this->value_->setValue(value); } else { this->changeValueContainer<long long>(value);            return true; } } /** @brief Assigns a new value by changing type and creating a new container. */
    429             inline bool assignValue(const unsigned long long& value)   { if (this->value_ && this->value_->type_ == MT_ulonglong)  { return this->value_->setValue(value); } else { this->changeValueContainer<unsigned long long>(value);   return true; } } /** @brief Assigns a new value by changing type and creating a new container. */
    430             inline bool assignValue(const float& value)                { if (this->value_ && this->value_->type_ == MT_float)       { return this->value_->setValue(value); } else { this->changeValueContainer<float>(value);                return true; } } /** @brief Assigns a new value by changing type and creating a new container. */
    431             inline bool assignValue(const double& value)               { if (this->value_ && this->value_->type_ == MT_double)      { return this->value_->setValue(value); } else { this->changeValueContainer<double>(value);               return true; } } /** @brief Assigns a new value by changing type and creating a new container. */
    432             inline bool assignValue(const long double& value)          { if (this->value_ && this->value_->type_ == MT_longdouble)  { return this->value_->setValue(value); } else { this->changeValueContainer<long double>(value);          return true; } } /** @brief Assigns a new value by changing type and creating a new container. */
    433             inline bool assignValue(const bool& value)                 { if (this->value_ && this->value_->type_ == MT_bool)        { return this->value_->setValue(value); } else { this->changeValueContainer<bool>(value);                 return true; } } /** @brief Assigns a new value by changing type and creating a new container. */
    434             inline bool assignValue(      void* const& value)          { if (this->value_ && this->value_->type_ == MT_void)        { return this->value_->setValue(value); } else { this->changeValueContainer<void*>(value);                return true; } } /** @brief Assigns a new value by changing type and creating a new container. */
    435             inline bool assignValue(const std::string& value)          { if (this->value_ && this->value_->type_ == MT_string)      { return this->value_->setValue(value); } else { this->changeValueContainer<std::string>(value);          return true; } } /** @brief Assigns a new value by changing type and creating a new container. */
    436             inline bool assignValue(const orxonox::Vector2& value)     { if (this->value_ && this->value_->type_ == MT_vector2)     { return this->value_->setValue(value); } else { this->changeValueContainer<orxonox::Vector2>(value);     return true; } } /** @brief Assigns a new value by changing type and creating a new container. */
    437             inline bool assignValue(const orxonox::Vector3& value)     { if (this->value_ && this->value_->type_ == MT_vector3)     { return this->value_->setValue(value); } else { this->changeValueContainer<orxonox::Vector3>(value);     return true; } } /** @brief Assigns a new value by changing type and creating a new container. */
    438             inline bool assignValue(const orxonox::Vector4& value)     { if (this->value_ && this->value_->type_ == MT_vector4)     { return this->value_->setValue(value); } else { this->changeValueContainer<orxonox::Vector4>(value);     return true; } } /** @brief Assigns a new value by changing type and creating a new container. */
    439             inline bool assignValue(const orxonox::ColourValue& value) { if (this->value_ && this->value_->type_ == MT_colourvalue) { return this->value_->setValue(value); } else { this->changeValueContainer<orxonox::ColourValue>(value); return true; } } /** @brief Assigns a new value by changing type and creating a new container. */
    440             inline bool assignValue(const orxonox::Quaternion& value)  { if (this->value_ && this->value_->type_ == MT_quaternion)  { return this->value_->setValue(value); } else { this->changeValueContainer<orxonox::Quaternion>(value);  return true; } } /** @brief Assigns a new value by changing type and creating a new container. */
    441             inline bool assignValue(const orxonox::Radian& value)      { if (this->value_ && this->value_->type_ == MT_radian)      { return this->value_->setValue(value); } else { this->changeValueContainer<orxonox::Radian>(value);      return true; } } /** @brief Assigns a new value by changing type and creating a new container. */
    442             inline bool assignValue(const orxonox::Degree& value)      { if (this->value_ && this->value_->type_ == MT_degree)      { return this->value_->setValue(value); } else { this->changeValueContainer<orxonox::Degree>(value);      return true; } } /** @brief Assigns a new value by changing type and creating a new container. */
     423            inline bool assignValue(const char& value)                 { if (this->value_ && this->value_->type_ == MT_Type::Char)             { return this->value_->setValue(value); } else { this->changeValueContainer<char>(value);                 return true; } } /** @brief Assigns a new value by changing type and creating a new container. */
     424            inline bool assignValue(const unsigned char& value)        { if (this->value_ && this->value_->type_ == MT_Type::UnsignedChar)     { return this->value_->setValue(value); } else { this->changeValueContainer<unsigned char>(value);        return true; } } /** @brief Assigns a new value by changing type and creating a new container. */
     425            inline bool assignValue(const short& value)                { if (this->value_ && this->value_->type_ == MT_Type::Short)            { return this->value_->setValue(value); } else { this->changeValueContainer<short>(value);                return true; } } /** @brief Assigns a new value by changing type and creating a new container. */
     426            inline bool assignValue(const unsigned short& value)       { if (this->value_ && this->value_->type_ == MT_Type::UnsignedShort)    { return this->value_->setValue(value); } else { this->changeValueContainer<unsigned short>(value);       return true; } } /** @brief Assigns a new value by changing type and creating a new container. */
     427            inline bool assignValue(const int& value)                  { if (this->value_ && this->value_->type_ == MT_Type::Int)              { return this->value_->setValue(value); } else { this->changeValueContainer<int>(value);                  return true; } } /** @brief Assigns a new value by changing type and creating a new container. */
     428            inline bool assignValue(const unsigned int& value)         { if (this->value_ && this->value_->type_ == MT_Type::UnsignedInt)      { return this->value_->setValue(value); } else { this->changeValueContainer<unsigned int>(value);         return true; } } /** @brief Assigns a new value by changing type and creating a new container. */
     429            inline bool assignValue(const long& value)                 { if (this->value_ && this->value_->type_ == MT_Type::Long)             { return this->value_->setValue(value); } else { this->changeValueContainer<long>(value);                 return true; } } /** @brief Assigns a new value by changing type and creating a new container. */
     430            inline bool assignValue(const unsigned long& value)        { if (this->value_ && this->value_->type_ == MT_Type::UnsignedLong)     { return this->value_->setValue(value); } else { this->changeValueContainer<unsigned long>(value);        return true; } } /** @brief Assigns a new value by changing type and creating a new container. */
     431            inline bool assignValue(const long long& value)            { if (this->value_ && this->value_->type_ == MT_Type::LongLong)         { return this->value_->setValue(value); } else { this->changeValueContainer<long long>(value);            return true; } } /** @brief Assigns a new value by changing type and creating a new container. */
     432            inline bool assignValue(const unsigned long long& value)   { if (this->value_ && this->value_->type_ == MT_Type::UnsignedLongLong) { return this->value_->setValue(value); } else { this->changeValueContainer<unsigned long long>(value);   return true; } } /** @brief Assigns a new value by changing type and creating a new container. */
     433            inline bool assignValue(const float& value)                { if (this->value_ && this->value_->type_ == MT_Type::Float)            { return this->value_->setValue(value); } else { this->changeValueContainer<float>(value);                return true; } } /** @brief Assigns a new value by changing type and creating a new container. */
     434            inline bool assignValue(const double& value)               { if (this->value_ && this->value_->type_ == MT_Type::Double)           { return this->value_->setValue(value); } else { this->changeValueContainer<double>(value);               return true; } } /** @brief Assigns a new value by changing type and creating a new container. */
     435            inline bool assignValue(const long double& value)          { if (this->value_ && this->value_->type_ == MT_Type::LongDouble)       { return this->value_->setValue(value); } else { this->changeValueContainer<long double>(value);          return true; } } /** @brief Assigns a new value by changing type and creating a new container. */
     436            inline bool assignValue(const bool& value)                 { if (this->value_ && this->value_->type_ == MT_Type::Bool)             { return this->value_->setValue(value); } else { this->changeValueContainer<bool>(value);                 return true; } } /** @brief Assigns a new value by changing type and creating a new container. */
     437            inline bool assignValue(      void* const& value)          { if (this->value_ && this->value_->type_ == MT_Type::VoidPointer)      { return this->value_->setValue(value); } else { this->changeValueContainer<void*>(value);                return true; } } /** @brief Assigns a new value by changing type and creating a new container. */
     438            inline bool assignValue(const std::string& value)          { if (this->value_ && this->value_->type_ == MT_Type::String)           { return this->value_->setValue(value); } else { this->changeValueContainer<std::string>(value);          return true; } } /** @brief Assigns a new value by changing type and creating a new container. */
     439            inline bool assignValue(const orxonox::Vector2& value)     { if (this->value_ && this->value_->type_ == MT_Type::Vector2)          { return this->value_->setValue(value); } else { this->changeValueContainer<orxonox::Vector2>(value);     return true; } } /** @brief Assigns a new value by changing type and creating a new container. */
     440            inline bool assignValue(const orxonox::Vector3& value)     { if (this->value_ && this->value_->type_ == MT_Type::Vector3)          { return this->value_->setValue(value); } else { this->changeValueContainer<orxonox::Vector3>(value);     return true; } } /** @brief Assigns a new value by changing type and creating a new container. */
     441            inline bool assignValue(const orxonox::Vector4& value)     { if (this->value_ && this->value_->type_ == MT_Type::Vector4)          { return this->value_->setValue(value); } else { this->changeValueContainer<orxonox::Vector4>(value);     return true; } } /** @brief Assigns a new value by changing type and creating a new container. */
     442            inline bool assignValue(const orxonox::ColourValue& value) { if (this->value_ && this->value_->type_ == MT_Type::ColourValue)      { return this->value_->setValue(value); } else { this->changeValueContainer<orxonox::ColourValue>(value); return true; } } /** @brief Assigns a new value by changing type and creating a new container. */
     443            inline bool assignValue(const orxonox::Quaternion& value)  { if (this->value_ && this->value_->type_ == MT_Type::Quaternion)       { return this->value_->setValue(value); } else { this->changeValueContainer<orxonox::Quaternion>(value);  return true; } } /** @brief Assigns a new value by changing type and creating a new container. */
     444            inline bool assignValue(const orxonox::Radian& value)      { if (this->value_ && this->value_->type_ == MT_Type::Radian)           { return this->value_->setValue(value); } else { this->changeValueContainer<orxonox::Radian>(value);      return true; } } /** @brief Assigns a new value by changing type and creating a new container. */
     445            inline bool assignValue(const orxonox::Degree& value)      { if (this->value_ && this->value_->type_ == MT_Type::Degree)           { return this->value_->setValue(value); } else { this->changeValueContainer<orxonox::Degree>(value);      return true; } } /** @brief Assigns a new value by changing type and creating a new container. */
    443446
    444447            /** @brief Changes the value container. */
     
    453456    _UtilExport inline std::ostream& operator<<(std::ostream& outstream, const MultiType& mt) { if (mt.value_) { mt.value_->toString(outstream); } return outstream; }
    454457
    455     template <> inline bool MultiType::isType<char>()                 const { return (this->value_ && this->value_->type_ == MT_char);        } /** @brief Returns true if the current type equals the given type. */
    456     template <> inline bool MultiType::isType<unsigned char>()        const { return (this->value_ && this->value_->type_ == MT_uchar);       } /** @brief Returns true if the current type equals the given type. */
    457     template <> inline bool MultiType::isType<short>()                const { return (this->value_ && this->value_->type_ == MT_short);       } /** @brief Returns true if the current type equals the given type. */
    458     template <> inline bool MultiType::isType<unsigned short>()       const { return (this->value_ && this->value_->type_ == MT_ushort);      } /** @brief Returns true if the current type equals the given type. */
    459     template <> inline bool MultiType::isType<int>()                  const { return (this->value_ && this->value_->type_ == MT_int);         } /** @brief Returns true if the current type equals the given type. */
    460     template <> inline bool MultiType::isType<unsigned int>()         const { return (this->value_ && this->value_->type_ == MT_uint);        } /** @brief Returns true if the current type equals the given type. */
    461     template <> inline bool MultiType::isType<long>()                 const { return (this->value_ && this->value_->type_ == MT_long);        } /** @brief Returns true if the current type equals the given type. */
    462     template <> inline bool MultiType::isType<unsigned long>()        const { return (this->value_ && this->value_->type_ == MT_ulong);       } /** @brief Returns true if the current type equals the given type. */
    463     template <> inline bool MultiType::isType<long long>()            const { return (this->value_ && this->value_->type_ == MT_longlong);    } /** @brief Returns true if the current type equals the given type. */
    464     template <> inline bool MultiType::isType<unsigned long long>()   const { return (this->value_ && this->value_->type_ == MT_ulonglong);  } /** @brief Returns true if the current type equals the given type. */
    465     template <> inline bool MultiType::isType<float>()                const { return (this->value_ && this->value_->type_ == MT_float);       } /** @brief Returns true if the current type equals the given type. */
    466     template <> inline bool MultiType::isType<double>()               const { return (this->value_ && this->value_->type_ == MT_double);      } /** @brief Returns true if the current type equals the given type. */
    467     template <> inline bool MultiType::isType<long double>()          const { return (this->value_ && this->value_->type_ == MT_longdouble);  } /** @brief Returns true if the current type equals the given type. */
    468     template <> inline bool MultiType::isType<bool>()                 const { return (this->value_ && this->value_->type_ == MT_bool);        } /** @brief Returns true if the current type equals the given type. */
    469     template <> inline bool MultiType::isType<void*>()                const { return (this->value_ && this->value_->type_ == MT_void);        } /** @brief Returns true if the current type equals the given type. */
    470     template <> inline bool MultiType::isType<std::string>()          const { return (this->value_ && this->value_->type_ == MT_string);      } /** @brief Returns true if the current type equals the given type. */
    471     template <> inline bool MultiType::isType<orxonox::Vector2>()     const { return (this->value_ && this->value_->type_ == MT_vector2);     } /** @brief Returns true if the current type equals the given type. */
    472     template <> inline bool MultiType::isType<orxonox::Vector3>()     const { return (this->value_ && this->value_->type_ == MT_vector3);     } /** @brief Returns true if the current type equals the given type. */
    473     template <> inline bool MultiType::isType<orxonox::Vector4>()     const { return (this->value_ && this->value_->type_ == MT_vector4);     } /** @brief Returns true if the current type equals the given type. */
    474     template <> inline bool MultiType::isType<orxonox::ColourValue>() const { return (this->value_ && this->value_->type_ == MT_colourvalue); } /** @brief Returns true if the current type equals the given type. */
    475     template <> inline bool MultiType::isType<orxonox::Quaternion>()  const { return (this->value_ && this->value_->type_ == MT_quaternion);  } /** @brief Returns true if the current type equals the given type. */
    476     template <> inline bool MultiType::isType<orxonox::Radian>()      const { return (this->value_ && this->value_->type_ == MT_radian);      } /** @brief Returns true if the current type equals the given type. */
    477     template <> inline bool MultiType::isType<orxonox::Degree>()      const { return (this->value_ && this->value_->type_ == MT_degree);      } /** @brief Returns true if the current type equals the given type. */
     458    template <> inline bool MultiType::isType<char>()                 const { return (this->value_ && this->value_->type_ == MT_Type::Char);             } /** @brief Returns true if the current type equals the given type. */
     459    template <> inline bool MultiType::isType<unsigned char>()        const { return (this->value_ && this->value_->type_ == MT_Type::UnsignedChar);     } /** @brief Returns true if the current type equals the given type. */
     460    template <> inline bool MultiType::isType<short>()                const { return (this->value_ && this->value_->type_ == MT_Type::Short);            } /** @brief Returns true if the current type equals the given type. */
     461    template <> inline bool MultiType::isType<unsigned short>()       const { return (this->value_ && this->value_->type_ == MT_Type::UnsignedShort);    } /** @brief Returns true if the current type equals the given type. */
     462    template <> inline bool MultiType::isType<int>()                  const { return (this->value_ && this->value_->type_ == MT_Type::Int);              } /** @brief Returns true if the current type equals the given type. */
     463    template <> inline bool MultiType::isType<unsigned int>()         const { return (this->value_ && this->value_->type_ == MT_Type::UnsignedInt);      } /** @brief Returns true if the current type equals the given type. */
     464    template <> inline bool MultiType::isType<long>()                 const { return (this->value_ && this->value_->type_ == MT_Type::Long);             } /** @brief Returns true if the current type equals the given type. */
     465    template <> inline bool MultiType::isType<unsigned long>()        const { return (this->value_ && this->value_->type_ == MT_Type::UnsignedLong);     } /** @brief Returns true if the current type equals the given type. */
     466    template <> inline bool MultiType::isType<long long>()            const { return (this->value_ && this->value_->type_ == MT_Type::LongLong);         } /** @brief Returns true if the current type equals the given type. */
     467    template <> inline bool MultiType::isType<unsigned long long>()   const { return (this->value_ && this->value_->type_ == MT_Type::UnsignedLongLong); } /** @brief Returns true if the current type equals the given type. */
     468    template <> inline bool MultiType::isType<float>()                const { return (this->value_ && this->value_->type_ == MT_Type::Float);            } /** @brief Returns true if the current type equals the given type. */
     469    template <> inline bool MultiType::isType<double>()               const { return (this->value_ && this->value_->type_ == MT_Type::Double);           } /** @brief Returns true if the current type equals the given type. */
     470    template <> inline bool MultiType::isType<long double>()          const { return (this->value_ && this->value_->type_ == MT_Type::LongDouble);       } /** @brief Returns true if the current type equals the given type. */
     471    template <> inline bool MultiType::isType<bool>()                 const { return (this->value_ && this->value_->type_ == MT_Type::Bool);             } /** @brief Returns true if the current type equals the given type. */
     472    template <> inline bool MultiType::isType<void*>()                const { return (this->value_ && this->value_->type_ == MT_Type::VoidPointer);      } /** @brief Returns true if the current type equals the given type. */
     473    template <> inline bool MultiType::isType<std::string>()          const { return (this->value_ && this->value_->type_ == MT_Type::String);           } /** @brief Returns true if the current type equals the given type. */
     474    template <> inline bool MultiType::isType<orxonox::Vector2>()     const { return (this->value_ && this->value_->type_ == MT_Type::Vector2);          } /** @brief Returns true if the current type equals the given type. */
     475    template <> inline bool MultiType::isType<orxonox::Vector3>()     const { return (this->value_ && this->value_->type_ == MT_Type::Vector3);          } /** @brief Returns true if the current type equals the given type. */
     476    template <> inline bool MultiType::isType<orxonox::Vector4>()     const { return (this->value_ && this->value_->type_ == MT_Type::Vector4);          } /** @brief Returns true if the current type equals the given type. */
     477    template <> inline bool MultiType::isType<orxonox::ColourValue>() const { return (this->value_ && this->value_->type_ == MT_Type::ColourValue);      } /** @brief Returns true if the current type equals the given type. */
     478    template <> inline bool MultiType::isType<orxonox::Quaternion>()  const { return (this->value_ && this->value_->type_ == MT_Type::Quaternion);       } /** @brief Returns true if the current type equals the given type. */
     479    template <> inline bool MultiType::isType<orxonox::Radian>()      const { return (this->value_ && this->value_->type_ == MT_Type::Radian);           } /** @brief Returns true if the current type equals the given type. */
     480    template <> inline bool MultiType::isType<orxonox::Degree>()      const { return (this->value_ && this->value_->type_ == MT_Type::Degree);           } /** @brief Returns true if the current type equals the given type. */
    478481
    479482    // Specialization to avoid ambiguities with the conversion operator
  • code/branches/core4/src/util/MultiTypeValue.h

    r3196 r3257  
    5454    public:
    5555        /** @brief Constructor: Assigns the value and the type identifier. */
    56         MT_Value(const T& value, MT_Type type) : MT_ValueBase(type), value_(value) {}
     56        MT_Value(const T& value, MT_Type::Value type) : MT_ValueBase(type), value_(value) {}
    5757
    5858        /** @brief Creates a copy of itself. */
Note: See TracChangeset for help on using the changeset viewer.