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

vtkObjectBaseHashMap Class Reference

#include <vtkObjectBaseHashMap.h>

Inheritance diagram for vtkObjectBaseHashMap:

Inheritance graph
[legend]
Collaboration diagram for vtkObjectBaseHashMap:

Collaboration graph
[legend]
List of all members.

Detailed Description

A character string hash table of paired objects.

Author:
Sean McInerney
Version:
Revision
1.11
Date:
Date
2004/06/03 18:58:28

Definition at line 33 of file vtkObjectBaseHashMap.h.

Public Member Functions

 vtkTypeRevisionMacro (vtkObjectBaseHashMap, vtkAbstractMap)
vtkIdType GetSize (void) const
 Returns the number of elements in the map.

int IsEmpty (void) const
 Returns true if the map is empty.

vtkIdType GetMaxSize (void) const
 Returns the maximum size of the map.

void Clear (void)
 Remove ALL mapped elements.

virtual int Swap (vtkObjectBaseHashMap *container)
 Swaps elements of this object with those of the specified container.

vtkIdType GetCapacity (void) const
 Returns the total number of elements that the map can hold before needing to allocate more memory.

vtkObjectBaseFind (const char *key) const
 Find the entry in the map with a given key string.

int Insert (const char *key, vtkObjectBase *object)
 Insert the specified key string into the map paired with an object.

int Erase (const char *key)
 Erase the entry matching a given key string.

virtual const char * FindKey (const vtkObjectBase *object)
 Find the first key in the map associated with an object.

const char * FindNextKey (void)
 Find the next key in the map associated with the object pointer specified in a previous call to FindKey.

vtkObjectBaseHashMapIteratorCreateIterator (void)
 Create an iterator.

int GetCheckUnique (void) const
 Toggle enforcement of uniqueness among string entries (default: true).

void SetCheckUnique (int a)
 Toggle enforcement of uniqueness among string entries (default: true).

int GetCheckCase (void) const
 Toggle matching of upper/lower case characters in keys (default: true).

void SetCheckCase (int a)
 Toggle matching of upper/lower case characters in keys (default: true).

Data Access Methods
vtkObjectBaseFront (void) const
 Get a read/write pointer to the first object in the container.

int Front (const char *&key, vtkObjectBase *&object) const
 Gets the first key - object association in the map.

vtkObjectBaseBack (void) const
 Get a read/write pointer to the last object in the container.

int Back (const char *&key, vtkObjectBase *&object) const
 Gets the last key - object association in the map.


Static Public Member Functions

vtkObjectBaseHashMapNew (void)

Protected Member Functions

 vtkObjectBaseHashMap (void)
 ~vtkObjectBaseHashMap ()


Constructor & Destructor Documentation

vtkObjectBaseHashMap::vtkObjectBaseHashMap void   )  [protected]
 

vtkObjectBaseHashMap::~vtkObjectBaseHashMap  )  [protected]
 


Member Function Documentation

int vtkObjectBaseHashMap::Back const char *&  key,
vtkObjectBase *&  object
const [virtual]
 

Gets the last key - object association in the map.

Returns:
false if the map is empty or this iterator has not been initialized to traverse any map, otherwise true.

Reimplemented from vtkAbstractMap.

vtkObjectBase* vtkObjectBaseHashMap::Back void   )  const [virtual]
 

Get a read/write pointer to the last object in the container.

Returns:
null if the container is empty, otherwise returns a pointer to an object.

Reimplemented from vtkContainer.

Reimplemented in vtkExtensionsObjectHashMap, vtkObjectHashMap, vtkPaletteElementHashMap, and vtkPaletteHashMap.

void vtkObjectBaseHashMap::Clear void   )  [virtual]
 

Remove ALL mapped elements.

Implements vtkContainer.

vtkObjectBaseHashMapIterator* vtkObjectBaseHashMap::CreateIterator void   )  [virtual]
 

Create an iterator.

Implements vtkAbstractMap.

Reimplemented in vtkExtensionsObjectHashMap, vtkObjectHashMap, vtkPaletteElementHashMap, and vtkPaletteHashMap.

int vtkObjectBaseHashMap::Erase const char *  key  )  [virtual]
 

Erase the entry matching a given key string.

Parameters:
key A unique charactor string serving as the hash map key.
Returns:
true for successful removal from the map or false when attempting to remove empty or non-existant strings.
Note:
The table is not changed if the specified key is empty or cannot be found.

Implements vtkAbstractMap.

