1 #if !defined(H_LISPCONS)
11 class Cons
: public Obj
15 typedef Cons
* ConsPtr
;
16 typedef Cons
& ConsRef
;
19 value_(NIL::make(), NIL::make())
23 Cons(const Cons
& other
)
26 value_
= other
.value_
;
29 Obj::eObjectType
Cons::getObjectType() const
48 return new Cons(*this);
51 virtual void print(std::ostream
& out
) const
54 value_
.first
->print(out
);
56 value_
.second
->print(out
);
60 bool operator==(const Obj
* other
)
63 if (other
->getObjectType() == eConsObj
)
64 result
= ( ( value_
.first
== dynamic_cast<const Cons
*>(other
)->value_
.first
) &&
65 ( value_
.second
== dynamic_cast<const Cons
*>(other
)->value_
.second
) );
81 std::pair
<Obj
*, Obj
*> value_
;