feisty meow concerns codebase  2.140
nodes::basket< contents > Class Template Reference

the basket class holds an object and supports connecting them as nodes. More...

#include <node.h>

Inheritance diagram for nodes::basket< contents >:
Collaboration diagram for nodes::basket< contents >:

Public Member Functions

 basket (int links, const contents &to_store=contents())
 
 basket (const basket &to_copy)
 
basketoperator= (const contents &to_copy)
 
const contents & stored () const
 allows a peek at the stored object. More...
 
contents & stored ()
 provides access to the stored object. More...
 
- Public Member Functions inherited from nodes::node
 node (int number_of_links=0)
 the constructor provides for "number_of_links" links initially. More...
 
virtual ~node ()
 the destructor simply invalidates the node. More...
 
int links () const
 Returns the number of links the node currently holds. More...
 
void set_link (int link_number, node *new_link)
 Connects the node "new_link" to this node. More...
 
nodeget_link (int link_number) const
 Returns the node that is connected to the specified "link_number". More...
 
void zap_link (int link_number)
 the specified link is removed from the node. More...
 
void insert_link (int where, node *to_add=NULL_POINTER)
 adds a new link prior to the position specified in "where". More...
 
int which (node *to_find) const
 locates the index where "to_find" lives in our list of links. More...
 

Detailed Description

template<class contents>
class nodes::basket< contents >

the basket class holds an object and supports connecting them as nodes.

the templated object is required to provide both a default constructor and a copy constructor.

Definition at line 114 of file node.h.

Constructor & Destructor Documentation

◆ basket() [1/2]

template<class contents >
nodes::basket< contents >::basket ( int  links,
const contents &  to_store = contents() 
)
inline

Definition at line 117 of file node.h.

◆ basket() [2/2]

template<class contents >
nodes::basket< contents >::basket ( const basket< contents > &  to_copy)
inline

Definition at line 120 of file node.h.

Member Function Documentation

◆ operator=()

template<class contents >
basket& nodes::basket< contents >::operator= ( const contents &  to_copy)
inline

Definition at line 122 of file node.h.

◆ stored() [1/2]

template<class contents >
contents& nodes::basket< contents >::stored ( )
inline

provides access to the stored object.

Definition at line 127 of file node.h.

◆ stored() [2/2]

template<class contents >
const contents& nodes::basket< contents >::stored ( ) const
inline

allows a peek at the stored object.

Definition at line 125 of file node.h.


The documentation for this class was generated from the following file: