Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5544 in orxonox.OLD for trunk/src/lib/util/multi_type.h


Ignore:
Timestamp:
Nov 11, 2005, 3:39:27 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: more elaborate MultiType

File:
1 edited

Legend:

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

    r5541 r5544  
    5858  inline MT_Type getType() const { return this->type; };
    5959
    60   bool getBool();
    61   int getInt();
    62   float getFloat();
    63   char getChar();
     60  bool getBool() const;
     61  int getInt() const;
     62  float getFloat() const;
     63  char getChar() const;
    6464  const char* getString();
    6565
     66
     67  void debug();
     68
     69  static const char* MultiTypeToString(MT_Type type);
     70  static MT_Type StringToMultiType(const char* type);
    6671
    6772 private:
     
    6974   union Type
    7075   {
    71      bool             Bool;
    72      int              Int;
    73      float            Float;
    74      char             Char;
    75      char*            String;
    76    } value;
     76     bool              Bool;
     77     int               Int;
     78     float             Float;
     79     char              Char;
     80     char*             String;
    7781
    78    char* storedString;
     82   }                   value;
     83
     84   char*               storedString;
    7985};
    8086
Note: See TracChangeset for help on using the changeset viewer.