- Timestamp:
- Sep 14, 2008, 11:48:18 PM (16 years ago)
- Location:
- code/branches/core3/src/util
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core3/src/util/MultiType.h
r1768 r1780 129 129 130 130 virtual void toString(std::ostream& outstream) const = 0; 131 //virtual void toString(std::ostream& outstream) const = 0;132 //inline friend virtual std::ostream& operator <<(std::ostream& outstream, const MT_ValueBase& mtb);133 131 134 132 MT_Type type_; … … 240 238 template <class T> operator T*() const { return ((T*)this->operator void*()); } 241 239 242 inline friend std::ostream& operator<<(std::ostream& outstream, const MultiType& mt) { if (mt.value_) { mt.value_->toString(outstream); } return outstream; }243 244 240 inline void getValue(char* value) const { if (this->value_) { (*value) = (*this->value_); } } 245 241 inline void getValue(unsigned char* value) const { if (this->value_) { (*value) = (*this->value_); } } … … 322 318 }; 323 319 324 //_UtilExport inline std::ostream& operator<<(std::ostream& outstream, const MultiType& mt) { if (mt.value_) { mt.value_->toString(outstream); } return outstream; }320 _UtilExport inline std::ostream& operator<<(std::ostream& outstream, const MultiType& mt) { if (mt.value_) { mt.value_->toString(outstream); } return outstream; } 325 321 326 322 template <> inline bool MultiType::isType<char>() const { return (this->value_ && this->value_->type_ == MT_char); } -
code/branches/core3/src/util/MultiTypeValue.h
r1777 r1780 91 91 inline operator orxonox::Degree() const { return getConvertedValue<T, orxonox::Degree> (this->value_); } 92 92 93 inline void toString(std::ostream& outstream) const { std::operator <<(outstream, conversion_cast<std::string>(this->value_)); } 94 //inline friend std::ostream& operator <<(std::ostream& outstream, const MT_Value& mtv) { outstream << conversion_cast<std::string>(this->value_); return outsream; } 93 inline void toString(std::ostream& outstream) const { outstream << this->value_; } 95 94 96 95 T value_;
Note: See TracChangeset
for help on using the changeset viewer.