1 #ifndef SYMBOL_TREE_CLASS
2 #define SYMBOL_TREE_CLASS
26 class symbol_tree_associations;
102 symbol_tree_associations *_associations;
Provides a dynamically resizable ASCII character string.
Outcomes describe the state of completion for an operation.
A symbol table that supports scope nesting and/or trees of symbol tables.
DEFINE_CLASS_NAME("symbol_tree")
void sort()
sorts the sub-nodes of this symbol_tree.
symbol_tree(const basis::astring &node_name, int estimated_elements=100)
creates a symbol_tree node with the "node_name".
basis::astring text_form() const
traverses the tree to build a textual list of the nodes.
virtual basis::outcome prune(tree *to_zap)
removes a sub-tree "to_zap".
void hash_appropriately(int estimated_elements)
resizes the hashing parameter to limit bucket sizes.
bool add(symbol_tree *to_add)
adds a child to this symbol_tree.
symbol_tree * find(const basis::astring &to_find, find_methods how, basis::string_comparator_function *comp=NULL_POINTER)
returns the node specified by "to_find" or NULL_POINTER.
const basis::astring & name() const
returns the name of this node.
virtual ~symbol_tree()
all child nodes will be deleted too.
symbol_tree * branch(int index) const
returns the "index"th branch.
void rehash(int estimated_elements)
resizes the underlying symbol_table for this node.
int estimated_elements() const
returns the number of bits in this node's table.
int children() const
returns the number of children of this node.
A dynamically linked tree with an arbitrary number of branches.
Constants and objects used throughout HOOPLE.
#define NULL_POINTER
The value representing a pointer to nothing.
bool string_comparator_function(const astring &a, const astring &b)
returns true if the strings "a" and "b" are considered equal.