Changeset 834 for code/branches/core/src/util
- Timestamp:
- Feb 21, 2008, 10:05:05 PM (17 years ago)
- Location:
- code/branches/core/src/util
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core/src/util/MultiTypeMath.h
r797 r834 88 88 bool operator!=(const MultiTypeMath& mtm) const; 89 89 90 inline operator orxonox::Vector2() const { return this->vector2_; } 91 inline operator orxonox::Vector3() const { return this->vector3_; } 92 inline operator orxonox::ColourValue() const { return this->colourvalue_; } 93 inline operator orxonox::Quaternion() const { return this->quaternion_; } 94 inline operator orxonox::Radian() const { return this->radian_; } 95 inline operator orxonox::Degree() const { return this->degree_; } 96 90 97 using MultiTypeString::setValue; 91 98 inline void setValue(const orxonox::Vector2& value) { this->type_ = MT_vector2; this->vector2_ = value; } -
code/branches/core/src/util/MultiTypePrimitive.h
r797 r834 54 54 MultiTypePrimitive(const MultiTypePrimitive& mtp); 55 55 56 inline MultiTypePrimitive& operator=(MultiType value) { this->type_ = MT_null; return *this; } 56 57 inline MultiTypePrimitive& operator=(int value) { this->setValue(value); return *this; } 57 58 inline MultiTypePrimitive& operator=(unsigned int value) { this->setValue(value); return *this; } … … 95 96 inline bool operator!=(bool value) const { return (this->value_.bool_ != value); } 96 97 bool operator!=(const MultiTypePrimitive& mtp) const; 98 99 inline operator int() const { return this->value_.int_; } 100 inline operator unsigned int() const { return this->value_.uint_; } 101 inline operator char() const { return this->value_.char_; } 102 inline operator unsigned char() const { return this->value_.uchar_; } 103 inline operator short() const { return this->value_.short_; } 104 inline operator unsigned short() const { return this->value_.ushort_; } 105 inline operator long() const { return this->value_.long_; } 106 inline operator unsigned long() const { return this->value_.ulong_; } 107 inline operator float () const { return this->value_.float_; } 108 inline operator double () const { return this->value_.double_; } 109 inline operator long double() const { return this->value_.longdouble_; } 110 inline operator bool() const { return this->value_.bool_; } 97 111 98 112 inline void setValue(int value) { this->type_ = MT_int; this->value_.int_ = value; } -
code/branches/core/src/util/MultiTypeString.h
r797 r834 63 63 using MultiTypePrimitive::operator==; 64 64 inline bool operator==(const char* value) const { return (this->string_ == std::string(value)); } 65 inline bool operator==(const std::string& value) const { return (this->string_ == value); }65 inline bool operator==(const std::string& value) const { return (this->string_ == value); } 66 66 bool operator==(const MultiTypeString& mtp) const; 67 67 68 68 using MultiTypePrimitive::operator!=; 69 69 inline bool operator!=(const char* value) const { return (this->string_ != std::string(value)); } 70 inline bool operator!=(const std::string& value) const { return (this->string_ != value); }70 inline bool operator!=(const std::string& value) const { return (this->string_ != value); } 71 71 bool operator!=(const MultiTypeString& mtp) const; 72 73 inline operator std::string() const { return this->string_; } 74 inline operator const char*() const { return this->string_.c_str(); } 72 75 73 76 using MultiTypePrimitive::setValue; 74 77 inline void setValue(const char* value) { this->type_ = MT_string; this->string_ = std::string(value); } 75 inline void setValue(const std::string& value) { this->type_ = MT_string; this->string_ = value; }78 inline void setValue(const std::string& value) { this->type_ = MT_string; this->string_ = value; } 76 79 void setValue(const MultiTypeString& mtp); 77 80 78 inline std::string& getString() { return this->string_; }81 inline std::string& getString() { return this->string_; } 79 82 inline const char* getConstChar() { return this->string_.c_str(); } 80 83 81 84 using MultiTypePrimitive::getValue; 82 inline void getValue(std::string* variable) const { (*variable) = this->string_; }85 inline void getValue(std::string* variable) const { (*variable) = this->string_; } 83 86 inline void getValue(const char** variable) const { (*variable) = this->string_.c_str(); } 84 87
Note: See TracChangeset
for help on using the changeset viewer.