- Timestamp:
- Jul 18, 2006, 2:19:52 AM (18 years ago)
- Location:
- branches/proxy/src/lib/util
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/proxy/src/lib/util/executor/executor_functional.h
r8271 r9316 179 179 { 180 180 (__EXECUTOR_FUNCTIONAL_FUNCTION_EXEC)( 181 fromString<type0>(sub[0], getDefault<type0>(this->defaultValue, 0)));181 (sub.size() > 0) ? fromString<type0>(sub[0], getDefault<type0>(this->defaultValue, 0)) : (fromMulti<type0>(this->defaultValue[0]))); 182 182 }; 183 183 … … 222 222 { 223 223 (__EXECUTOR_FUNCTIONAL_FUNCTION_EXEC)( 224 fromString<type0>(sub[0], getDefault<type0>(this->defaultValue, 0)),225 fromString<type1>(sub[1], getDefault<type1>(this->defaultValue, 1)));224 (sub.size() > 0) ? fromString<type0>(sub[0], getDefault<type0>(this->defaultValue, 0)) : (fromMulti<type0>(this->defaultValue[0])), 225 (sub.size() > 1) ? fromString<type1>(sub[1], getDefault<type1>(this->defaultValue, 1)) : (fromMulti<type1>(this->defaultValue[1]))); 226 226 }; 227 227 … … 276 276 { 277 277 (__EXECUTOR_FUNCTIONAL_FUNCTION_EXEC)( 278 fromString<type0>(sub[0], getDefault<type0>(this->defaultValue, 0)),279 fromString<type1>(sub[1], getDefault<type1>(this->defaultValue, 1)),280 fromString<type2>(sub[2], getDefault<type2>(this->defaultValue, 2)));278 (sub.size() > 0) ? fromString<type0>(sub[0], getDefault<type0>(this->defaultValue, 0)) : (fromMulti<type0>(this->defaultValue[0])), 279 (sub.size() > 1) ? fromString<type1>(sub[1], getDefault<type1>(this->defaultValue, 1)) : (fromMulti<type1>(this->defaultValue[1])), 280 (sub.size() > 2) ? fromString<type2>(sub[2], getDefault<type2>(this->defaultValue, 2)) : (fromMulti<type2>(this->defaultValue[2]))); 281 281 }; 282 282 … … 333 333 { 334 334 (__EXECUTOR_FUNCTIONAL_FUNCTION_EXEC)( 335 fromString<type0>(sub[0], getDefault<type0>(this->defaultValue, 0)),336 fromString<type1>(sub[1], getDefault<type1>(this->defaultValue, 1)),337 fromString<type2>(sub[2], getDefault<type2>(this->defaultValue, 2)),338 fromString<type3>(sub[3], getDefault<type3>(this->defaultValue, 3)));335 (sub.size() > 0) ? fromString<type0>(sub[0], getDefault<type0>(this->defaultValue, 0)) : (fromMulti<type0>(this->defaultValue[0])), 336 (sub.size() > 1) ? fromString<type1>(sub[1], getDefault<type1>(this->defaultValue, 1)) : (fromMulti<type1>(this->defaultValue[1])), 337 (sub.size() > 2) ? fromString<type2>(sub[2], getDefault<type2>(this->defaultValue, 2)) : (fromMulti<type2>(this->defaultValue[2])), 338 (sub.size() > 3) ? fromString<type3>(sub[3], getDefault<type3>(this->defaultValue, 3)) : (fromMulti<type3>(this->defaultValue[3]))); 339 339 }; 340 340 … … 392 392 { 393 393 (__EXECUTOR_FUNCTIONAL_FUNCTION_EXEC)( 394 fromString<type0>(sub[0], getDefault<type0>(this->defaultValue, 0)),395 fromString<type1>(sub[1], getDefault<type1>(this->defaultValue, 1)),396 fromString<type2>(sub[2], getDefault<type2>(this->defaultValue, 2)),397 fromString<type3>(sub[3], getDefault<type3>(this->defaultValue, 3)),398 fromString<type4>(sub[4], getDefault<type4>(this->defaultValue, 4)));394 (sub.size() > 0) ? fromString<type0>(sub[0], getDefault<type0>(this->defaultValue, 0)) : (fromMulti<type0>(this->defaultValue[0])), 395 (sub.size() > 1) ? fromString<type1>(sub[1], getDefault<type1>(this->defaultValue, 1)) : (fromMulti<type1>(this->defaultValue[1])), 396 (sub.size() > 2) ? fromString<type2>(sub[2], getDefault<type2>(this->defaultValue, 2)) : (fromMulti<type2>(this->defaultValue[2])), 397 (sub.size() > 3) ? fromString<type3>(sub[3], getDefault<type3>(this->defaultValue, 3)) : (fromMulti<type3>(this->defaultValue[3])), 398 (sub.size() > 4) ? fromString<type4>(sub[4], getDefault<type4>(this->defaultValue, 4)) : (fromMulti<type4>(this->defaultValue[4]))); 399 399 }; 400 400 -
branches/proxy/src/lib/util/substring.cc
r9313 r9316 104 104 105 105 /** @brief An empty String */ 106 const std::string SubString::emptyString = "";106 // const std::string SubString::emptyString = ""; 107 107 /** @brief Helper that gets you a String consisting of all White Spaces */ 108 108 const std::string SubString::WhiteSpaces = " \n\t"; … … 234 234 } 235 235 else 236 return SubString::emptyString; 236 { 237 static std::string empty; 238 return empty; 239 } 237 240 } 238 241 -
branches/proxy/src/lib/util/substring.h
r9314 r9316 84 84 inline unsigned int size() const { return this->strings.size(); }; 85 85 /** @param i the i'th String @returns the i'th string from the subset of Strings */ 86 inline const std::string& operator[](unsigned int i) const { return (i < this->strings.size()) ? this->strings[i] : emptyString; };86 inline const std::string& operator[](unsigned int i) const { return /*(i < this->strings.size()) ? */this->strings[i] /*: emptyString*/; }; 87 87 /** @param i the i'th String @returns the i'th string from the subset of Strings */ 88 88 inline const std::string& getString(unsigned int i) const { return (*this)[i]; }; … … 114 114 std::vector<std::string> strings; //!< strings produced from a single string splitted in multiple strings 115 115 116 static const std::string emptyString;116 // static const std::string emptyString; 117 117 }; 118 118
Note: See TracChangeset
for help on using the changeset viewer.