![]() |
ATLAS Offline Software
|
templated base class for a look-up map for associations More...
#include <AssociationMap.h>
Classes | |
| class | AssociationObjectIterator |
| code only expands with the ASSOCIATIONMAP_CONTEXT More... | |
| class | AssociationVectorIterator |
| iterator for association vectors (internal use only) More... | |
Public Types | |
Store Iterator Types | |
| typedef AssociationVectorIterator | asso_iterator |
| association iterator type | |
| typedef AssociationObjectIterator | object_iterator |
| object iterator type | |
Public Member Functions | |||||||||||||
Constructors and Destructor | |||||||||||||
| AssociationMap () | |||||||||||||
| virtual | ~AssociationMap () | ||||||||||||
Add Associations | |||||||||||||
| |||||||||||||
| void | addAssociation (const object_container_type *objectContainer, const object_index_type &objectIndex, const asso_container_type *assoContainer, const asso_index_type &assoIndex) | ||||||||||||
| void | addAssociation (const object_container_type *objectContainer, const object_type *objectPointer, const asso_container_type *assoContainer, const asso_type *assoPointer) | ||||||||||||
| void | addAssociation (const object_link &objectLink, const asso_link &assoLink) | ||||||||||||
Argument and Internal Store Types | |
| typedef OBJCONT | object_container_type |
| typedef object_container_type::base_value_type | object_type |
| typedef SG::GenerateIndexingPolicy< object_container_type >::type::index_type | object_index_type |
| typedef ElementLink< object_container_type > | object_link |
| typedef std::list< const object_type * > | object_list |
| typedef ASSCONT | asso_container_type |
| typedef asso_container_type::base_value_type | asso_type |
| typedef SG::GenerateIndexingPolicy< asso_container_type >::type::index_type | asso_index_type |
| typedef std::list< const asso_type * > | asso_list |
| typedef ElementLink< asso_container_type > | asso_link |
| typedef ElementLinkVector< asso_container_type > | asso_store |
| typedef asso_store::const_iterator | asso_store_iterator |
| typedef std::map< object_link, asso_store > | store_type |
| typedef store_type::iterator | store_iterator_type |
| static const asso_store | s_dum_asso_store |
Object and Association Iterators | |||||
The association iterators are returned for a given object, which can either be referenced by its pointer or its iterator in the internal store.
| |||||
| store_type | m_associationMap | ||||
| internal store | |||||
| object_iterator | beginObject () const | ||||
| begin iterator for objects | |||||
| object_iterator | endObject () const | ||||
| end iterator for objects | |||||
| asso_iterator | beginAssociation (const object_type *objectPointer) const | ||||
| begin iterator for associations | |||||
| asso_iterator | beginAssociation (const object_iterator &objectIter) const | ||||
| asso_iterator | endAssociation (const object_type *objectPointer) const | ||||
| end iterator for associations | |||||
| asso_iterator | endAssociation (const object_iterator &objectIter) const | ||||
| const object_type * | getObject (const object_iterator &objectIter) const | ||||
| get association iterators by object iterator | |||||
| object_iterator | findObject (const object_type *theObject) const | ||||
| finding an object with allocation | |||||
| bool | containsObject (const object_type *theObject) const | ||||
| testing if object is in store | |||||
| size_t | getNumberOfObjects () const | ||||
| retrieve number of objects in store | |||||
| const asso_type * | getAssociation (asso_iterator assoIter) const | ||||
| associations iterator access | |||||
| asso_iterator | findAssociation (const object_iterator &objectIter, const asso_type *assoPointer) const | ||||
| find association | |||||
| asso_iterator | findAssociation (const object_type *objectPointer, const asso_type *assoPointer) const | ||||
| bool | containsAssociation (const object_iterator &objectIter, const asso_type *assoPointer) const | ||||
| containment check | |||||
| bool | containsAssociation (const object_type *objectPointer, const asso_type *assoPointer) const | ||||
| bool | containsAssociation (const asso_type *assoPointer) const | ||||
| bool | getObjects (const asso_type *assoPointer, object_list &theObjects) const | ||||
| get all objects for a given association | |||||
| bool | getObjects (const asso_iterator &assoIter, object_list &theObjects) const | ||||
| get all objects for a given association | |||||
| bool | getAssociations (const object_type *objPointer, asso_list &assocs) const | ||||
| get all associations for a given object | |||||
| bool | getAssociations (const object_iterator &objIter, asso_list &assocs) const | ||||
| get all associations for a given object | |||||
| size_t | size () | ||||
| get number of associations | |||||
| size_t | size () const | ||||
| get number of associations | |||||
| size_t | size (const object_type *objectPointer) const | ||||
| size_t | getNumberOfAssociations (const object_type *objectPointer) const | ||||
| size_t | size (const object_iterator &objectIter) const | ||||
| size_t | getNumberOfAssociations (const object_iterator &objectIter) const | ||||
| store_iterator_type | internalFind (const object_link &objectLink, const asso_link &assoLink) | ||||
| internally used find method | |||||
| bool | addToStore (const object_link &objectLink, const asso_link &assoLink) | ||||
| internally used function to add links to store | |||||
templated base class for a look-up map for associations
The templated base class AssociationMap provides all functionality to support a mapped look-up between object of a given type and their associations, typically of a different type (many-to-many look-up). Concrete objects instantiated from implementation classes derived from AssociationMap are not automatically storable. The concrete class needs to either be DataObject itself, or the corresponding object needs to be collected into a storable DataVector.
The internal storage model is a matrix, where the rows are keyed by the object pointer and the columns are pointers to associations. The number of columns (= associations) typically varies row-by-row.
Definition at line 38 of file AssociationMap.h.
| typedef ASSCONT AssociationMap< OBJCONT, ASSCONT >::asso_container_type |
Definition at line 53 of file AssociationMap.h.
| typedef SG::GenerateIndexingPolicy<asso_container_type>::type::index_type AssociationMap< OBJCONT, ASSCONT >::asso_index_type |
Definition at line 58 of file AssociationMap.h.
| typedef AssociationVectorIterator AssociationMap< OBJCONT, ASSCONT >::asso_iterator |
association iterator type
Definition at line 81 of file AssociationMap.h.
| typedef ElementLink<asso_container_type> AssociationMap< OBJCONT, ASSCONT >::asso_link |
Definition at line 60 of file AssociationMap.h.
| typedef std::list<const asso_type*> AssociationMap< OBJCONT, ASSCONT >::asso_list |
Definition at line 59 of file AssociationMap.h.
| typedef ElementLinkVector<asso_container_type> AssociationMap< OBJCONT, ASSCONT >::asso_store |
Definition at line 61 of file AssociationMap.h.
| typedef asso_store::const_iterator AssociationMap< OBJCONT, ASSCONT >::asso_store_iterator |
Definition at line 62 of file AssociationMap.h.
| typedef asso_container_type::base_value_type AssociationMap< OBJCONT, ASSCONT >::asso_type |
Definition at line 54 of file AssociationMap.h.
| typedef OBJCONT AssociationMap< OBJCONT, ASSCONT >::object_container_type |
Definition at line 44 of file AssociationMap.h.
| typedef SG::GenerateIndexingPolicy<object_container_type>::type::index_type AssociationMap< OBJCONT, ASSCONT >::object_index_type |
Definition at line 49 of file AssociationMap.h.
| typedef AssociationObjectIterator AssociationMap< OBJCONT, ASSCONT >::object_iterator |
object iterator type
Definition at line 84 of file AssociationMap.h.
| typedef ElementLink<object_container_type> AssociationMap< OBJCONT, ASSCONT >::object_link |
Definition at line 50 of file AssociationMap.h.
| typedef std::list<const object_type*> AssociationMap< OBJCONT, ASSCONT >::object_list |
Definition at line 51 of file AssociationMap.h.
| typedef object_container_type::base_value_type AssociationMap< OBJCONT, ASSCONT >::object_type |
Definition at line 45 of file AssociationMap.h.
| typedef store_type::iterator AssociationMap< OBJCONT, ASSCONT >::store_iterator_type |
Definition at line 64 of file AssociationMap.h.
| typedef std::map<object_link,asso_store> AssociationMap< OBJCONT, ASSCONT >::store_type |
Definition at line 63 of file AssociationMap.h.
| AssociationMap< OBJCONT, ASSCONT >::AssociationMap | ( | ) |
|
virtual |
| void AssociationMap< OBJCONT, ASSCONT >::addAssociation | ( | const object_container_type * | objectContainer, |
| const object_index_type & | objectIndex, | ||
| const asso_container_type * | assoContainer, | ||
| const asso_index_type & | assoIndex ) |
| void AssociationMap< OBJCONT, ASSCONT >::addAssociation | ( | const object_container_type * | objectContainer, |
| const object_type * | objectPointer, | ||
| const asso_container_type * | assoContainer, | ||
| const asso_type * | assoPointer ) |
| void AssociationMap< OBJCONT, ASSCONT >::addAssociation | ( | const object_link & | objectLink, |
| const asso_link & | assoLink ) |
|
protected |
internally used function to add links to store
| asso_iterator AssociationMap< OBJCONT, ASSCONT >::beginAssociation | ( | const object_iterator & | objectIter | ) | const |
| asso_iterator AssociationMap< OBJCONT, ASSCONT >::beginAssociation | ( | const object_type * | objectPointer | ) | const |
begin iterator for associations
| object_iterator AssociationMap< OBJCONT, ASSCONT >::beginObject | ( | ) | const |
begin iterator for objects
| bool AssociationMap< OBJCONT, ASSCONT >::containsAssociation | ( | const asso_type * | assoPointer | ) | const |
|
inline |
containment check
Definition at line 165 of file AssociationMap.h.
| bool AssociationMap< OBJCONT, ASSCONT >::containsAssociation | ( | const object_type * | objectPointer, |
| const asso_type * | assoPointer ) const |
|
inline |
testing if object is in store
Definition at line 143 of file AssociationMap.h.
| asso_iterator AssociationMap< OBJCONT, ASSCONT >::endAssociation | ( | const object_iterator & | objectIter | ) | const |
| asso_iterator AssociationMap< OBJCONT, ASSCONT >::endAssociation | ( | const object_type * | objectPointer | ) | const |
end iterator for associations
| object_iterator AssociationMap< OBJCONT, ASSCONT >::endObject | ( | ) | const |
end iterator for objects
|
inline |
find association
Definition at line 158 of file AssociationMap.h.
| asso_iterator AssociationMap< OBJCONT, ASSCONT >::findAssociation | ( | const object_type * | objectPointer, |
| const asso_type * | assoPointer ) const |
|
inline |
finding an object with allocation
Definition at line 139 of file AssociationMap.h.
|
inline |
associations iterator access
The associations are accessed as function of the row key (the object).
Definition at line 154 of file AssociationMap.h.
|
inline |
get all associations for a given object
Definition at line 184 of file AssociationMap.h.
| bool AssociationMap< OBJCONT, ASSCONT >::getAssociations | ( | const object_type * | objPointer, |
| asso_list & | assocs ) const |
get all associations for a given object
|
inline |
Definition at line 201 of file AssociationMap.h.
|
inline |
Definition at line 195 of file AssociationMap.h.
|
inline |
|
inline |
get association iterators by object iterator
type-safe retrieval of object pointer from iterator
Definition at line 135 of file AssociationMap.h.
|
inline |
get all objects for a given association
Definition at line 177 of file AssociationMap.h.
| bool AssociationMap< OBJCONT, ASSCONT >::getObjects | ( | const asso_type * | assoPointer, |
| object_list & | theObjects ) const |
get all objects for a given association
|
inlineprotected |
internally used find method
Definition at line 210 of file AssociationMap.h.
|
inline |
|
inline |
|
inline |
Definition at line 198 of file AssociationMap.h.
| size_t AssociationMap< OBJCONT, ASSCONT >::size | ( | const object_type * | objectPointer | ) | const |
|
protected |
internal store
Definition at line 207 of file AssociationMap.h.
|
static |
Definition at line 68 of file AssociationMap.h.