Main Page
Groups
Namespace List
Class Hierarchy
Alphabetical List
Compound List
File
List
Namespace Members
Compound Members
File Members
Concepts
itk::IndexedContainerInterface< TElementIdentifier, TElement > Class Template Reference
[Data Representation Objects]
#include <itkIndexedContainerInterface.h>
Inheritance diagram for itk::IndexedContainerInterface< TElementIdentifier, TElement >:
[legend]Collaboration diagram for itk::IndexedContainerInterface< TElementIdentifier, TElement >:
[legend]List of all members.
Detailed Description
template<typename TElementIdentifier, typename TElement>
class itk::IndexedContainerInterface< TElementIdentifier, TElement >
This should only be used for reference when writing containers conforming to this interface. ITK uses generic programming to allow container type substitution, so polymorphism is not needed to use containers through this interface. This means that a container conforming to this interface need not be derived from it, and that their methods should not be virtual. However, the container must derive from Object in order to support the reference counting, modification time, and debug information required by this interface.
Note that many comments refer to a "default element" or "default element value". This value is equal to the default constructor of the Element type. Also note that all non-const methods assume that the container was modified, and update the modification time.
Template parameters for IndexedContainerInterface:
TElementIdentifier = A type that shall be used to index the container. It must have a < operator defined for ordering.
TElement = The element type stored in the container.
Definition at line 54 of file itkIndexedContainerInterface.h.
Member Typedef Documentation
Member Function Documentation
|
Get a begin const iterator for the container. |
|
Get a begin iterator for the container. |
|
Get a reference to an existing element. It is guaranteed that the element will be inserted with a default value if it does not exist.
It is assumed that the value of the element is modified through the reference. |
|
Create an entry in the container corresponding to the given index. The entry will be initialized with the default element. If an entry already exists, its value will be overwritten with the default element. |
|
Delete the entry in the container corresponding to the given identifier.
It is NOT guaranteed that IndexExists(id) will return false if called right after DeleteIndex(id). This behavior is implementation-defined. If the identifier's location is left behind, though, it will have the value of the default element. |
|
Get a reference to an existing element. It is NOT guaranteed that the element will or will not be created if it doesn't exist. This behavior is implementation-specific.
It is assumed that the value of the element is modified through the reference. |
|
Get an end const iterator for the container. |
|
Get an end iterator for the container. |
|
Get a copy of an element without range checking. |
|
Combine the GetElement and IndexExists into one method. If false is returned, then no element with the given identifier was found. If true is returned, then the identifier was found. In this case, if the element pointer given as input is not null, the element is filled in with the value of the element found. |
template<typename TElementIdentifier, typename TElement> |
virtual const char* itk::IndexedContainerInterface< TElementIdentifier, TElement >::GetNameOfClass |
( |
|
) |
const [virtual] |
|
|
Test if there is an entry in the container corresponding to the given index. |
|
Tell the container to release any memory it may have allocated and return itself to its initial state. |
|
Set the value of an element. It is guaranteed that a spot for the element will be created if it doesn't exist. |
|
Tell the container to allocate enough memory to allow at least as many elements as the size given to be stored. This is NOT guaranteed to actually allocate any memory, but is useful if the implementation of the container allocates contiguous storage. |
|
Set the value of an element. It is NOT guaranteed whether a spot for the element will be created automatically. This is implementation-defined. |
|
Get the number of elements currently stored in the container. |
|
Tell the container to try to minimize its memory usage for storage of the current number of elements. This is NOT guaranteed to decrease memory usage. |
The documentation for this class was generated from the following file:
Generated at Thu May 25 01:26:42 2006 for ITK by
1.3.5 written by Dimitri van Heesch,
© 1997-2000