![]() |
ATLAS Offline Software
|
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to look-up "Identifiable"s stored in a simple vector. It is intended to be a continuous hash, i.e. it runs from 0 to N-1, where there are N different possible values for an Identifier(32) within a specific context. IdentifierHashes are created by default in an invalid state which can be checked with "is_valid" method. This allows some error checking. More...
#include <IdentifierHash.h>
Public Types | |
| using | value_type = unsigned int |
Public Member Functions | |
| IdentifierHash ()=default | |
| Default methods. More... | |
| IdentifierHash (value_type value) | |
| Initialization with value. More... | |
| bool | is_valid () const |
| Check if id is in a valid state. More... | |
| IdentifierHash & | operator= (value_type value) |
| Assignment operators. More... | |
| IdentifierHash & | operator+= (value_type value) |
| IdentifierHash & | operator-= (value_type value) |
| operator value_type () const | |
| value_type | value () const |
Private Attributes | |
| value_type | m_value = m_max_value |
Static Private Attributes | |
| static constexpr value_type | m_max_value = 0xFFFFFFFF |
| default value, and indicator of invalid state More... | |
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to look-up "Identifiable"s stored in a simple vector. It is intended to be a continuous hash, i.e. it runs from 0 to N-1, where there are N different possible values for an Identifier(32) within a specific context. IdentifierHashes are created by default in an invalid state which can be checked with "is_valid" method. This allows some error checking.
Definition at line 25 of file IdentifierHash.h.
| using IdentifierHash::value_type = unsigned int |
Definition at line 27 of file IdentifierHash.h.
|
default |
Default methods.
| IdentifierHash::IdentifierHash | ( | value_type | value | ) |
Initialization with value.
| bool IdentifierHash::is_valid | ( | ) | const |
Check if id is in a valid state.
| IdentifierHash::operator value_type | ( | ) | const |
Get the value
| IdentifierHash& IdentifierHash::operator+= | ( | value_type | value | ) |
| IdentifierHash& IdentifierHash::operator-= | ( | value_type | value | ) |
| IdentifierHash& IdentifierHash::operator= | ( | value_type | value | ) |
Assignment operators.
| value_type IdentifierHash::value | ( | ) | const |
|
staticconstexprprivate |
default value, and indicator of invalid state
Definition at line 46 of file IdentifierHash.h.
|
private |
Definition at line 48 of file IdentifierHash.h.
1.8.18