Belle II Software
release-08-01-10
|
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. More... | |
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. More... | |
RelationIndexContainer (const RelationIndexContainer &)=delete | |
Restrict copies. | |
RelationIndexContainer & | operator= (const RelationIndexContainer &)=delete |
Restrict copies. | |
void | rebuild (bool force=false) |
Rebuild the index. More... | |
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.