00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef YCPInteger_h
00022 #define YCPInteger_h
00023
00024
00025 #include "YCPValue.h"
00026
00027
00033 class YCPIntegerRep : public YCPValueRep
00034 {
00035 long long v;
00036
00037 protected:
00038 friend class YCPInteger;
00039
00043 YCPIntegerRep(long long v);
00044
00048 YCPIntegerRep(const char *r);
00049
00050 public:
00055 long long value() const;
00056
00064 YCPOrder compare(const YCPInteger &v) const;
00065
00070 string toString() const;
00071
00075 std::ostream & toStream (std::ostream & str) const;
00076
00080 YCPValueType valuetype() const;
00081 };
00082
00089 class YCPInteger : public YCPValue
00090 {
00091 DEF_COMMON(Integer, Value);
00092 public:
00093 YCPInteger(long long v) : YCPValue(new YCPIntegerRep(v)) {}
00094 YCPInteger(const char *r) : YCPValue(new YCPIntegerRep(r)) {}
00095 YCPInteger(std::istream & str);
00096 };
00097
00098 #endif // YCPInteger_h