![]() |
ATLAS Offline Software
|
Helper base class for instantiation of templated class IdentifierHashTable. More...
#include <IdHashTableHelper.h>
Public Types | |
| enum | { NFIELDS = N , NMAX =UINT_MAX } |
| N is the number of fields to use from the identifier. More... | |
| typedef ID | IdentifierType |
| define type IdentifierType | |
| typedef HASH | HashType |
| define type HashType | |
| typedef HASH | ValueType |
| needed for MultiDimArray<> instantiation | |
Public Member Functions | |
| IdHashTableHelper () | |
| Default constructor. | |
| IdHashTableHelper (const IdentifierType &id) | |
| Constructor to initialise identifier. | |
| IdHashTableHelper (int fields[N]) | |
| Constructor to initialise fields. | |
| virtual | ~IdHashTableHelper () |
| virtual destructor needed because of derivation | |
| const IdentifierType & | getId () const |
| Get the identifier. | |
| void | setId (const IdentifierType &id) |
| Set (only) the identifier. | |
| int | operator[] (unsigned int fieldIndex) const |
| Return the value encoded in field. | |
| void | setField (int index, int value) |
| Set field at index to value. | |
| void | setFields (int fields[N]) |
| Set fields from array. | |
Static Public Member Functions | |
| static void | setDefaults (const IdentifierType &defId, const HashType &defHash) |
| Set the default (invalid) values for identifier and hash. | |
| static bool | isValid (const IdentifierType &) |
| static HashType | defaultHash () |
| Returns default (=invalid) hash. | |
| static IdentifierType | defaultIdentifier () |
| Return default (=invalid) identifier. | |
| static ValueType | defaultValue () |
| Return default hash. | |
Private Attributes | |
| IdentifierType | m_id |
| int | m_fields [N] |
Static Private Attributes | |
| static IdentifierType | s_defaultId |
| static HashType | s_defaultHash |
Helper base class for instantiation of templated class IdentifierHashTable.
Definition at line 24 of file IdHashTableHelper.h.
| typedef HASH IdHashTableHelper< N, ID, HASH >::HashType |
define type HashType
Definition at line 35 of file IdHashTableHelper.h.
| typedef ID IdHashTableHelper< N, ID, HASH >::IdentifierType |
define type IdentifierType
Definition at line 33 of file IdHashTableHelper.h.
| typedef HASH IdHashTableHelper< N, ID, HASH >::ValueType |
needed for MultiDimArray<> instantiation
Definition at line 37 of file IdHashTableHelper.h.
N is the number of fields to use from the identifier.
NMAX is just to make sure we get unsigned int type of enum.
| Enumerator | |
|---|---|
| NFIELDS | |
| NMAX | |
Definition at line 31 of file IdHashTableHelper.h.
|
inline |
Default constructor.
Identifier and fields are set to invalid.
Definition at line 87 of file IdHashTableHelper.h.
|
explicit |
Constructor to initialise identifier.
Fields are set to invalid.
|
inlineexplicit |
|
inlinevirtual |
virtual destructor needed because of derivation
Definition at line 106 of file IdHashTableHelper.h.
|
inlinestatic |
|
inlinestatic |
Return default (=invalid) identifier.
Definition at line 153 of file IdHashTableHelper.h.
|
inlinestatic |
Return default hash.
Needed for class MultiDimArray.
Definition at line 159 of file IdHashTableHelper.h.
|
inline |
|
inlinestatic |
Definition at line 164 of file IdHashTableHelper.h.
|
inline |
Return the value encoded in field.
No range check!
Definition at line 111 of file IdHashTableHelper.h.
|
inlinestatic |
Set the default (invalid) values for identifier and hash.
Must be called (once per type T) if the default constructors of HashType or IdentifierType do not give a well defined (invalid!) value. This is typically the case for built-in types.
Definition at line 138 of file IdHashTableHelper.h.
|
inline |
|
inline |
|
inline |
Set (only) the identifier.
Definition at line 123 of file IdHashTableHelper.h.
|
private |
Definition at line 78 of file IdHashTableHelper.h.
|
private |
Definition at line 77 of file IdHashTableHelper.h.
|
staticprivate |
Definition at line 83 of file IdHashTableHelper.h.
|
staticprivate |
Definition at line 82 of file IdHashTableHelper.h.