Changeset 8300 in orxonox.OLD for branches/script_engine/src
- Timestamp:
- Jun 9, 2006, 4:20:36 PM (18 years ago)
- Location:
- branches/script_engine/src/lib/util
- Files:
-
- 4 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 -
branches/script_engine/src/lib/util/loading/load_param.cc
r7721 r8300 29 29 */ 30 30 CLoadParam::CLoadParam(const TiXmlElement* root, const std::string& paramName, BaseObject* object, Executor* executor, bool inLoadCycle) 31 : paramName(paramName), object(object) 32 { 33 this->object = object; 31 : object(object), paramName(paramName) 32 { 34 33 this->inLoadCycle = inLoadCycle; 35 34 -
branches/script_engine/src/lib/util/substring.h
r7477 r8300 70 70 inline unsigned int size() const { return this->strings.size(); }; 71 71 /** @param i the i'th String @returns the i'th string from the subset of Strings */ 72 const std::string& operator[](unsigned int i) const { return (i < this->strings.size()) ? this->strings[i] : emptyString;return this->getString(i); };72 inline const std::string& operator[](unsigned int i) const { return (i < this->strings.size()) ? this->strings[i] : emptyString; }; 73 73 /** @param i the i'th String @returns the i'th string from the subset of Strings */ 74 const std::string& getString(unsigned int i) const { return (*this)[i]; };74 inline const std::string& getString(unsigned int i) const { return (*this)[i]; }; 75 75 76 76 // the almighty algorithm.
Note: See TracChangeset
for help on using the changeset viewer.