Changeset 7331 in orxonox.OLD for trunk/src/lib/util/executor/executor.h
- Timestamp:
- Apr 18, 2006, 4:48:37 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/util/executor/executor.h
r7300 r7331 34 34 * Default Values 35 35 * Functions with up to 5 parameters (more seems useless) 36 * Functions with many types ( see functor_list.h)36 * Functions with many types (@see functor_list.h) 37 37 */ 38 38 class Executor: public BaseObject … … 43 43 virtual Executor* clone () const = 0; 44 44 45 // SETTING up the EXECUTOR 45 46 Executor* defaultValues(const MultiType& value0 = MT_NULL, const MultiType& value1 = MT_NULL, 46 47 const MultiType& value2 = MT_NULL, const MultiType& value3 = MT_NULL, 47 48 const MultiType& value4 = MT_NULL); 48 49 50 // EXECUTE 49 51 /** executes a Command @param object the object to apply this to @param parameters the parameters the command takes */ 50 virtual void execute (BaseObject* object, const std::string& parameters = "") = 0; 51 52 virtual void operator()(BaseObject* object, const std::string& parameters = "") = 0; 53 /** executes a Command @param object the object to apply this to @param parameters the parameters the command takes @brief here for your convenience*/ 54 void execute (BaseObject* object, const std::string& parameters = "") { (*this)(object, parameters); }; 55 56 // RETRIEVE INFORMATION 52 57 /** @returns the Type of this Function (either static or objective) */ 53 58 inline long getType() const { return this->functorType; }; … … 65 70 66 71 protected: 67 longfunctorType; //!< The type of Function we've got (either static or objective).72 short functorType; //!< The type of Function we've got (either static or objective). 68 73 unsigned int paramCount; //!< the count of parameters. 69 74 MultiType defaultValue[5]; //!< Default Values. … … 72 77 /////////////////////////////////////////////////// 73 78 /////////////////////////////////////////////////// 74 75 /////////////////////////////////76 // MACRO DEFINITION EXTENSIONS //77 /////////////////////////////////78 //! where to chek for default BOOL values79 #define l_BOOL_DEFGRAB(i) this->defaultValue[i].getBool()80 //! where to chek for default INT values81 #define l_INT_DEFGRAB(i) this->defaultValue[i].getInt()82 //! where to chek for default UINT values83 #define l_UINT_DEFGRAB(i) (unsigned int)this->defaultValue[i].getInt()84 //! where to chek for default LONG values85 #define l_LONG_DEFGRAB(i) (long)this->defaultValue[i].getInt()86 //! where to chek for default FLOAT values87 #define l_FLOAT_DEFGRAB(i) this->defaultValue[i].getFloat()88 //! where to chek for default STRING values89 #define l_STRING_DEFGRAB(i) this->defaultValue[i].getString()90 //! where to chek for default CSTRING values91 #define l_CSTRING_DEFGRAB(i) this->defaultValue[i].getCString()92 79 93 80 ////////////////////////// … … 267 254 } fp; 268 255 269 virtual void execute(BaseObject* object, const std::string& parameters = "")256 virtual void operator()(BaseObject* object, const std::string& parameters = "") 270 257 { 271 258 SubString sub; … … 330 317 331 318 332 virtual void execute(BaseObject* object, const std::string& parameters = "")319 virtual void operator()(BaseObject* object, const std::string& parameters = "") 333 320 { 334 321 SubString sub;
Note: See TracChangeset
for help on using the changeset viewer.