|
Developer Documentation |
|
Centre for Vision, Speech & Signal Processing |
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.
- 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.
- 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:
- 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
|