23template <
class K,
class V>
32template <
class K,
class V>
45template <
class K,
class V>
48 return children->contains (key);
51template <
class K,
class V>
55 children (key)=
child;
58template <
class K,
class V>
62 add_child (key,
child);
65template <
class K,
class V>
71template <
class K,
class V>
81template <
class K,
class V>
94template <
class K,
class V>
102template <
class K,
class V>
105 if (*this->
contains (key))
return *this->children (key);
106 else TM_FAILED (
"read-access to non-existent node requested");
109template <
class K,
class V>
113 if (!(*this)->contains (key)) (*this)->add_new_child (key);
114 return (*this)->children (key);
121template <
class K,
class V>
127template <
class K,
class V>
130 return N (
ht->children);
#define TM_FAILED(msg)
Macro used to throw an exception with a specified error message.
#define DEC_COUNT(R)
Macro used to decrement the reference count for a structure object and delete it if the count reaches...
#define INC_COUNT(R)
Macro used to increment the reference count for a structure object.
void add_child(K key, hashtree< K, V > &child)
void add_new_child(K key)
hashtree< K, V > & operator=(hashtree< K, V > x)
hashtree_rep< K, V > * operator->(void)
hashtree< K, V > operator[](K key)
hashtree< K, V > operator()(K key)
friend bool is_nil(hashtree< K, V > ht)
The list class represents a linked list.
list(T item)
Construct a new list object with a single item.
int N(hashtree< K, V > ht)
bool contains(list< T > l, T what)
Check if a list contains a specific item.