23 class node_link_amorph;
40 class node :
public virtual basis::root_object
43 node(
int number_of_links = 0);
95 node_link_amorph *_links;
97 void set_empty(
int link_number);
113 template <
class contents>
123 {
if (&to_copy !=
this) _storage = to_copy;
return *
this; }
125 const contents &
stored()
const {
return _storage; }
the basket class holds an object and supports connecting them as nodes.
const contents & stored() const
allows a peek at the stored object.
basket(const basket &to_copy)
basket(int links, const contents &to_store=contents())
contents & stored()
provides access to the stored object.
basket & operator=(const contents &to_copy)
An object representing the interstitial cell in most linked data structures.
void zap_link(int link_number)
the specified link is removed from the node.
void set_link(int link_number, node *new_link)
Connects the node "new_link" to this node.
int links() const
Returns the number of links the node currently holds.
void insert_link(int where, node *to_add=NULL_POINTER)
adds a new link prior to the position specified in "where".
node(int number_of_links=0)
the constructor provides for "number_of_links" links initially.
virtual ~node()
the destructor simply invalidates the node.
int which(node *to_find) const
locates the index where "to_find" lives in our list of links.
node * get_link(int link_number) const
Returns the node that is connected to the specified "link_number".
Constants and objects used throughout HOOPLE.
#define NULL_POINTER
The value representing a pointer to nothing.