- Timestamp:
- Jan 21, 2006, 3:57:10 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/util/multi_type.h
r6643 r6644 43 43 44 44 MultiType& operator=(const MultiType& mt); 45 MultiType& operator=(bool value) { this->setBool(value); return *this; }; 46 MultiType& operator=(int value) { this->setInt(value); return *this; }; 47 MultiType& operator=(float value) { this->setFloat(value); return *this; }; 48 MultiType& operator=(char value) { this->setChar(value); return *this; }; 49 MultiType& operator=(const char* value) { this->setString(value); return *this; }; 50 45 51 bool operator==(const MultiType& mt) const; 46 bool operator==(bool value) const { return this->getBool() == value; };47 bool operator==(int value) const { return this->getInt() == value; };48 bool operator==(float value) const { return this->getFloat() == value; };49 bool operator==(char value) const { return this->getChar() == value; };52 bool operator==(bool value) const { return (this->getBool() == value); }; 53 bool operator==(int value) const { return (this->getInt() == value); }; 54 bool operator==(float value) const { return (this->getFloat() == value); }; 55 bool operator==(char value) const { return (this->getChar() == value); }; 50 56 bool operator==(const char* value) const; 51 57 … … 58 64 void setString(const char* value); 59 65 66 // for your convenience. 60 67 inline void setValue(bool value) { this->setBool(value); }; 61 68 inline void setValue(int value) { this->setInt(value); }; … … 87 94 88 95 private: 89 90 96 union MultiTypeValue 91 97 {
Note: See TracChangeset
for help on using the changeset viewer.