#include <ObjectIndexer.h>
Public Types | |
typedef ThePEG::Ptr< ObjT > ::pointer | TPtr |
Alias for a reference counted pointer to ObjT . | |
typedef ThePEG::Ptr< ObjT > ::const_pointer | cTPtr |
Alias for a reference counted pointer to a const ObjT . | |
typedef ThePEG::Ptr< ObjT > ::transient_pointer | tTPtr |
Alias for a transient pointer to ObjT . | |
typedef ThePEG::Ptr< ObjT > ::transient_const_pointer | tcTPtr |
Alias for a transient pointer to a const ObjT . | |
typedef map< IntT, tTPtr > | IndexObjectMap |
Map of objects to indices. | |
typedef map< TPtr, IntT > | ObjectIndexMap |
Map of indices to objects. | |
Public Member Functions | |
IntT | operator() (tTPtr o) |
Return the index for the given object. | |
tTPtr | operator() (IntT i) |
Return the object for the given index. | |
tTPtr | operator() (IntT i) const |
Return the object for the given index. | |
tTPtr | find (IntT i) const |
Return the object for the given index. | |
void | operator() (IntT i, tTPtr o) |
Associate the given object with the given index. | |
bool | included (tTPtr o) const |
Return true if the given object is known. | |
bool | included (IntT i) const |
Return true if the given index is known. | |
void | clear () |
Remove all associations. | |
bool | empty () const |
Return true if no associations has been made. | |
Private Member Functions | |
ObjectIndexer & | operator= (const ObjectIndexer &) |
Private and non-existent assignment operator. | |
Private Attributes | |
IndexObjectMap | indexObject |
All known objects keyed by their indices. | |
ObjectIndexMap | objectIndex |
All known indices keyed by the corresponding objects. |
Definition at line 22 of file ObjectIndexer.h.
typedef ThePEG::Ptr< ObjT >::pointer ThePEG::ObjectIndexer< IntT, ObjT >::TPtr |
typedef ThePEG::Ptr< ObjT >::const_pointer ThePEG::ObjectIndexer< IntT, ObjT >::cTPtr |
Alias for a reference counted pointer to a const ObjT .
Definition at line 26 of file ObjectIndexer.h.
typedef ThePEG::Ptr< ObjT >::transient_pointer ThePEG::ObjectIndexer< IntT, ObjT >::tTPtr |
typedef ThePEG::Ptr< ObjT >::transient_const_pointer ThePEG::ObjectIndexer< IntT, ObjT >::tcTPtr |
typedef map<TPtr,IntT> ThePEG::ObjectIndexer< IntT, ObjT >::ObjectIndexMap |
IntT ThePEG::ObjectIndexer< IntT, ObjT >::operator() | ( | tTPtr | o | ) | [inline] |
Return the index for the given object.
If the object is not known, a new index will be created.
Definition at line 40 of file ObjectIndexer.h.
tTPtr ThePEG::ObjectIndexer< IntT, ObjT >::operator() | ( | IntT | i | ) | [inline] |
Return the object for the given index.
If the index is not known, a new object will be (default) created.
Definition at line 56 of file ObjectIndexer.h.
tTPtr ThePEG::ObjectIndexer< IntT, ObjT >::operator() | ( | IntT | i | ) | const [inline] |
Return the object for the given index.
If the index is not known, a null pointer will be returned.
Definition at line 72 of file ObjectIndexer.h.
tTPtr ThePEG::ObjectIndexer< IntT, ObjT >::find | ( | IntT | i | ) | const [inline] |
Return the object for the given index.
If the index is not known, a null pointer will be returned.
Definition at line 80 of file ObjectIndexer.h.
Referenced by ThePEG::ObjectIndexer< long, ThePEG::ColourLine >::operator()().
void ThePEG::ObjectIndexer< IntT, ObjT >::operator() | ( | IntT | i, | |
tTPtr | o | |||
) | [inline] |
Associate the given object with the given index.
Possible other associations involving the index or the object is removed.
Definition at line 89 of file ObjectIndexer.h.