Changeset 931 for code/branches/core2/src/util
- Timestamp:
- Mar 27, 2008, 3:56:13 AM (17 years ago)
- Location:
- code/branches/core2/src/util
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core2/src/util/Convert.h
r925 r931 541 541 }; 542 542 543 544 ////////////////545 // XMLElement //546 ////////////////547 548 // orxonox::Element to std::string549 template <>550 class Converter<orxonox::Element, std::string>551 {552 public:553 bool operator()(std::string* output, const orxonox::Element& input) const554 {555 std::ostringstream ostream;556 if (ostream << input)557 {558 (*output) = ostream.str();559 return true;560 }561 562 return false;563 }564 };565 566 // std::string to orxonox::Element567 template <>568 class Converter<std::string, orxonox::Element>569 {570 public:571 bool operator()(orxonox::Element* output, const std::string& input) const572 {573 std::istringstream istream(input);574 if (istream >> (*output))575 return true;576 577 return false;578 }579 };580 581 582 543 #endif /* _Convert_H__ */ -
code/branches/core2/src/util/MultiTypeString.cc
r925 r931 32 32 MultiTypeString::MultiTypeString(MultiType type) : MultiTypePrimitive(type) 33 33 { 34 if (type == MT_constchar) 35 this->string_ = std::string(""); 36 else if (type == MT_string) 37 this->string_ = std::string(""); 34 // Nothing to do for string and xml-element 38 35 } 39 36 -
code/branches/core2/src/util/String.cc
r871 r931 83 83 bool isEmpty(const std::string& str) 84 84 { 85 return getStripped(str) == ""; 85 std::string temp = getStripped(str); 86 return ((temp == "") || (temp.size() == 0)); 86 87 } 87 88
Note: See TracChangeset
for help on using the changeset viewer.