Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6693 in orxonox.OLD for branches/network/src/lib/util/multi_type.h


Ignore:
Timestamp:
Jan 25, 2006, 2:19:46 PM (18 years ago)
Author:
patrick
Message:

branches: removed spaceshipcontrol branche

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/network/src/lib/util/multi_type.h

    r5659 r6693  
    3131 */
    3232class MultiType {
    33 
    3433  public:
    3534    MultiType();
     
    4241    virtual ~MultiType();
    4342
    44     MultiType& operator= (const MultiType& mt);
     43    MultiType& operator=(const MultiType& mt);
     44    MultiType& operator=(bool value) { this->setBool(value); return *this; };
     45    MultiType& operator=(int value) { this->setInt(value); return *this; };
     46    MultiType& operator=(float value) { this->setFloat(value); return *this; };
     47    MultiType& operator=(char value) { this->setChar(value); return *this; };
     48    MultiType& operator=(const char* value) { this->setString(value); return *this; };
    4549
    46     void setType(int type);
     50    bool operator==(const MultiType& mt) const;
     51    bool operator==(bool value) const { return (this->getBool() == value); };
     52    bool operator==(int value) const { return (this->getInt() == value); };
     53    bool operator==(float value) const { return (this->getFloat() ==  value); };
     54    bool operator==(char value) const { return (this->getChar() == value); };
     55    bool operator==(const char* value) const;
     56    bool operator==(MT_Type type) const { return (this->type == type); }
     57    bool operator!=(MT_Type type) const { return (this->type != type); }
     58
     59    void setType(MT_Type type);
    4760
    4861    void setBool(bool value);
     
    5265    void setString(const char* value);
    5366
     67    // for your convenience.
    5468    inline void setValue(bool value) { this->setBool(value); };
    5569    inline void setValue(int value) { this->setInt(value); };
     
    8195
    8296  private:
    83 
    8497    union MultiTypeValue
    8598    {
Note: See TracChangeset for help on using the changeset viewer.