2 #ifndef LISP_FIXNUM_H_INCLUDED
3 #define LISP_FIXNUM_H_INCLUDED
10 class Fixnum
: public Obj
14 typedef Fixnum
* FixnumPtr
;
15 typedef Fixnum
& FixnumRef
;
20 Fixnum(const Fixnum
& other
)
23 value_
= other
.value_
;
26 virtual eObjectType
getObjectType() const
31 virtual Fixnum
* create(void) const
33 FixnumPtr result
= new Fixnum();
37 virtual Fixnum
* clone() const
39 FixnumPtr result
= new Fixnum(*this);
43 void print(std::ostream
& out
) const
48 // bool identify(std::string in) const
53 bool operator==(const Obj
* other
)
56 if (other
->getObjectType() == eFixnumObj
)
57 result
= ( value_
== dynamic_cast<const Fixnum
*>(other
)->value_
);