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