Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

ht_stree Class Reference

#include <htdata.h>

Inheritance diagram for ht_stree:

ht_tree Object ht_dtree List of all members.

Public Member Functions

void enum_next_i (ht_tree_node *node, Object *prevkey, ht_tree_node **retv)
void enum_prev_i (ht_tree_node *node, Object *nextkey, ht_tree_node **retv)
void free_all (ht_tree_node *node)
void free_skeleton (ht_tree_node *node)
ht_tree_nodeget_leftmost_node (ht_tree_node *node)
bool get_node_and_parent (Object *key, ht_tree_node **node, ht_tree_node **parent_node, int *direction)
ht_tree_nodeget_node_i (Object *key)
ht_tree_nodeget_rightmost_node (ht_tree_node *node)
void insert_ltable (ht_tree_node **node, ht_tree_node **start, ht_tree_node **end)
virtual void populate_ltable (ht_tree_node ***ltable, ht_tree_node *node)
void init (compare_keys_func_ptr compare_keys)
virtual void done ()
virtual void destroy ()
virtual void balance ()
virtual uint count ()
virtual bool del (Object *key)
virtual void empty ()
virtual Objectenum_next (Object **value, Object *prevkey)
virtual Objectenum_prev (Object **value, Object *nextkey)
virtual Objectget (Object *key)
virtual bool insert (Object *key, Object *value)
virtual int load (ht_object_stream *s)
virtual OBJECT_ID object_id () const
virtual void store (ht_object_stream *s)
virtual void set_compare_keys (compare_keys_func_ptr new_compare_keys)

Public Attributes

ht_tree_noderoot
uint node_count

Member Function Documentation

void ht_stree::balance  )  [virtual]
 

Reimplemented from ht_tree.

Definition at line 250 of file htdata.cc.

References set_compare_keys().

Referenced by ht_dtree::del(), ht_dtree::insert(), and load().

uint ht_stree::count  )  [virtual]
 

Reimplemented from ht_tree.

Reimplemented in ht_dtree.

Definition at line 255 of file htdata.cc.

References node_count, and uint.

Referenced by store().

bool ht_stree::del Object key  )  [virtual]
 

Reimplemented from ht_tree.

Reimplemented in ht_dtree.

Definition at line 260 of file htdata.cc.

References Object::done(), get_leftmost_node(), get_node_and_parent(), get_rightmost_node(), ht_tree_node::key, ht_tree_node::left, node_count, NULL, ht_tree_node::right, root, and ht_tree_node::value.

Referenced by unregister_atom().

void ht_stree::destroy  )  [virtual]
 

Reimplemented from ht_tree.

Definition at line 223 of file htdata.cc.

References done(), and empty().

Referenced by AnalyserOutput::done(), ht_registry::done(), done_atom(), and ht_registry_data_stree::~ht_registry_data_stree().

void ht_stree::done  )  [virtual]
 

Reimplemented from ht_tree.

Reimplemented in ht_dtree.

Definition at line 218 of file htdata.cc.

References ht_tree::done().

Referenced by destroy(), and ht_dtree::done().

void ht_stree::empty  )  [virtual]
 

Definition at line 296 of file htdata.cc.

References free_all(), NULL, and root.

Referenced by destroy(), and AnalyserOutput::reset().

Object * ht_stree::enum_next Object **  value,
Object prevkey
[virtual]
 

Reimplemented from ht_tree.

Reimplemented in ht_dtree.

Definition at line 324 of file htdata.cc.

References ht_tree::compare_keys, enum_next_i(), get_leftmost_node(), ht_tree_node::key, ht_tree_node::left, NULL, ht_tree_node::right, root, ht_tree_node::value, and value.

Referenced by ClassAnalyser::beginAnalysis(), RegistryFs::enumFiletype(), find_atom_rev(), ht_registry::get_node_type_desc(), ht_registry::register_node_type(), and store().

void ht_stree::enum_next_i ht_tree_node node,
Object prevkey,
ht_tree_node **  retv
 

Definition at line 304 of file htdata.cc.

References ht_tree::compare_keys, ht_tree_node::key, NULL, and ht_tree_node::right.

Referenced by ht_dtree::enum_next(), and enum_next().

Object * ht_stree::enum_prev Object **  value,
Object nextkey
[virtual]
 

Reimplemented from ht_tree.

Reimplemented in ht_dtree.

Definition at line 361 of file htdata.cc.

References ht_tree::compare_keys, enum_prev_i(), get_rightmost_node(), ht_tree_node::key, ht_tree_node::left, NULL, ht_tree_node::right, root, ht_tree_node::value, and value.

void ht_stree::enum_prev_i ht_tree_node node,
Object nextkey,
ht_tree_node **  retv
 

Definition at line 314 of file htdata.cc.

References ht_tree::compare_keys, ht_tree_node::key, ht_tree_node::left, and NULL.

Referenced by ht_dtree::enum_prev(), and enum_prev().

void ht_stree::free_all ht_tree_node node  ) 
 

Definition at line 398 of file htdata.cc.

References Object::done(), ht_tree_node::key, ht_tree_node::left, node_count, ht_tree_node::right, and ht_tree_node::value.

