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

vtkAbstractMap Class Reference

#include <vtkAbstractMap.h>

Inheritance diagram for vtkAbstractMap:

Inheritance graph
[legend]
Collaboration diagram for vtkAbstractMap:

Collaboration graph
[legend]
List of all members.

Detailed Description

Abstract map object for objects.

Calls Register when objects are inserted into the map and UnRegister when the object is removed.

Author:
Sean McInerney
Version:
Revision
1.3
Date:
Date
2004/06/03 18:58:28
See also:
vtkObjectBase

Definition at line 36 of file vtkAbstractMap.h.

Public Member Functions

 vtkTypeRevisionMacro (vtkAbstractMap, vtkContainer)
void PrintSelf (ostream &, vtkIndent)
virtual int Swap (vtkAbstractMap *container)=0
 Swaps elements of this object with those of the specified container.

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

virtual vtkObjectBaseFind (const char *key) const
 Find the entry in the table with the given key string.

virtual int Insert (const char *key, vtkObjectBase *object)=0
 Insert an object into the table paired with a key string.

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

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

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

virtual vtkAbstractMapIteratorCreateIterator (void)=0
 Create an iterator.

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

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

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

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

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

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

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

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

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

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


Protected Member Functions

 vtkAbstractMap (void)
 ~vtkAbstractMap ()


Constructor & Destructor Documentation

vtkAbstractMap::vtkAbstractMap void   )  [inline, protected]
 

Definition at line 144 of file vtkAbstractMap.h.

vtkAbstractMap::~vtkAbstractMap  )  [inline, protected]
 

Definition at line 145 of file vtkAbstractMap.h.


Member Function Documentation

virtual int vtkAbstractMap::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 in vtkObjectBaseHashMap, and vtkObjectBaseMap.

virtual void vtkAbstractMap::CheckCaseOff  )  [virtual]
 

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

virtual void vtkAbstractMap::CheckCaseOn  )  [virtual]
 

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

virtual void vtkAbstractMap::CheckUniqueOff  )  [virtual]
 

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

virtual void vtkAbstractMap::CheckUniqueOn  )  [virtual]
 

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

virtual vtkAbstractMapIterator* vtkAbstractMap::CreateIterator void   )  [pure virtual]
 

Create an iterator.

Implements vtkContainer.

Implemented in vtkExtensionsObjectHashMap, vtkExtensionsObjectMap, vtkObjectBaseHashMap, vtkObjectBaseMap, vtkObjectHashMap, vtkObjectMap, vtkPaletteElementHashMap, vtkPaletteElementMap, vtkPaletteHashMap, and vtkPaletteMap.

virtual int vtkAbstractMap::Erase const char *  key  )  [pure 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.

Implemented in vtkObjectBaseHashMap, and vtkObjectBaseMap.

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

Find the entry in the table with the given key string.

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

Reimplemented in vtkDataSetMap, vtkExtensionsObjectHashMap, vtkExtensionsObjectMap, vtkObjectBaseHashMap, vtkObjectBaseMap, vtkObjectHashMap, vtkObjectMap, vtkPolyDataMap, vtkPaletteElementHashMap, vtkPaletteElementMap, vtkPaletteHashMap, and vtkPaletteMap.

virtual const char* vtkAbstractMap::FindKey const vtkObjectBase object  )  [pure virtual]
 

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

Returns:
true on success, false otherwise.

Implemented in vtkObjectBaseHashMap, and vtkObjectBaseMap.

virtual const char* vtkAbstractMap::FindNextKey void   )  [pure virtual]
 

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

Returns:
true on success, false otherwise.

Implemented in vtkObjectBaseHashMap, and vtkObjectBaseMap.

virtual int vtkAbstractMap::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 in vtkObjectBaseHashMap, and vtkObjectBaseMap.

virtual vtkIdType vtkAbstractMap::GetCapacity void   )  const [virtual]
 

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

Reimplemented in vtkObjectBaseHashMap, and vtkObjectBaseMap.

virtual int vtkAbstractMap::GetCheckCase void   )  const [virtual]
 

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

Reimplemented in vtkObjectBaseHashMap.

virtual int vtkAbstractMap::GetCheckUnique void   )  const [virtual]
 

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

Reimplemented in vtkObjectBaseHashMap.

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

Insert an object into the table paired with a key string.

Parameters:
key A unique 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.

Implemented in vtkObjectBaseHashMap, and vtkObjectBaseMap.

void vtkAbstractMap::PrintSelf ostream &  ,
vtkIndent 
[virtual]
 

Reimplemented from vtkContainer.

virtual void vtkAbstractMap::SetCheckCase int  a  )  [virtual]
 

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

Reimplemented in vtkObjectBaseHashMap.

virtual void vtkAbstractMap::SetCheckUnique int  a  )  [virtual]
 

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

Reimplemented in vtkObjectBaseHashMap.

virtual int vtkAbstractMap::Swap vtkAbstractMap container  )  [pure virtual]
 

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

Returns:
true on success, otherwise false.

vtkAbstractMap::vtkTypeRevisionMacro vtkAbstractMap  ,
vtkContainer 
 


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