Changeset 7229 in orxonox.OLD for branches/resources/src/lib/util/multi_type.h
- Timestamp:
- Mar 21, 2006, 3:13:34 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/resources/src/lib/util/multi_type.h
r7225 r7229 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 /** 99 * The stored internal Value of the MultiType is handled in this union 100 * plus the string down below 101 */ 98 102 union MultiTypeValue 99 103 { 100 bool Bool; 101 int Int; 102 float Float; 103 char Char; 104 bool Bool; //!< If Type == MT_BOOL this is the MultiType's value 105 int Int; //!< If Type == MT_INT this is the MultiType's value 106 float Float; //!< If Type == MT_FLOAT this is the MultiType's value 107 char Char; //!< If Type == MT_CHAR this is the MultiType's value 104 108 // std::string* String; 105 } value; 106 std::string storedString; 107 MT_Type type; 109 } value; //!< The stored internal value. 110 std::string storedString; //!< The String if either MT_TYPE == MT_STRING or if temporary requested 111 MT_Type type; //!< The Type of the MultiString. 112 113 static const std::string multiTypeNames[]; //!< An array to convert from String to MT_TYPE and backwords. 108 114 }; 109 115
Note: See TracChangeset
for help on using the changeset viewer.