Changeset 7401 in orxonox.OLD for trunk/src/lib/util/multi_type.h
- Timestamp:
- Apr 27, 2006, 4:49:31 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/util/multi_type.h
r7225 r7401 92 92 void debug() const; 93 93 94 static const char*MultiTypeToString(MT_Type type);94 static const std::string& MultiTypeToString(MT_Type type); 95 95 static MT_Type StringToMultiType(const std::string& type); 96 96 97 97 private: 98 //! A union, that combines types into as little memory as possible. 98 99 union MultiTypeValue 99 100 { 100 bool Bool; 101 int Int; 102 float Float; 103 char Char; 104 // std::string* String; 105 } value; 106 std::string storedString; 107 MT_Type type; 101 bool Bool; //!< If it is a BOOL 102 int Int; //!< If it is an INT 103 float Float; //!< If it is a FLOAT 104 char Char; //!< If it is a CHAR 105 } value; //!< The Value. 106 std::string storedString; //!< The Stored String. 107 MT_Type type; //!< The Type stored in this MultiType 108 109 static const std::string typeNames[]; //!< List of TypeNames for conversion. 108 110 }; 109 111
Note: See TracChangeset
for help on using the changeset viewer.