Referenced by empty().

void ht_stree::free_skeleton ht_tree_node node  ) 
 

Definition at line 414 of file htdata.cc.

References ht_tree_node::left, node_count, and ht_tree_node::right.

Object * ht_stree::get Object key  )  [virtual]
 

Reimplemented from ht_tree.

Definition at line 422 of file htdata.cc.

References get_node_i(), NULL, and ht_tree_node::value.

Referenced by find_atom(), AnalyserOutput::getAddr(), and ht_registry::lookup_node_type().

ht_tree_node * ht_stree::get_leftmost_node ht_tree_node node  ) 
 

Definition at line 465 of file htdata.cc.

References ht_tree_node::left.

Referenced by del(), ht_dtree::enum_next(), and enum_next().

bool ht_stree::get_node_and_parent Object key,
ht_tree_node **  node,
ht_tree_node **  parent_node,
int *  direction
 

Definition at line 441 of file htdata.cc.

References ht_tree::compare_keys, ht_tree_node::key, ht_tree_node::left, NULL, ht_tree_node::right, and root.

Referenced by del().

ht_tree_node * ht_stree::get_node_i Object key  ) 
 

Definition at line 429 of file htdata.cc.

References ht_tree::compare_keys, ht_tree_node::key, ht_tree_node::left, NULL, ht_tree_node::right, and root.

Referenced by ht_dtree::del(), and get().

ht_tree_node * ht_stree::get_rightmost_node ht_tree_node node  ) 
 

Definition at line 471 of file htdata.cc.

References ht_tree_node::right.

Referenced by del(), ht_dtree::enum_prev(), and enum_prev().

void ht_stree::init compare_keys_func_ptr  compare_keys  ) 
 

Reimplemented from ht_tree.

Definition at line 211 of file htdata.cc.

References compare_keys_func_ptr, Object::init(), node_count, NULL, and root.

Referenced by class_read(), ht_registry::create_subdir(), ht_registry::init(), init_atom(), ht_streamfile_modifier::mod_pages_create(), parse_info_node(), and ht_ne::relocate().

bool ht_stree::insert Object key,
Object value
[virtual]
 

Reimplemented from ht_tree.

Reimplemented in ht_dtree.

Definition at line 477 of file htdata.cc.

References ht_tree::compare_keys, ht_tree_node::left, node_count, NULL, ht_tree_node::right, root, and value.

Referenced by class_read(), ht_registry::init(), load(), register_atom(), ht_registry::register_node_type(), and ht_ne::relocate().

void ht_stree::insert_ltable ht_tree_node **  node,
ht_tree_node **  start,
ht_tree_node **  end
 

Definition at line 497 of file htdata.cc.

References NULL.

Referenced by ht_dtree::set_compare_keys(), and set_compare_keys().

int ht_stree::load ht_object_stream s  )  [virtual]
 

loads object from object stream.

Returns:
ht_stream errorcode

Reimplemented from Object.

Definition at line 526 of file htdata.cc.

References assert, balance(), compare_keys_func_ptr, find_atom(), ht_layer_stream::get_error(), ht_object_stream::getIntDec(), ht_object_stream::getIntHex(), insert(), node_count, NULL, root, stree_load(), uint, and value.

OBJECT_ID ht_stree::object_id  )  const [virtual]
 

Returns:
unique object id.

Reimplemented from Object.

Definition at line 572 of file htdata.cc.

References ATOM_HT_STREE.

void ht_stree::populate_ltable ht_tree_node ***  ltable,
ht_tree_node node
[virtual]
 

Reimplemented in ht_dtree.

Definition at line 577 of file htdata.cc.

References ht_tree_node::left, and ht_tree_node::right.

Referenced by set_compare_keys().

void ht_stree::set_compare_keys compare_keys_func_ptr  new_compare_keys  )  [virtual]
 

Reimplemented from ht_tree.

Reimplemented in ht_dtree.

Definition at line 229 of file htdata.cc.

References compare_keys_func_ptr, insert_ltable(), malloc(), node_count, populate_ltable(), qsort_compare_compare_keys, qsort_compare_keys_tree_node(), and root.

Referenced by balance(), and parse_info_node().

void ht_stree::store ht_object_stream s  )  [virtual]
 

stores object.

Reimplemented from Object.

Definition at line 556 of file htdata.cc.

References count(), enum_next(), find_atom_rev(), NULL, ht_object_stream::putIntDec(), ht_object_stream::putIntHex(), ht_object_stream::putObject(), and value.


Member Data Documentation

uint ht_stree::node_count
 

Definition at line 127 of file htdata.h.

Referenced by count(), del(), free_all(), free_skeleton(), init(), insert(), load(), and set_compare_keys().

ht_tree_node* ht_stree::root
 

Definition at line 126 of file htdata.h.

Referenced by del(), empty(), enum_next(), enum_prev(), get_node_and_parent(), get_node_i(), init(), insert(), load(), and set_compare_keys().


The documentation for this class was generated from the following files:
Generated on Fri May 7 21:16:03 2004 by doxygen 1.3.5