Lolly 1.4.27
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Private Attributes | Friends | List of all members
hashtree_rep< K, V > Class Template Reference

#include <hashtree.hpp>

Inheritance diagram for hashtree_rep< K, V >:
Inheritance graph
[legend]
Collaboration diagram for hashtree_rep< K, V >:
Collaboration graph
[legend]

Public Member Functions

 hashtree_rep ()
 
 hashtree_rep (V val)
 
bool contains (K key)
 
void add_child (K key, hashtree< K, V > &child)
 
void add_new_child (K key)
 
void set_label (V val)
 
get_label ()
 

Public Attributes

label
 

Private Attributes

hashmap< K, hashtree< K, V > > children
 
- Private Attributes inherited from concrete_struct
int ref_count
 The reference count for the concrete object.
 

Friends

class hashtree< K, V >
 
int N (hashtree< K, V > tree)
 

Additional Inherited Members

- Private Member Functions inherited from concrete_struct
 concrete_struct ()
 Default constructor for the concrete object. Increments the reference count.
 
virtual ~concrete_struct ()
 Virtual destructor for the concrete object. Decrements the reference count.
 

Detailed Description

template<class K, class V>
class hashtree_rep< K, V >

Definition at line 23 of file hashtree.hpp.

Constructor & Destructor Documentation

◆ hashtree_rep() [1/2]

template<class K , class V >
hashtree_rep< K, V >::hashtree_rep ( )
inline

Definition at line 29 of file hashtree.hpp.

29: children (hashtree<K, V> (false)), label () {}
hashmap< K, hashtree< K, V > > children
Definition hashtree.hpp:24
The list class represents a linked list.
Definition list.hpp:48

◆ hashtree_rep() [2/2]

template<class K , class V >
hashtree_rep< K, V >::hashtree_rep ( V val)
inline

Definition at line 30 of file hashtree.hpp.

Member Function Documentation

◆ contains()

template<class K , class V >
bool hashtree_rep< K, V >::contains ( K key)
inline

Definition at line 47 of file hashtree.ipp.

47 {
48 return children->contains (key);
49}

◆ add_child()

template<class K , class V >
void hashtree_rep< K, V >::add_child ( K key,
hashtree< K, V > & child )

Definition at line 53 of file hashtree.ipp.

53 {
54 child.realize (); // make sure the child has a rep!
55 children (key)= child;
56}

◆ add_new_child()

template<class K , class V >
void hashtree_rep< K, V >::add_new_child ( K key)

Definition at line 60 of file hashtree.ipp.

60 {
62 add_child (key, child);
63}
void add_child(K key, hashtree< K, V > &child)
Definition hashtree.ipp:53

◆ set_label()

template<class K , class V >
void hashtree_rep< K, V >::set_label ( V val)

Definition at line 67 of file hashtree.ipp.

67 {
68 label= val;
69}

◆ get_label()

template<class K , class V >
V hashtree_rep< K, V >::get_label ( )

Definition at line 73 of file hashtree.ipp.

73 {
74 return label;
75}

Friends And Related Symbol Documentation

◆ hashtree< K, V >

template<class K , class V >
friend class hashtree< K, V >
friend

Definition at line 36 of file hashtree.hpp.

◆ N

template<class K , class V >
int N ( hashtree< K, V > tree)
friend

Definition at line 129 of file hashtree.ipp.

129 {
130 return N (ht->children);
131}
friend int N(hashtree< K, V > tree)
Definition hashtree.ipp:129

Member Data Documentation

◆ children

template<class K , class V >
hashmap<K, hashtree<K, V> > hashtree_rep< K, V >::children
private

Definition at line 24 of file hashtree.hpp.

◆ label

template<class K , class V >
V hashtree_rep< K, V >::label

Definition at line 27 of file hashtree.hpp.


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