Changeset 8300 in orxonox.OLD for branches/script_engine/src/lib/util/executor
- Timestamp:
- Jun 9, 2006, 4:20:36 PM (18 years ago)
- Location:
- branches/script_engine/src/lib/util/executor
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/script_engine/src/lib/util/executor/executor.h
r8271 r8300 33 33 * Objects of any Class (Templated) 34 34 * Default Values 35 * Functions with up to 5 parameters (more seems useless)35 * Functions with up to 5 parameters (more seems overhead, split up the function) 36 36 * Functions with many types (@see functor_list.h) 37 37 */ -
branches/script_engine/src/lib/util/executor/executor_functional.cc
r8035 r8300 15 15 16 16 #include "executor.h" 17 18 std::string ExecutorFunctional_returningString_from; 19 std::string ExecutorFunctional_returningString_default; 17 std::string ExecutorFunctional_returningString_from[5]; 20 18 21 19 … … 32 30 template<> float fromString<float>(const std::string& input, float defaultValue) { return isFloat(input, defaultValue); }; 33 31 template<> char fromString<char>(const std::string& input, char defaultValue) { return isInt(input, defaultValue); }; 34 template<> const std::string& fromString<const std::string&>(const std::string& input, const std::string& defaultValue) { return ExecutorFunctional_returningString_from = isString(input, defaultValue); };32 template<> const std::string& fromString<const std::string&>(const std::string& input, const std::string& defaultValue) { return (input.size() > 0) ? input : defaultValue; }; 35 33 36 34 … … 48 46 template<> float getDefault<float>(const MultiType* const defaultValues, unsigned int i) { return defaultValues[i].getFloat(); }; 49 47 template<> char getDefault<char>(const MultiType* const defaultValues, unsigned int i) { return defaultValues[i].getChar(); }; 50 template<> const std::string& getDefault<const std::string&>(const MultiType* const defaultValues, unsigned int i) { return ExecutorFunctional_returningString_ default= defaultValues[i].getString(); };48 template<> const std::string& getDefault<const std::string&>(const MultiType* const defaultValues, unsigned int i) { return ExecutorFunctional_returningString_from[i] = defaultValues[i].getString(); }; 51 49 52 50
Note: See TracChangeset
for help on using the changeset viewer.