Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 1, 2008, 3:54:20 PM (16 years ago)
Author:
rgrieder
Message:
  • @everyone: Do not create a branch until I've added the svn:eol-style property correctly. Otherwise this would cost me another 4 hours or so when we want to merge back.
  • merged network branch back to trunk
  • I had to omit the changes from last evening concerning the line endings
  • might not work yet because of the line endings
  • @beni: script branch is the only branch still open. you probably will have to apply a patch because of inconsistent new lines
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/core/Executor.h

    r1349 r1502  
    3535#include "util/SubString.h"
    3636#include "util/String.h"
     37#include "util/Math.h"
    3738#include "Functor.h"
    3839#include "Debug.h"
     
    100101            COUT(5) << tokens[i]; \
    101102        } \
    102         COUT(5) << ") and " << (paramCount - tokens.size()) << " default values ("; \
     103        COUT(5) << ") and " << max((int)paramCount - (int)tokens.size(), 0) << " default values ("; \
    103104        for (unsigned int i = tokens.size(); i < paramCount; i++) \
    104105        { \
     
    134135    return true
    135136
    136 namespace AccessLevel
    137 {
    138     enum Level
    139     {
    140         None,
    141         User,
    142         Admin,
    143         Offline,
    144         Debug,
    145         Disabled
    146     };
    147 }
    148 
    149137namespace orxonox
    150138{
     
    152140    {
    153141        public:
    154             Executor(Functor* functor, const std::string& name = "", AccessLevel::Level level = AccessLevel::None);
     142            Executor(Functor* functor, const std::string& name = "");
    155143            virtual ~Executor();
    156144
     
    181169            const std::string& getDescriptionReturnvalue(int param) const;
    182170
     171            inline Functor* getFunctor() const
     172                { return this->functor_; }
    183173            inline unsigned int getParamCount() const
    184174                { return this->functor_->getParamCount(); }
     
    199189                { return this->name_; }
    200190
    201             inline void setAccessLevel(AccessLevel::Level level)
    202                 { this->accessLevel_ = level; }
    203             inline AccessLevel::Level getAccessLevel() const
    204                 { return this->accessLevel_; }
    205 
    206             inline Executor& setKeybindMode(KeybindMode::Enum mode)
    207                 { this->keybindMode_ = mode; return *this; }
    208             inline KeybindMode::Enum getKeybindMode() const
    209                 { return this->keybindMode_; }
    210 
    211             inline Executor& setAxisParamIndex(int index)
    212                 { this->axisParamIndex_ = index; return *this; }
    213             inline int getAxisParamIndex() const
    214                 { return this->axisParamIndex_; }
    215 
    216             inline Executor& setIsAxisRelative(bool val)
    217                 { this->bAxisRelative_ = val; return *this; }
    218             inline int getIsAxisRelative() const
    219                 { return this->bAxisRelative_; }
    220 
    221191            Executor& setDefaultValues(const MultiTypeMath& param1);
    222192            Executor& setDefaultValues(const MultiTypeMath& param1, const MultiTypeMath& param2);
     
    249219            bool bAddedDefaultValue_[MAX_FUNCTOR_ARGUMENTS];
    250220
    251             KeybindMode::Enum keybindMode_;
    252             int axisParamIndex_;
    253             bool bAxisRelative_;
    254 
    255221        private:
    256222            LanguageEntryLabel description_;
     
    261227            bool bAddedDescriptionReturnvalue_;
    262228            bool bAddedDescriptionParam_[MAX_FUNCTOR_ARGUMENTS];
    263 
    264             AccessLevel::Level accessLevel_;
    265229    };
    266230
     
    268232    {
    269233        public:
    270             ExecutorStatic(FunctorStatic* functor, const std::string& name = "", AccessLevel::Level level = AccessLevel::None) : Executor(functor, name, level) {}
     234            ExecutorStatic(FunctorStatic* functor, const std::string& name = "") : Executor(functor, name) {}
    271235            virtual ~ExecutorStatic() {}
    272236    };
     
    276240    {
    277241        public:
    278             ExecutorMember(FunctorMember<T>* functor, const std::string& name = "", AccessLevel::Level level = AccessLevel::None) : Executor(functor, name, level) {}
     242            ExecutorMember(FunctorMember<T>* functor, const std::string& name = "") : Executor(functor, name) {}
    279243            virtual ~ExecutorMember() {}
    280244
     
    322286    };
    323287
    324     inline Executor* createExecutor(Functor* functor, const std::string& name = "", AccessLevel::Level level = AccessLevel::None)
    325     {
    326         return new Executor(functor, name, level);
     288    inline Executor* createExecutor(Functor* functor, const std::string& name = "")
     289    {
     290        return new Executor(functor, name);
    327291    }
    328292
    329293    template <class T>
    330     inline ExecutorMember<T>* createExecutor(FunctorMember<T>* functor, const std::string& name = "", AccessLevel::Level level = AccessLevel::None)
    331     {
    332         return new ExecutorMember<T>(functor, name, level);
     294    inline ExecutorMember<T>* createExecutor(FunctorMember<T>* functor, const std::string& name = "")
     295    {
     296        return new ExecutorMember<T>(functor, name);
    333297    }
    334298
    335     inline ExecutorStatic* createExecutor(FunctorStatic* functor, const std::string& name = "", AccessLevel::Level level = AccessLevel::None)
    336     {
    337         return new ExecutorStatic(functor, name, level);
     299    inline ExecutorStatic* createExecutor(FunctorStatic* functor, const std::string& name = "")
     300    {
     301        return new ExecutorStatic(functor, name);
    338302    }
    339303}
Note: See TracChangeset for help on using the changeset viewer.