1*fce4895dSRene Gollent /* 2*fce4895dSRene Gollent * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de. 3*fce4895dSRene Gollent * Distributed under the terms of the MIT License. 4*fce4895dSRene Gollent */ 5*fce4895dSRene Gollent #ifndef INTEGER_VALUE_H 6*fce4895dSRene Gollent #define INTEGER_VALUE_H 7*fce4895dSRene Gollent 8*fce4895dSRene Gollent 9*fce4895dSRene Gollent #include "Value.h" 10*fce4895dSRene Gollent 11*fce4895dSRene Gollent 12*fce4895dSRene Gollent class IntegerValue : public Value { 13*fce4895dSRene Gollent public: 14*fce4895dSRene Gollent IntegerValue(const BVariant& value); 15*fce4895dSRene Gollent virtual ~IntegerValue(); 16*fce4895dSRene Gollent 17*fce4895dSRene Gollent bool IsSigned() const; 18*fce4895dSRene Gollent ToInt64()19*fce4895dSRene Gollent int64 ToInt64() const 20*fce4895dSRene Gollent { return fValue.ToInt64(); } ToUInt64()21*fce4895dSRene Gollent uint64 ToUInt64() const 22*fce4895dSRene Gollent { return fValue.ToUInt64(); } GetValue()23*fce4895dSRene Gollent const BVariant& GetValue() const 24*fce4895dSRene Gollent { return fValue; } 25*fce4895dSRene Gollent 26*fce4895dSRene Gollent virtual bool ToString(BString& _string) const; 27*fce4895dSRene Gollent virtual bool ToVariant(BVariant& _value) const; 28*fce4895dSRene Gollent 29*fce4895dSRene Gollent virtual bool operator==(const Value& other) const; 30*fce4895dSRene Gollent 31*fce4895dSRene Gollent protected: 32*fce4895dSRene Gollent BVariant fValue; 33*fce4895dSRene Gollent }; 34*fce4895dSRene Gollent 35*fce4895dSRene Gollent 36*fce4895dSRene Gollent #endif // INTEGER_VALUE_H 37