Developer Documentation
Centre for Vision, Speech & Signal Processing
USER IN NAMESPACE AMMA TREE ROOT AMMA SEARCH AMMA HOME
 

  PUBLIC
RCHashARC::RCHashARC(const RCHashARC &)
RCHashARC::RCHashARC(BooleanT)
RCHashARC::RCHashARC(const RCWrapC> &)
RCHashARC::RCHashARC(istream &)
RCHashARC::operator[](const Key &)
RCHashARC::operator[](const Key &) const
RCHashARC::Del(const Key &)
RCHashARC::IsElm(const Key &) const
RCHashARC::Move(RCHashARC &)
RCHashARC::IsEmpty(void) const
RCHashARC::Empty(void)
RCHashARC::Insert(const Key &,const Dat &)
RCHashARC::Size(void) const
RCHashARC::Lookup(const Key &)
RCHashARC::Lookup(const Key &) const
RCHashARC::Update(const Key &,const Dat &)
RCHashARC::Update(const Key &)
RCHashARC::Access(const Key &,const Dat &)
RCHashARC::operator==(const RCHashARC &) const
RCHashARC::operator!=(const RCHashARC &) const
RCHashARC::Hash(void) const
RCWrapC::IsA(const RCWrapBaseC &)
RCWrapC::Body(void)
RCWrapC::Body(void) const
RCWrapC::Copy(void) const
RCWrapC::Data(void)
RCWrapC::Data(void) const
RCWrapC::operator T &(void)
RCWrapC::operator const T &(void) const
RCWrapBaseC::Body(void)
RCWrapBaseC::Body(void) const
RCWrapBaseC::DataType(void) const
RCWrapBaseC::Save(ostream &) const
RCHandleAC::Abstract(void)
RCHandleAC::IsHandleType(const DT &) const
RCHandleAC::CheckHandleType(const DT &) const
RCHandleAC::Save(ostream &) const
RCHandleAC::Copy(void) const
RCHandleC::IsValid(void) const
RCHandleC::IsValidObject(void) const
RCHandleC::operator=(const RCHandleC &)
RCHandleC::operator==(const RCHandleC &) const
RCHandleC::operator!=(const RCHandleC &) const
RCHandleC::Hash(void) const
RCHandleC::IsConst(void) const
RCHandleC::IsNotConst(void) const
RCHandleC::SetConst(void) const
RCHandleC::Invalidate(void)
RCHandleC::Body(void)
RCHandleC::Body(void) const
RCHashARC<class Key,class Dat>
 
Refrence counted auto-resizing hash table.
 
include "amma/RCHashAR.hh"
User Level:Default
Library:Hash1d
Example:WordFreq.cc
Section:Containers.Hash Tables
In Scope:std

Comments:
This is a BIG OBJECT. See HashARC for more details.

NB. This class requires the standard stream operators to be implemented. ie. operator<<(ostream &os,xxx) etc...

Parent Classes: Methods:
RCHashARC(const RCHashARC<Key,Dat> & oth)
Copy constructor.

RCHashARC(BooleanT makeBod = TRUE)
Default constructor.
Will make a body by default.

RCHashARC(const RCWrapC<HashARC<Key,Dat>> & base)
Base constructor.

RCHashARC(istream & in)
Stream constructor.

Dat & operator[](const Key & a)
Accesss an element.
Will create an empty element with the default constructor and return a refrence to it, if it doesn't already exist.

const Dat & operator[](const Key & a) const
Accesss an element.
Will create an empty element with the default constructor and return a refrence to it, if it doesn't already exist.

BooleanT Del(const Key & aKey)
Delete member from table.
Returns TRUE if Key was in hash table.

BooleanT IsElm(const Key & aKey) const
Is key used in the table.

void Move(RCHashARC<Key,Dat> & oth)
Move contents of another table into this one.
leave other empty.

BooleanT IsEmpty(void) const
Is table empty ?

void Empty(void)
Empty table

BooleanT Insert(const Key & aKey,const Dat & data)
Insert Data with Key.
Returns: True=Member existed already. False=New one was added.

UIntT Size() const
Get number of elements in table.

Dat * Lookup(const Key & aKey)
Look to see if data is present in the table.
If data is present return a ptr to it, othersize return a 0 ptr.

const Dat * Lookup(const Key & aKey) const
Look to see if data is present in the table.
If data is present return a ptr to it, othersize return a 0 ptr.

BooleanT Update(const Key & key,const Dat & data)
Update member of HashCable, will create new one if it doesn't exist.
OBSOLETE: Use Insert(key,data) Returns: True=Member existed already. False=New one was added.

Dat & Update(const Key & key)
Get value, add default if its not there. Return refrence anyway.
OBSOLETE: Use operator[].

Dat & Access(const Key & key,const Dat & def = Dat())
Access key, if it does exists create a new bin with value 'def'
Retuns a refrence to the new entry.

bool operator==(const RCHashARC<Key,Dat> & oth) const
Are two hashtables equal ?

bool operator!=(const RCHashARC<Key,Dat> & oth) const
Are two hashtables unequal ?

UIntT Hash() const
Get a hash value for the hash table.

#include "amma/RCWrap.hh"
BooleanT IsA(const RCWrapBaseC & oth)
Test if RCWrapBase is derived from this wrap type.
Returns true if it is.

RCWrapBodyC<HashARC<Key,Dat>> & Body()
Access data.

const RCWrapBodyC<HashARC<Key,Dat>> & Body() const
Access data.

RCWrapC<HashARC<Key,Dat>> Copy() const
Make a copy.

HashARC<Key,Dat> & Data()
Access data, explicitly

const HashARC<Key,Dat> & Data() const
Access data, explicitly

operator HashARC<Key,Dat> &()
Access object.

operator const HashARC<Key,Dat> &() const
Access object.

RCWrapBaseBodyC & Body()
Access body.

const RCWrapBaseBodyC & Body() const
Const access to body.

const type_info & DataType() const
Type of object held.

BooleanT Save(ostream & sout) const
Write contained object to stream.

#include "amma/RCHandleA.hh"
RCAbstractC Abstract()
Create an abstract handle to this object.

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

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

BooleanT Save(ostream & out) const
Save to ostream.

RCHandleAC<RCWrapBaseBodyC> Copy() const
Creat a deep copy of this object.
protected:

#include "amma/RCHandle.hh"
BooleanT IsValid() const
Check its a valid handle.

BooleanT IsValidObject() const
Check its a valid handle, and that the object is pointed to is also valid.

RCHandleC<RCWrapBaseBodyC> & operator=(const RCHandleC<RCWrapBaseBodyC> & oth)
Assignment.

BooleanT operator==(const RCHandleC<RCWrapBaseBodyC> & oth) const
Comparison operator.

BooleanT operator!=(const RCHandleC<RCWrapBaseBodyC> & oth) const
Comparison operator.

UIntT Hash() const
Hash function.x

BooleanT IsConst() const
Is object constant ?

BooleanT IsNotConst() const
Is object not constant ?

void SetConst(void) const
Lock the object.
This is const as a convience though it actual modified the object, often object you wish to ensure are constant already have const set. protected:

void Invalidate()
Turn this into an invalid handle.

RCWrapBaseBodyC & Body()
Direct access to body.

const RCWrapBaseBodyC & Body() const
Constant access to body.


Programmer:Charles Galambos, Documentation by CxxDoc: Tue Mar 20 10:49:27 2001