- Timestamp:
- Sep 15, 2006, 3:55:51 PM (18 years ago)
- Location:
- branches/new_class_id/src/lib
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/new_class_id/src/lib/shell/shell_command.cc
r9728 r9734 20 20 21 21 #include "compiler.h" 22 #include "helper_functions.h" 22 23 #include "debug.h" 23 24 -
branches/new_class_id/src/lib/shell/shell_completion.cc
r9715 r9734 22 22 #include "shell_command.h" 23 23 24 #include " substring.h"24 #include "helper_functions.h" 25 25 #include "debug.h" 26 26 -
branches/new_class_id/src/lib/shell/shell_completion_plugin.cc
r9697 r9734 21 21 #include "shell_command.h" 22 22 23 #include " substring.h"23 #include "helper_functions.h" 24 24 #include "loading/resource_manager.h" 25 25 -
branches/new_class_id/src/lib/util/executor/executor.h
r9733 r9734 105 105 virtual Executor<CallType>* clone () const = 0; 106 106 107 107 108 protected: 108 Executor(bool hasRetVal, 109 const MultiType& param0 = MT_NULL, const MultiType& param1 = MT_NULL, 110 const MultiType& param2 = MT_NULL, const MultiType& param3 = MT_NULL, 111 const MultiType& param4 = MT_NULL, const MultiType& param5 = MT_NULL, 112 const MultiType& param6 = MT_NULL) 113 : bRetVal(hasRetVal) 114 { 115 // What Parameters have we got 109 //! Now follows a List of Executor Constructors, to be fast in creating. 110 Executor(bool hasRetVal, FunctionType functionType = FunctionDefault) 111 : bRetVal(hasRetVal), paramCount(0), functionType(functionType) 112 { }; 113 114 Executor(bool hasRetVal, const MultiType& param0, 115 FunctionType functionType = FunctionDefault) 116 : bRetVal(hasRetVal), paramCount(1), functionType(functionType) 117 { 118 this->defaultValue[0] = param0; 119 }; 120 121 Executor(bool hasRetVal, const MultiType& param0, const MultiType& param1, 122 FunctionType functionType = FunctionDefault) 123 : bRetVal(hasRetVal), paramCount(2), functionType(functionType) 124 { 125 this->defaultValue[0] = param0; 126 this->defaultValue[1] = param1; 127 }; 128 129 Executor(bool hasRetVal, const MultiType& param0, const MultiType& param1, 130 const MultiType& param2, 131 FunctionType functionType = FunctionDefault) 132 : bRetVal(hasRetVal), paramCount(3), functionType(functionType) 133 { 134 this->defaultValue[0] = param0; 135 this->defaultValue[1] = param1; 136 this->defaultValue[2] = param2; 137 }; 138 139 Executor(bool hasRetVal, const MultiType& param0, const MultiType& param1, 140 const MultiType& param2, const MultiType& param3, 141 FunctionType functionType = FunctionDefault) 142 : bRetVal(hasRetVal), paramCount(4), functionType(functionType) 143 { 144 this->defaultValue[0] = param0; 145 this->defaultValue[1] = param1; 146 this->defaultValue[2] = param2; 147 this->defaultValue[3] = param3; 148 }; 149 150 Executor(bool hasRetVal, const MultiType& param0, const MultiType& param1, 151 const MultiType& param2, const MultiType& param3, 152 const MultiType& param4, 153 FunctionType functionType = FunctionDefault) 154 : bRetVal(hasRetVal), paramCount(5), functionType(functionType) 155 { 156 this->defaultValue[0] = param0; 157 this->defaultValue[1] = param1; 158 this->defaultValue[2] = param2; 159 this->defaultValue[3] = param3; 160 this->defaultValue[4] = param4; 161 }; 162 163 Executor(bool hasRetVal, const MultiType& param0, const MultiType& param1, 164 const MultiType& param2, const MultiType& param3, 165 const MultiType& param4, const MultiType& param5, 166 FunctionType functionType = FunctionDefault) 167 : bRetVal(hasRetVal), paramCount(6), functionType(functionType) 168 { 169 this->defaultValue[0] = param0; 170 this->defaultValue[1] = param1; 171 this->defaultValue[2] = param2; 172 this->defaultValue[3] = param3; 173 this->defaultValue[4] = param4; 174 this->defaultValue[5] = param5; 175 }; 176 177 Executor(bool hasRetVal, const MultiType& param0, const MultiType& param1, 178 const MultiType& param2, const MultiType& param3, 179 const MultiType& param4, const MultiType& param5, 180 const MultiType& param6, 181 FunctionType functionType = FunctionDefault) 182 : bRetVal(hasRetVal), paramCount(7), functionType(functionType) 183 { 116 184 this->defaultValue[0] = param0; 117 185 this->defaultValue[1] = param1; … … 121 189 this->defaultValue[5] = param5; 122 190 this->defaultValue[6] = param6; 123 124 this->paramCount = 0; 125 for (unsigned int i = 0; i <= EXECUTOR_MAX_ARGUMENTS; i++) 126 { 127 if (this->defaultValue[i] == MT_NULL || i == EXECUTOR_MAX_ARGUMENTS) 128 { 129 this->paramCount = i; 130 break; 131 } 132 else 133 this->defaultValue[i].storeString(); 134 } 135 } 136 137 191 }; 138 192 139 193 protected: 194 const bool bRetVal; //!< True if the Executor has a return Value. 140 195 unsigned int paramCount; //!< the count of parameters. 141 196 MultiType defaultValue[7]; //!< Default Values. 142 197 143 FunctionType functionType; //!< What Type of Function it is. 144 private: 145 const bool bRetVal; //!< True if the Executor has a return Value. 198 const FunctionType functionType; //!< What Type of Function it is. 146 199 }; 147 200 -
branches/new_class_id/src/lib/util/executor/executor_functional.cc
r9730 r9734 15 15 16 16 #include "executor_functional.h" 17 #include "helper_functions.h" 17 18 18 19 template<> bool fromString<bool>(const std::string& input, bool defaultValue) { return isBool(input, defaultValue); }; -
branches/new_class_id/src/lib/util/executor/executor_functional.h
r9733 r9734 140 140 : Executor<CallType>(false) 141 141 { 142 this->functionType = Executor<CallType>::FunctionDefault;143 142 this->functionPointer = functionPointer; 144 143 }; … … 185 184 : Executor<CallType>(false, ExecutorParamType<type0>()) 186 185 { 187 this->functionType = Executor<CallType>::FunctionDefault;188 186 this->functionPointer = functionPointer; 189 187 }; … … 229 227 : Executor<CallType>(false, ExecutorParamType<type0>(), ExecutorParamType<type1>()) 230 228 { 231 this->functionType = Executor<CallType>::FunctionDefault;232 229 this->functionPointer = functionPointer; 233 230 }; … … 275 272 : Executor<CallType>(false, ExecutorParamType<type0>(), ExecutorParamType<type1>(), ExecutorParamType<type2>()) 276 273 { 277 this->functionType = Executor<CallType>::FunctionDefault;278 274 this->functionPointer = functionPointer; 279 275 }; … … 323 319 : Executor<CallType>(false, ExecutorParamType<type0>(), ExecutorParamType<type1>(), ExecutorParamType<type2>(), ExecutorParamType<type3>()) 324 320 { 325 this->functionType = Executor<CallType>::FunctionDefault;326 321 this->functionPointer = functionPointer; 327 322 }; … … 372 367 : Executor<CallType>(false, ExecutorParamType<type0>(), ExecutorParamType<type1>(), ExecutorParamType<type2>(), ExecutorParamType<type3>(), ExecutorParamType<type4>()) 373 368 { 374 this->functionType = Executor<CallType>::FunctionDefault;375 369 this->functionPointer = functionPointer; 376 370 }; -
branches/new_class_id/src/lib/util/executor/executor_lua.h
r9733 r9734 51 51 { 52 52 this->functionPointer = function; 53 this->functionType = Executor<lua_State*>::FunctionDefault;54 53 } 55 54 … … 88 87 { 89 88 this->functionPointer = function; 90 this->functionType = Executor<lua_State*>::FunctionDefault;91 89 } 92 90 … … 124 122 { 125 123 this->functionPointer = function; 126 this->functionType = Executor<lua_State*>::FunctionDefault;127 124 } 128 125 … … 161 158 { 162 159 this->functionPointer = function; 163 this->functionType = Executor<lua_State*>::FunctionDefault;164 160 } 165 161 … … 200 196 { 201 197 this->functionPointer = function; 202 this->functionType = Executor<lua_State*>::FunctionDefault;203 198 } 204 199 … … 246 241 { 247 242 this->functionPointer = function; 248 this->functionType = Executor<lua_State*>::FunctionDefault;249 243 } 250 244 … … 282 276 { 283 277 this->functionPointer = function; 284 this->functionType = Executor<lua_State*>::FunctionDefault;285 278 } 286 279 … … 317 310 { 318 311 this->functionPointer = function; 319 this->functionType = Executor<lua_State*>::FunctionDefault;320 312 } 321 313 … … 354 346 { 355 347 this->functionPointer = function; 356 this->functionType = Executor<lua_State*>::FunctionDefault;357 348 } 358 349 … … 392 383 { 393 384 this->functionPointer = function; 394 this->functionType = Executor<lua_State*>::FunctionDefault;395 385 } 396 386 … … 430 420 { 431 421 this->functionPointer = function; 432 this->functionType = Executor<lua_State*>::FunctionDefault;433 422 } 434 423 … … 471 460 { 472 461 this->functionPointer = function; 473 this->functionType = Executor<lua_State*>::FunctionDefault;474 462 } 475 463 … … 514 502 { 515 503 this->functionPointer = function; 516 this->functionType = Executor<lua_State*>::FunctionDefault;517 504 } 518 505 -
branches/new_class_id/src/lib/util/executor/executor_xml.h
r9733 r9734 40 40 this->paramName = paramName; 41 41 this->functionPointer = function; 42 this->functionType = FunctionDefault;43 42 } 44 43
Note: See TracChangeset
for help on using the changeset viewer.