#ifndef VARIABLE_H #define VARIABLE_H #include #include #include class Variable { public: enum Type { Null, Int, Float, Bool, String, List, Dictionary }; public: Variable(); Variable( Type eType ); Variable( int64_t iValue ); Variable( double fValue ); Variable( bool bValue ); Variable( const Bu::String &sValue ); virtual ~Variable(); Variable &operator=( const Variable &rhs ); Variable &operator+=( const Variable &rhs ); Variable &operator-=( const Variable &rhs ); Variable &operator*=( const Variable &rhs ); Variable &operator/=( const Variable &rhs ); Variable &operator+( const Variable &rhs ); Variable &operator-( const Variable &rhs ); Variable &operator*( const Variable &rhs ); Variable &operator/( const Variable &rhs ); Variable &operator!=( const Variable &rhs ); Variable &operator>( const Variable &rhs ); Variable &operator<( const Variable &rhs ); Variable &operator>=( const Variable &rhs ); Variable &operator<=( const Variable &rhs ); private: Type eType; typedef Bu::List VList; typedef Bu::Hash VHash; union { int64_t iValue; double fValue; bool bValue; Bu::String *sValue; VList *lValue; VHash *hValue; }; }; #endif