ATLAS Offline Software
|
Indexing policy for a map-like container. More...
#include <MapIndexingPolicy.h>
Public Types | |
typedef type_tools::Copy< mapped_type >::type | ElementType |
The type we get when we dereference a link, and derived types. More... | |
typedef type_tools::Copy< mapped_type >::const_reference | ElementConstReference |
typedef type_tools::Copy< mapped_type >::const_pointer | ElementConstPointer |
typedef MAP::key_type | index_type |
The type of an index, as provided to or returned from a link. More... | |
typedef SG::IndexHolder< index_type > | stored_index_type |
The type of an index, as stored internally within a link. More... | |
Static Public Member Functions | |
static bool | isValid (const 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 (const stored_index_type &index, const MAP &data) |
Retrieve from a container the element corresponding to an index. More... | |
static void | reverseLookup (const MAP &data, ElementConstReference element, index_type &index) |
Find the index of the (first) instance of ELEMENT in DATA. More... | |
Private Types | |
typedef MAP::mapped_type | mapped_type |
typedef MAP::const_iterator | const_iterator |
Private Member Functions | |
BOOST_CONCEPT_ASSERT ((boost::PairAssociativeContainerConcept< MAP >)) | |
Indexing policy for a map-like container.
See ElementLinkTraits.h for a summary of the requirements for an indexing policy.
Indexes here are use IndexHolder, with the key of the container as the payload. The type returned from the link is the second type of the map.
Definition at line 47 of file MapIndexingPolicy.h.
|
private |
Definition at line 54 of file MapIndexingPolicy.h.
typedef type_tools::Copy<mapped_type>::const_pointer SG::MapIndexingPolicy< MAP >::ElementConstPointer |
Definition at line 61 of file MapIndexingPolicy.h.
typedef type_tools::Copy<mapped_type>::const_reference SG::MapIndexingPolicy< MAP >::ElementConstReference |
Definition at line 60 of file MapIndexingPolicy.h.
typedef type_tools::Copy<mapped_type>::type SG::MapIndexingPolicy< MAP >::ElementType |
The type we get when we dereference a link, and derived types.
Definition at line 59 of file MapIndexingPolicy.h.
typedef MAP::key_type SG::MapIndexingPolicy< MAP >::index_type |
The type of an index, as provided to or returned from a link.
Definition at line 64 of file MapIndexingPolicy.h.
|
private |
Definition at line 53 of file MapIndexingPolicy.h.
typedef SG::IndexHolder<index_type> SG::MapIndexingPolicy< MAP >::stored_index_type |
The type of an index, as stored internally within a link.
Definition at line 67 of file MapIndexingPolicy.h.
|
private |
|
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::ExcInvalidIndex if the index is invalid and SG::ExcIndexNotFound if the index is not in the container.
|
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. |