ATLAS Offline Software
|
Indexing policy for a vector-like container. More...
#include <ForwardIndexingPolicy.h>
Public Types | |
typedef type_tools::Copy< value_type >::type | ElementType |
The type we get when we dereference a link, and derived types. More... | |
typedef type_tools::Copy< value_type >::const_reference | ElementConstReference |
typedef type_tools::Copy< value_type >::const_pointer | ElementConstPointer |
typedef size_t | index_type |
The type of an index, as provided to or returned from a link. More... | |
typedef uint32_t | stored_index_type |
The type of an index, as stored internally within a link. More... | |
Static Public Member Functions | |
static bool | isValid (stored_index_type index) |
Test to see if an index is valid. More... | |
static index_type | storedToExternal (stored_index_type index) |
Convert from stored to external index types. More... | |
static void | reset (stored_index_type &index) |
Make an index invalid. More... | |
static ElementType | lookup (index_type index, const CONT &data) |
Retrieve from a container the element corresponding to an index. More... | |
static void | reverseLookup (const CONT &data, ElementConstReference element, index_type &index) |
Find the index of the (first) instance of ELEMENT in DATA. More... | |
Private Types | |
typedef VALUE_TYPE | value_type |
Static Private Attributes | |
static const index_type | INVALID = static_cast<index_type> (-1) |
Value to mark an invalid index. More... | |
Indexing policy for a vector-like container.
See ElementLinkTraits.h for a summary of the requirements for an indexing policy.
Indexes here are size_type, with -1 used to mark an invalid index.
Definition at line 41 of file ForwardIndexingPolicy.h.
typedef type_tools::Copy<value_type>::const_pointer SG::ForwardIndexingPolicy< CONT, VALUE_TYPE >::ElementConstPointer |
Definition at line 51 of file ForwardIndexingPolicy.h.
typedef type_tools::Copy<value_type>::const_reference SG::ForwardIndexingPolicy< CONT, VALUE_TYPE >::ElementConstReference |
Definition at line 50 of file ForwardIndexingPolicy.h.
typedef type_tools::Copy<value_type>::type SG::ForwardIndexingPolicy< CONT, VALUE_TYPE >::ElementType |
The type we get when we dereference a link, and derived types.
Definition at line 49 of file ForwardIndexingPolicy.h.
typedef size_t SG::ForwardIndexingPolicy< CONT, VALUE_TYPE >::index_type |
The type of an index, as provided to or returned from a link.
Definition at line 54 of file ForwardIndexingPolicy.h.
typedef uint32_t SG::ForwardIndexingPolicy< CONT, VALUE_TYPE >::stored_index_type |
The type of an index, as stored internally within a link.
Definition at line 57 of file ForwardIndexingPolicy.h.
|
private |
Definition at line 44 of file ForwardIndexingPolicy.h.
|
static |
Test to see if an index is valid.
index | The index to test. |
|
static |
Retrieve from a container the element corresponding to an index.
index | The index to fetch. |
data | The container. |
Will throw SG::ExcBadForwardLink if the index is invalid.
|
static |
Make an index invalid.
index[out] | The index to reset. |
|
static |
Find the index of the (first) instance of ELEMENT in DATA.
data | The container to search. |
element | The element to find. |
index[out] | The index in the container of element . |
Throws SG::ExcElementNotFound if the element is not in the container.
|
static |
Convert from stored to external index types.
index | The stored index. |
|
staticprivate |
Value to mark an invalid index.
Definition at line 62 of file ForwardIndexingPolicy.h.