Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
Apr 27, 2006, 4:49:31 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: small fixes

File:
1 edited

Legend:

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

    r7225 r7401  
    9292    void debug() const;
    9393
    94     static const char* MultiTypeToString(MT_Type type);
     94    static const std::string& MultiTypeToString(MT_Type type);
    9595    static MT_Type StringToMultiType(const std::string& type);
    9696
    9797  private:
     98    //! A union, that combines types into as little memory as possible.
    9899    union MultiTypeValue
    99100    {
    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.
    108110};
    109111
Note: See TracChangeset for help on using the changeset viewer.