ATLAS Offline Software
Public Types | Static Public Member Functions | Private Types | Private Member Functions | List of all members
SG::SetIndexingPolicy< SET > Class Template Reference

Indexing policy for a set-like container. More...

#include <SetIndexingPolicy.h>

Collaboration diagram for SG::SetIndexingPolicy< SET >:

Public Types

typedef SET::value_type ElementType
 The type we get when we dereference a link, and derived types. More...
 
typedef SET::const_reference ElementConstReference
 
typedef SET::const_pointer ElementConstPointer
 
typedef SET::key_type index_type
 The type of an index, as provided to or returned from a link. More...
 
typedef SG::IndexHolder< index_typestored_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 SET &data)
 Retrieve from a container the element corresponding to an index. More...
 
static void reverseLookup (const SET &data, ElementConstReference element, index_type &same)
 Find the index of the (first) instance of ELEMENT in DATA. More...
 

Private Types

typedef SET::reference reference
 
typedef SET::iterator iterator
 

Private Member Functions

 BOOST_CONCEPT_ASSERT ((boost::SimpleAssociativeContainerConcept< SET >))
 

Detailed Description

template<class SET>
class SG::SetIndexingPolicy< SET >

Indexing policy for a set-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.

Definition at line 46 of file SetIndexingPolicy.h.

Member Typedef Documentation

◆ ElementConstPointer

template<class SET >
typedef SET::const_pointer SG::SetIndexingPolicy< SET >::ElementConstPointer

Definition at line 59 of file SetIndexingPolicy.h.

◆ ElementConstReference

template<class SET >
typedef SET::const_reference SG::SetIndexingPolicy< SET >::ElementConstReference

Definition at line 58 of file SetIndexingPolicy.h.

◆ ElementType

template<class SET >
typedef SET::value_type SG::SetIndexingPolicy< SET >::ElementType

The type we get when we dereference a link, and derived types.

Definition at line 57 of file SetIndexingPolicy.h.

◆ index_type

template<class SET >
typedef SET::key_type SG::SetIndexingPolicy< SET >::index_type

The type of an index, as provided to or returned from a link.

Definition at line 62 of file SetIndexingPolicy.h.

◆ iterator

template<class SET >
typedef SET::iterator SG::SetIndexingPolicy< SET >::iterator
private

Definition at line 53 of file SetIndexingPolicy.h.

◆ reference

template<class SET >
typedef SET::reference SG::SetIndexingPolicy< SET >::reference
private

Definition at line 52 of file SetIndexingPolicy.h.

◆ stored_index_type

The type of an index, as stored internally within a link.

Definition at line 65 of file SetIndexingPolicy.h.

Member Function Documentation

◆ BOOST_CONCEPT_ASSERT()

template<class SET >
SG::SetIndexingPolicy< SET >::BOOST_CONCEPT_ASSERT ( (boost::SimpleAssociativeContainerConcept< SET >)  )
private

◆ isValid()

template<class SET >
static bool SG::SetIndexingPolicy< SET >::isValid ( const stored_index_type index)
static

Test to see if an index is valid.

Parameters
indexThe index to test.

◆ lookup()

template<class SET >
static ElementType SG::SetIndexingPolicy< SET >::lookup ( const stored_index_type index,
const SET data 
)
static

Retrieve from a container the element corresponding to an index.

Parameters
indexThe index to fetch.
dataThe container.

Will throw SG::ExcInvalidIndex if the index is invalid and SG::ExcIndexNotFound if the index is not in the container.

◆ reset()

template<class SET >
static void SG::SetIndexingPolicy< SET >::reset ( stored_index_type index)
static

Make an index invalid.

Parameters
index[out]The index to reset.

◆ reverseLookup()

template<class SET >
static void SG::SetIndexingPolicy< SET >::reverseLookup ( const SET data,
ElementConstReference  element,
index_type same 
)
static

Find the index of the (first) instance of ELEMENT in DATA.

Parameters
dataThe container to search.
elementThe element to find.
index[out]The index in the container of element.

Throws SG::ExcElementNotFound if the element is not in the container.

◆ storedToExternal()

template<class SET >
static index_type SG::SetIndexingPolicy< SET >::storedToExternal ( stored_index_type  index)
static

Convert from stored to external index types.

Parameters
indexThe stored index.

The documentation for this class was generated from the following file: