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

vtkPaletteElementHashMap Class Reference

#include <vtkPaletteElementHashMap.h>

Inheritance diagram for vtkPaletteElementHashMap:

Inheritance graph
[legend]
Collaboration diagram for vtkPaletteElementHashMap:

Collaboration graph
[legend]
List of all members.

Detailed Description

A hash map object for elements.

Calls Register when elements are inserted into the map and UnRegister when the element is removed.

Author:
Sean McInerney
Version:
Revision
1.2
Date:
Date
2004/06/12 20:01:23
See also:
vtkExtensionsObjectHashMap vtkPaletteElement

Definition at line 36 of file vtkPaletteElementHashMap.h.

Public Member Functions

 vtkTypeRevisionMacro (vtkPaletteElementHashMap, vtkExtensionsObjectHashMap)
virtual int Swap (vtkPaletteElementHashMap *container)
 Swaps elements of this object with those of the specified container.

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

virtual int Insert (const char *key, vtkPaletteElement *element)
 Insert an element into the table paired with a key string.

virtual const char * FindKey (const vtkPaletteElement *element)
 Find the first key in the map associated with an element pointer.

vtkPaletteElementHashMapIteratorCreateIterator (void)
 Create an iterator.

Data Access Methods
vtkPaletteElementFront (void) const
 Get a read/write pointer to the first element in the map.

virtual int Front (const char *&key, vtkPaletteElement *&element) const
 Gets the first key - element association in the map.

vtkPaletteElementBack (void) const
 Get a read/write pointer to the last element in the map.

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


Static Public Member Functions

vtkPaletteElementHashMapNew (void)

Protected Member Functions

 vtkPaletteElementHashMap (void)
 ~vtkPaletteElementHashMap ()


Constructor & Destructor Documentation

vtkPaletteElementHashMap::vtkPaletteElementHashMap void   )  [inline, protected]
 

Definition at line 124 of file vtkPaletteElementHashMap.h.

vtkPaletteElementHashMap::~vtkPaletteElementHashMap  )  [inline, protected]
 

Definition at line 125 of file vtkPaletteElementHashMap.h.


Member Function Documentation

int vtkPaletteElementHashMap::Back const char *&  key,
vtkPaletteElement *&  element
const [inline, virtual]
 

Gets the last key - element association in the map.

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

Definition at line 167 of file vtkPaletteElementHashMap.h.

vtkPaletteElement* vtkPaletteElementHashMap::Back void   )  const [inline, virtual]
 

Get a read/write pointer to the last element in the map.

Returns:
null if the map is empty, otherwise returns a pointer to an element.

Reimplemented from vtkExtensionsObjectHashMap.

Reimplemented in vtkPaletteHashMap.

Definition at line 108 of file vtkPaletteElementHashMap.h.

vtkPaletteElementHashMapIterator* vtkPaletteElementHashMap::CreateIterator void   )  [virtual]
 

Create an iterator.

Reimplemented from vtkExtensionsObjectHashMap.

Reimplemented in vtkPaletteHashMap.

vtkPaletteElement* vtkPaletteElementHashMap::Find const char *  key  )  const [inline, virtual]
 

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

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

Reimplemented from vtkExtensionsObjectHashMap.

Reimplemented in vtkPaletteHashMap.

Definition at line 59 of file vtkPaletteElementHashMap.h.

virtual const char* vtkPaletteElementHashMap::FindKey const vtkPaletteElement element  )  [inline, virtual]
 

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

Returns:
true on success, false otherwise.

Definition at line 82 of file vtkPaletteElementHashMap.h.

int vtkPaletteElementHashMap::Front const char *&  key,
vtkPaletteElement *&  element
const [inline, virtual]
 

Gets the first key - element association in the map.

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

Definition at line 157 of file vtkPaletteElementHashMap.h.

vtkPaletteElement* vtkPaletteElementHashMap::Front void   )  const [inline, virtual]
 

Get a read/write pointer to the first element in the map.

Returns:
null if the map is empty, otherwise returns a pointer to an element.

Reimplemented from vtkExtensionsObjectHashMap.

Reimplemented in vtkPaletteHashMap.

Definition at line 92 of file vtkPaletteElementHashMap.h.

virtual int vtkPaletteElementHashMap::Insert const char *  key,
vtkPaletteElement element
[inline, virtual]
 

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

Parameters:
key A unique string serving as the map key.
element An element 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.

Definition at line 74 of file vtkPaletteElementHashMap.h.

vtkPaletteElementHashMap* vtkPaletteElementHashMap::New void   )  [static]
 

Reimplemented from vtkExtensionsObjectHashMap.

Reimplemented in vtkPaletteHashMap.

virtual int vtkPaletteElementHashMap::Swap vtkPaletteElementHashMap container  )  [inline, virtual]
 

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

Returns:
true on success, otherwise false.

Definition at line 47 of file vtkPaletteElementHashMap.h.

References Swap().

vtkPaletteElementHashMap::vtkTypeRevisionMacro vtkPaletteElementHashMap  ,
vtkExtensionsObjectHashMap 
 


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