User Documentation
RAVL, Recognition And Vision Library
Ravl - Core - Trees - HashTreeC<class KeyT,class DataT>

HashTreeC::HashTreeC(HashTreeNodeC &)
HashTreeC::HashTreeC(const DataT &)
HashTreeC::Follow(const DListC &)
HashTreeC::Child(const KeyT &,HashTreeNodeC &)
HashTreeC::Add(const KeyT &,const DataT &)
HashTreeC::Add(const KeyT &,const HashTreeC &)
HashTreeC::Children(void) const
HashTreeNodeC::Data(void) const
HashTreeNodeC::IsLeaf(void) const
HashTreeNodeC::Dump(ostream &,int) const
RCHandleC::operator =(const RCHandleC &)
RCHandleC::DeepCopy(UIntT) const
RCHandleC::operator ==(const RCHandleC &) const
RCHandleC::operator !=(const RCHandleC &) const
RCHandleC::Hash(void) const
RCHandleC::IsValid(void) const
RCHandleC::IsHandleType(const DT &) const
RCHandleC::CheckHandleType(const DT &) const
RCHandleC::References(void) const
RCHandleC::operator <<(ostream &,const RCHandleC &)
RCHandleC::operator >>(istream &,RCHandleC &)

   HashTreeC<class KeyT,class DataT>   
Tree of hashtables.
include "Ravl/HashTree.hh"
User Level:Normal
In Scope:RavlN

Parent Classes: Derived Classes: Methods:
Default constructor.
creates an invalid handle.

Creates an empty tree

HashTreeC(HashTreeNodeC<KeyT,DataT> & base)
Base class constructor.

HashTreeC(const DataT & data)

HashTreeNodeC<KeyT,DataT> Follow(const DListC<KeyT> & lst)
Follow list of keys to a node.
If node is not found then an invalid handle is returned.

bool Child(const KeyT & key,HashTreeNodeC<KeyT,DataT> & child)
lookup child in tree.
Returns true and updates 'child' if child is found.

bool Add(const KeyT & key,const DataT & data)
Add a child with given key and data.
returns false if child exists.

bool Add(const KeyT & key,const HashTreeC<KeyT,DataT> & subtree)
Add a sub tree
returns false if child exists.

HashC<KeyT,HashTreeNodeC<KeyT,DataT>> & Children()
Access table of children.

const HashC<KeyT,HashTreeNodeC<KeyT,DataT>> & Children() const
Access table of children.

DataT & Data()
Access data.

const DataT & Data() const
Access data.

bool IsLeaf() const
Test if node is a leaf in the tree.

ostream & Dump(ostream & out,int level = 0) const
Dump in a easly readable format.

#include "Ravl/RefCounter.hh"
const RCHandleC<HashTreeNodeBodyC<KeyT,DataT>> & operator =(const RCHandleC<HashTreeNodeBodyC<KeyT,DataT>> & oth)
Assign handle.

RCHandleC<HashTreeNodeBodyC<KeyT,DataT>> DeepCopy(UIntT levels = ((UIntT))) const
Do a deep copy of the object.

bool operator ==(const RCHandleC<HashTreeNodeBodyC<KeyT,DataT>> & oth) const
Are handles to the same object ?

bool operator !=(const RCHandleC<HashTreeNodeBodyC<KeyT,DataT>> & oth) const
Are handles to different objects ?

UIntT Hash() const
Default hash function.
This hashes on the address of the body.

bool IsValid() const
Test if this is a valid handle.

void Invalidate()
Invalidate this handle.
Unattaches the body from the handle.

bool IsHandleType(const DT &) const
Is handle of given type ?

void CheckHandleType(const DT & dummy) const
Check handle type. Throw an expception if not.

UIntT References() const
Find the number of references to the body of this object.

ostream & operator <<(ostream & strm,const RCHandleC<HashTreeNodeBodyC<KeyT,DataT>> & obj)

istream & operator >>(istream & strm,RCHandleC<HashTreeNodeBodyC<KeyT,DataT>> & obj)

Maintainer:Charles Galambos, Documentation by CxxDoc: Tue Aug 13 09:59:02 2002