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

vtkAssociativeContainer Class Reference

#include <vtkAssociativeContainer.h>

Inheritance diagram for vtkAssociativeContainer:

Inheritance graph
[legend]
Collaboration diagram for vtkAssociativeContainer:

Collaboration graph
[legend]
List of all members.

Detailed Description

Abstract associative container for objects.

An Associative Container is a variable-sized Container that supports efficient retrieval of items (values) based on keys. It supports insertion and removal of items, but differs from a Sequence in that it does not provide a mechanism for inserting an item at a specific position.

Author:
Sean McInerney
Version:
Revision
1.3
Date:
Date
2005/06/24 23:17:16
See also:
vtkContainer

Definition at line 37 of file vtkAssociativeContainer.h.

Public Member Functions

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

virtual int Copy (vtkAssociativeContainer *container)=0
 Copy all items from the specified container into this container.

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

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

virtual int Insert (const char *key, vtkObjectBase *item)=0
 Insert an item 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 *item)=0
 Find the first key in the map associated with an item.

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

virtual vtkAssociativeIteratorCreateIterator (void)=0
 Create an iterator.

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

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

virtual void CheckUniqueOn ()
 Toggle enforcement of uniqueness among key strings (default: true).

virtual void CheckUniqueOff ()
 Toggle enforcement of uniqueness among key strings (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 *&item) const
 Gets the first key - item association in the map.

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


Protected Member Functions

 vtkAssociativeContainer (void)
 ~vtkAssociativeContainer ()


Constructor & Destructor Documentation

vtkAssociativeContainer::vtkAssociativeContainer void   )  [protected]
 

vtkAssociativeContainer::~vtkAssociativeContainer  )  [protected]
 


Member Function Documentation

virtual int vtkAssociativeContainer::Back const char *&  key,
vtkObjectBase *&  item
const [virtual]
 

Gets the last key - item association in the map.

Returns:
false if the map is empty, otherwise true.

Reimplemented in vtkObjectBaseHashMap, and vtkObjectBaseMap.

virtual void vtkAssociativeContainer::CheckCaseOff  )  [virtual]
 

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

virtual void vtkAssociativeContainer::CheckCaseOn  )  [virtual]
 

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

virtual void vtkAssociativeContainer::CheckUniqueOff  )  [virtual]
 

Toggle enforcement of uniqueness among key strings (default: true).

virtual void vtkAssociativeContainer::CheckUniqueOn  )  [virtual]
 

Toggle enforcement of uniqueness among key strings (default: true).

virtual int vtkAssociativeContainer::Copy vtkAssociativeContainer container  )  [pure virtual]
 

Copy all items from the specified container into this container.

Returns:
true on success, otherwise false.

virtual vtkAssociativeIterator* vtkAssociativeContainer::CreateIterator void   )  [pure virtual]
 

Create an iterator.

Implements vtkContainer.

Implemented in vtkObjectBaseHashMap, vtkObjectBaseMap, vtkObjectHashMap, and vtkObjectMap.

virtual int vtkAssociativeContainer::Erase const char *  key  )  [pure virtual]
 

Erase the entry matching a given key string.

Parameters:
key A unique string serving as the 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* vtkAssociativeContainer::Find const char *  key  )  const [virtual]
 

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

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

Reimplemented in vtkObjectBaseHashMap, vtkObjectBaseMap, vtkObjectHashMap, and vtkObjectMap.

virtual const char* vtkAssociativeContainer::FindKey const vtkObjectBase item  )  [pure virtual]
 

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

Returns:
true on success, false otherwise.

Implemented in vtkObjectBaseHashMap, and vtkObjectBaseMap.

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

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

Returns:
true on success, false otherwise.

Implemented in vtkObjectBaseHashMap, and vtkObjectBaseMap.

virtual int vtkAssociativeContainer::Front const char *&  key,
vtkObjectBase *&  item
const [virtual]
 

Gets the first key - item association in the map.

Returns:
false if the map is empty, otherwise true.

Reimplemented in vtkObjectBaseHashMap, and vtkObjectBaseMap.

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

Returns the total number of items that the container can hold before needing to allocate more memory.

Reimplemented in vtkObjectBaseHashMap, and vtkObjectBaseMap.

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

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

Reimplemented in vtkObjectBaseHashMap.

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

Toggle enforcement of uniqueness among key strings (default: true).

Reimplemented in vtkObjectBaseHashMap.

virtual int vtkAssociativeContainer::Insert const char *  key,
vtkObjectBase item
[pure virtual]
 

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

Parameters:
key A unique string serving as the map key.
item An object to be associated with the key.
Returns:
true for successful additions to the table or false when attempting to insert empty or duplicate strings.

Implemented in vtkObjectBaseHashMap, and vtkObjectBaseMap.

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

Reimplemented from vtkContainer.

Reimplemented in vtkObjectBaseHashMap, vtkObjectBaseMap, vtkObjectHashMap, and vtkObjectMap.

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

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

Reimplemented in vtkObjectBaseHashMap.

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

Toggle enforcement of uniqueness among key strings (default: true).

Reimplemented in vtkObjectBaseHashMap.

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

Swaps items of this container with those of the specified container.

Returns:
true on success, otherwise false.

vtkAssociativeContainer::vtkTypeRevisionMacro vtkAssociativeContainer  ,
vtkContainer 
 


The documentation for this class was generated from the following file:
Generated on Thu Jul 14 14:39:56 2005 for vtkContainers by doxygen 1.3.6