Belle II Software light-2406-ragdoll
|
Class to store a bidirectional index between two StoreArrays. More...
#include <RelationIndexContainer.h>
Classes | |
struct | Element |
Element type for the index. More... | |
Public Types | |
typedef boost::multi_index::multi_index_container< Element, boost::multi_index::indexed_by< boost::multi_index::ordered_non_unique< boost::multi_index::member< Element, const FROM *, &Element::from > >, boost::multi_index::ordered_non_unique< boost::multi_index::member< Element, const TO *, &Element::to > > > > | ElementIndex |
Boost MultiIndex container to keep the bidirectional index. | |
Public Member Functions | |
operator bool () const | |
Returns true if relation is valid. | |
const ElementIndex & | index () const |
Get the index. | |
ElementIndex & | index () |
Get the index. | |
AccessorParams | getAccessorParams () const |
Get the AccessorParams of the underlying relation. | |
const AccessorParams & | getFromAccessorParams () const |
Get the AccessorParams of the StoreArray the relation points from. | |
const AccessorParams & | getToAccessorParams () const |
Get the AccessorParams of the StoreArray the relation points to. | |
Protected Member Functions | |
RelationIndexContainer (const RelationArray &relArray) | |
Constructor to create a new IndexContainer. | |
RelationIndexContainer (const RelationIndexContainer &)=delete | |
Restrict copies. | |
RelationIndexContainer & | operator= (const RelationIndexContainer &)=delete |
Restrict copies. | |
void | rebuild (bool force=false) |
Rebuild the index. | |
virtual void | clear () override |
Clear the index (at the end of an event) | |
Protected Attributes | |
ElementIndex | m_index |
Instance of the index. | |
RelationArray | m_storeRel |
the underlying relation. | |
AccessorParams | m_storeFrom |
AccessorParams of the StoreArray the relation points from. | |
AccessorParams | m_storeTo |
AccessorParams of the StoreArray the relation points to. | |
bool | m_valid |
Indicate wether the relation is valid. | |
Friends | |
class | RelationIndexManager |
Allow the RelationIndexManager to create instances. | |
Class to store a bidirectional index between two StoreArrays.
This class provides a bidirectional access to a given Relation to ease use of Relations for the normal user. There is no support for changing or adding Relations. All instances of this class will be managed and created by the RelationIndexManager.
This class is only used internally, users should use RelationsObject/RelationsInterface to access/add relations.
Definition at line 50 of file RelationIndexContainer.h.
typedef boost::multi_index::multi_index_container< Element, boost::multi_index::indexed_by < boost::multi_index::ordered_non_unique < boost::multi_index::member<Element, const FROM*, &Element::from> >, boost::multi_index::ordered_non_unique < boost::multi_index::member<Element, const TO*, &Element::to> > > > ElementIndex |
Boost MultiIndex container to keep the bidirectional index.
All the heavy lifting is done by this class
Definition at line 91 of file RelationIndexContainer.h.
|
inlineexplicitprotected |
Constructor to create a new IndexContainer.
relArray | RelationArray to build the relation for |
Definition at line 115 of file RelationIndexContainer.h.
|
inlineoverrideprotectedvirtual |
Clear the index (at the end of an event)
Implements RelationIndexBase.
Definition at line 134 of file RelationIndexContainer.h.
|
inline |
Get the AccessorParams of the underlying relation.
Definition at line 102 of file RelationIndexContainer.h.
|
inline |
Get the AccessorParams of the StoreArray the relation points from.
Definition at line 105 of file RelationIndexContainer.h.
|
inline |
Get the AccessorParams of the StoreArray the relation points to.
Definition at line 108 of file RelationIndexContainer.h.
|
inline |
|
inline |
|
inline |
|
friend |
Allow the RelationIndexManager to create instances.
Definition at line 152 of file RelationIndexContainer.h.
|
protected |
Instance of the index.
Definition at line 137 of file RelationIndexContainer.h.
|
protected |
AccessorParams of the StoreArray the relation points from.
Definition at line 143 of file RelationIndexContainer.h.
|
protected |
the underlying relation.
Definition at line 140 of file RelationIndexContainer.h.
|
protected |
AccessorParams of the StoreArray the relation points to.
Definition at line 146 of file RelationIndexContainer.h.
|
protected |
Indicate wether the relation is valid.
Definition at line 149 of file RelationIndexContainer.h.