vtkObjectBase* vtkObjectBaseHashMap::Find const char *  key  )  const [virtual]
 

Find the entry in the map with a given key string.

Parameters:
key A unique charactor string serving as the map key.
Returns:
The object associated with the specified key if found or NULL if the key is a removed, empty, or non-existant string.

Reimplemented from vtkAbstractMap.

Reimplemented in vtkExtensionsObjectHashMap, vtkObjectHashMap, vtkPaletteElementHashMap, and vtkPaletteHashMap.

virtual const char* vtkObjectBaseHashMap::FindKey const vtkObjectBase object  )  [virtual]
 

Find the first key in the map associated with an object.

Returns:
The key string on success, null otherwise.

Implements vtkAbstractMap.

const char* vtkObjectBaseHashMap::FindNextKey void   )  [virtual]
 

Find the next key in the map associated with the object pointer specified in a previous call to FindKey.

Returns:
The key string on success, null otherwise.

Implements vtkAbstractMap.

int vtkObjectBaseHashMap::Front const char *&  key,
vtkObjectBase *&  object
const [virtual]
 

Gets the first key - object association in the map.

Returns:
false if the map is empty or this iterator has not been initialized to traverse any map, otherwise true.

Reimplemented from vtkAbstractMap.

vtkObjectBase* vtkObjectBaseHashMap::Front void   )  const [virtual]
 

Get a read/write pointer to the first object in the container.

Returns:
null if the container is empty, otherwise returns a pointer to an object.

Reimplemented from vtkContainer.

Reimplemented in vtkExtensionsObjectHashMap, vtkObjectHashMap, vtkPaletteElementHashMap, and vtkPaletteHashMap.

vtkIdType vtkObjectBaseHashMap::GetCapacity void   )  const [virtual]
 

Returns the total number of elements that the map can hold before needing to allocate more memory.

Reimplemented from vtkAbstractMap.

int vtkObjectBaseHashMap::GetCheckCase void   )  const [virtual]
 

Toggle matching of upper/lower case characters in keys (default: true).

Reimplemented from vtkAbstractMap.

int vtkObjectBaseHashMap::GetCheckUnique void   )  const [virtual]
 

Toggle enforcement of uniqueness among string entries (default: true).

Reimplemented from vtkAbstractMap.

vtkIdType vtkObjectBaseHashMap::GetMaxSize void   )  const [virtual]
 

Returns the maximum size of the map.

Reimplemented from vtkContainer.

vtkIdType vtkObjectBaseHashMap::GetSize void   )  const [virtual]
 

Returns the number of elements in the map.

Reimplemented from vtkContainer.

int vtkObjectBaseHashMap::Insert const char *  key,
vtkObjectBase object
[virtual]
 

Insert the specified key string into the map paired with an object.

Parameters:
key A unique charactor string serving as the map key.
object An object to be associated with the key.
Exceptions:
bad_alloc Internal use of operator new may throw.
overflow_error Thrown for requests to grow the table beyond its maximum capacity (~ 1<<31).
Returns:
true for successful additions to the table or false when attempting to insert empty or duplicate strings.

Implements vtkAbstractMap.

int vtkObjectBaseHashMap::IsEmpty void   )  const [virtual]
 

Returns true if the map is empty.

Reimplemented from vtkContainer.

vtkObjectBaseHashMap* vtkObjectBaseHashMap::New void   )  [static]
 

Reimplemented from vtkExtensionsObject.

Reimplemented in vtkExtensionsObjectHashMap, vtkObjectHashMap, vtkPaletteElementHashMap, and vtkPaletteHashMap.

void vtkObjectBaseHashMap::SetCheckCase int  a  )  [virtual]
 

Toggle matching of upper/lower case characters in keys (default: true).

Reimplemented from vtkAbstractMap.

void vtkObjectBaseHashMap::SetCheckUnique int  a  )  [virtual]
 

Toggle enforcement of uniqueness among string entries (default: true).

Reimplemented from vtkAbstractMap.

virtual int vtkObjectBaseHashMap::Swap vtkObjectBaseHashMap container  )  [virtual]
 

Swaps elements of this object with those of the specified container.

Returns:
true on success, otherwise false.

vtkObjectBaseHashMap::vtkTypeRevisionMacro vtkObjectBaseHashMap  ,
vtkAbstractMap 
 


The documentation for this class was generated from the following file:
Generated on Tue Aug 10 03:42:29 2004 for vtkExtensions by doxygen 1.3.7