78 else return bb1->equal (
bb2.rep);
90 else return !
bb1->equal (
bb2.rep);
101 if (
is_nil (
bb))
return out <<
"nil";
102 else return bb->display (out);
#define ASSERT(cond, msg)
Macro used to assert that a condition is true, and throw an exception with an error message if the co...
tm_ostream & operator<<(tm_ostream &out, blackbox bb)
Output stream operator for blackbox instances.
bool operator==(blackbox bb1, blackbox bb2)
Equality operator for blackbox instances.
bool operator!=(blackbox bb1, blackbox bb2)
Inequality operator for blackbox instances.
T open_box(blackbox bb)
Open the blackbox instance and retrieve the stored data.
blackbox close_box(const T &data)
Create a blackbox instance with the given data.
int type_box(blackbox bb)
Get the type of the blackbox instance.
A template class representing an opaque pointer.
virtual tm_ostream & display(tm_ostream &out)=0
virtual bool equal(blackbox_rep *ptr)=0
#define ABSTRACT_NULL_CODE(PTR)
Macro for abstract null indirect structure code definition.
#define ABSTRACT_NULL(PTR)
Macro for abstract null indirect structure definition.
The list class represents a linked list.
bool equal(blackbox_rep *ptr)
Check if the whitebox representation is equal to another blackbox_rep pointer.
int get_type()
Get the type of the whitebox representation.
whitebox_rep(const T &data2)
Constructor.
tm_ostream & display(tm_ostream &out)
Display the whitebox representation.
Structure representing an abstract object with a reference count.
Helper struct for type identification and initialization.