Changeset 7199 in orxonox.OLD for trunk/src/lib/util/executor
- Timestamp:
- Mar 8, 2006, 10:46:37 PM (19 years ago)
- Location:
- trunk/src/lib/util/executor
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/util/executor/executor.cc
r7198 r7199 45 45 this->setClassID(CL_EXECUTOR, "Executor"); 46 46 47 48 47 // What Parameters have we got 49 48 this->defaultValue[0] = param0; … … 53 52 this->defaultValue[4] = param4; 54 53 54 this->paramCount = 0; 55 55 for (unsigned int i = 0; i < FUNCTOR_MAX_ARGUMENTS; i++) 56 56 { … … 61 61 } 62 62 } 63 assert (paramCount <= FUNCTOR_MAX_ARGUMENTS);64 63 } 65 64 … … 109 108 { 110 109 if (*value[i] != MT_NULL) 111 { 112 if (this->defaultValue[i].getType() == value[i]->getType()) 113 { 114 this->defaultValue[i] = *value[i]; 115 } 116 else 117 { 118 PRINTF(1)("Unable to set this Value, as it is not of type %s\n", MultiType::MultiTypeToString(this->defaultValue[i].getType())); 119 } 120 } 110 this->defaultValue[i].setValueOf(*value[i]); 121 111 } 122 112 return this; -
trunk/src/lib/util/executor/executor.h
r7198 r7199 13 13 #include "substring.h" 14 14 #include "functor_list.h" //< MUST BE INCLUDED HERE AT LEAST ONCE. 15 16 #include <stdarg.h>17 15 18 16 //! an enumerator for the definition of the Type. … … 89 87 #define l_FLOAT_DEFGRAB(i) this->defaultValue[i].getFloat() 90 88 //! where to chek for default STRING values 91 #define l_ STRING_DEFGRAB(i) this->defaultValue[i].getString()89 #define l_CSTRING_DEFGRAB(i) this->defaultValue[i].getCString() 92 90 93 91 ////////////////////////// -
trunk/src/lib/util/executor/functor_list.h
r5995 r7199 21 21 l_SHORT: short 22 22 l_FLOAT: float 23 l_ STRING: const char*23 l_CSTRING: const char* 24 24 l_XML_ELEM: TiXmlElement* 25 25 */ … … 60 60 // #define l_SHORT_FUNC atoi //!< The function to parse a SHORT 61 61 // #define l_SHORT_NAME "short" //!< The name of a SHORT 62 // #define l_SHORT_PARAMParameterShort //!< the type of the parameter SHORT62 // #define l_SHORT_PARAM ParameterShort //!< the type of the parameter SHORT 63 63 // #define l_SHORT_DEFAULT 0 //!< a default Value for a SHORT 64 64 … … 74 74 //#define l_VECTOR_DEFAULT Vector(0,0,0) //!< Default value for a VECTOR 75 75 76 #define l_STRING_TYPE const char* //!< The type of a STRING 76 #define l_CSTRING_TYPE const char* //!< The type of a STRING 77 #define l_CSTRING_FUNC isString //!< The function to parse a STRING 78 #define l_CSTRING_NAME "string" //!< The name of a STRING 79 #define l_CSTRING_PARAM MT_STRING //!< the type of the parameter STRING 80 #define l_CSTRING_DEFAULT "" //!< a default Value for an STRING 81 82 #define l_STRING_TYPE const std::string& //!< The type of a STRING 77 83 #define l_STRING_FUNC isString //!< The function to parse a STRING 78 84 #define l_STRING_NAME "string" //!< The name of a STRING … … 93 99 FUNCTOR_LIST(0)(); 94 100 //! makes functions with one string 95 FUNCTOR_LIST(1)(l_ STRING);101 FUNCTOR_LIST(1)(l_CSTRING); 96 102 //! makes functions with two strings 97 FUNCTOR_LIST(2)(l_ STRING, l_STRING);103 FUNCTOR_LIST(2)(l_CSTRING, l_CSTRING); 98 104 //! makes functions with three strings 99 FUNCTOR_LIST(3)(l_ STRING, l_STRING, l_STRING);105 FUNCTOR_LIST(3)(l_CSTRING, l_CSTRING, l_CSTRING); 100 106 //! makes functions with four strings 101 FUNCTOR_LIST(4)(l_ STRING, l_STRING, l_STRING, l_STRING);107 FUNCTOR_LIST(4)(l_CSTRING, l_CSTRING, l_CSTRING, l_CSTRING); 102 108 103 109 //! makes functions with one bool … … 135 141 136 142 //! mixed values: 137 FUNCTOR_LIST(2)(l_ STRING, l_FLOAT);143 FUNCTOR_LIST(2)(l_CSTRING, l_FLOAT); 138 144 FUNCTOR_LIST(2)(l_UINT, l_LONG); 139 FUNCTOR_LIST(2)(l_ STRING, l_UINT);145 FUNCTOR_LIST(2)(l_CSTRING, l_UINT); 140 146 141 FUNCTOR_LIST(3)(l_ STRING, l_FLOAT, l_UINT);147 FUNCTOR_LIST(3)(l_CSTRING, l_FLOAT, l_UINT); 142 148 143 149
Note: See TracChangeset
for help on using the changeset viewer.