Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6644 in orxonox.OLD for trunk/src


Ignore:
Timestamp:
Jan 21, 2006, 3:57:10 PM (19 years ago)
Author:
bensch
Message:

trunk: MultiType equalities

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/util/multi_type.h

    r6643 r6644  
    4343
    4444    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
    4551    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); };
    5056    bool operator==(const char* value) const;
    5157
     
    5864    void setString(const char* value);
    5965
     66    // for your convenience.
    6067    inline void setValue(bool value) { this->setBool(value); };
    6168    inline void setValue(int value) { this->setInt(value); };
     
    8794
    8895  private:
    89 
    9096    union MultiTypeValue
    9197    {
Note: See TracChangeset for help on using the changeset viewer.