![]() |
ATLAS Offline Software
|
Indexing policy for an IdentifiableContainer. More...
#include <IdentContIndexingPolicy.h>
Public Types | |
typedef type_tools::Copy< obj_type >::type | ElementType |
The type we get when we dereference a link, and derived types. More... | |
typedef type_tools::Copy< obj_type >::const_reference | ElementConstReference |
typedef type_tools::Copy< obj_type >::const_pointer | ElementConstPointer |
typedef unsigned int | index_type |
The type of an index, as provided to or returned from a link. More... | |
typedef index_type | 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 CONT::IDENTIFIABLE | coll_type |
typedef coll_type::value_type | obj_type |
Indexing policy for an IdentifiableContainer.
See ElementLinkTraits.h for a summary of the requirements for an indexing policy.
An identifiable container has a two-level index: the collection hash and the index within the collection. These are packed together in a 32-bit integer, which is what we expose as the index type. There's a value defined for an invalid index, so we don't need to use the IndexHolder
wrapper. To unpack this index, use IdentContIndex
.
Definition at line 39 of file IdentContIndexingPolicy.h.
|
private |
Definition at line 42 of file IdentContIndexingPolicy.h.
typedef type_tools::Copy<obj_type>::const_pointer SG::IdentContIndexingPolicy< CONT >::ElementConstPointer |
Definition at line 50 of file IdentContIndexingPolicy.h.
typedef type_tools::Copy<obj_type>::const_reference SG::IdentContIndexingPolicy< CONT >::ElementConstReference |
Definition at line 49 of file IdentContIndexingPolicy.h.
typedef type_tools::Copy<obj_type>::type SG::IdentContIndexingPolicy< CONT >::ElementType |
The type we get when we dereference a link, and derived types.
Definition at line 48 of file IdentContIndexingPolicy.h.
typedef unsigned int SG::IdentContIndexingPolicy< CONT >::index_type |
The type of an index, as provided to or returned from a link.
Definition at line 53 of file IdentContIndexingPolicy.h.
|
private |
Definition at line 43 of file IdentContIndexingPolicy.h.
typedef index_type SG::IdentContIndexingPolicy< CONT >::stored_index_type |
The type of an index, as stored internally within a link.
Definition at line 56 of file IdentContIndexingPolicy.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::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. |