ATLAS Offline Software
Public Types | Public Member Functions | Private Types | Private Attributes | List of all members
IdentifierHash Class Reference

#include <IdentifierHash.h>

Collaboration diagram for IdentifierHash:

Public Types

typedef unsigned int value_type
 

Public Member Functions

 IdentifierHash ()=default
 Default methods. More...
 
 IdentifierHash (const IdentifierHash &other)=default
 
 IdentifierHash (IdentifierHash &&other)=default
 
IdentifierHashoperator= (const IdentifierHash &other)=default
 
IdentifierHashoperator= (IdentifierHash &&other)=default
 
 ~IdentifierHash ()=default
 
 IdentifierHash (value_type value)
 Initialization with value. More...
 
 operator unsigned int (void) const
 Get the value. More...
 
unsigned int value (void) const
 
bool is_valid () const
 Check if id is in a valid state. More...
 
IdentifierHashoperator= (value_type value)
 Assignment operators. More...
 
IdentifierHashoperator+= (unsigned int value)
 
IdentifierHashoperator-= (unsigned int value)
 

Private Types

enum  max_value_type { max_value = 0xFFFFFFFF }
 

Private Attributes

value_type m_value = max_value
 

Detailed Description


IdentifierHash :

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 37 of file IdentifierHash.h.

Member Typedef Documentation

◆ value_type

typedef unsigned int IdentifierHash::value_type

Define public typedefs

Definition at line 48 of file IdentifierHash.h.

Member Enumeration Documentation

◆ max_value_type

Enumerator
max_value 

Definition at line 91 of file IdentifierHash.h.

103  {

Constructor & Destructor Documentation

◆ IdentifierHash() [1/4]

IdentifierHash::IdentifierHash ( )
default

Default methods.


Constructors

◆ IdentifierHash() [2/4]

IdentifierHash::IdentifierHash ( const IdentifierHash other)
default

◆ IdentifierHash() [3/4]

IdentifierHash::IdentifierHash ( IdentifierHash &&  other)
default

◆ ~IdentifierHash()

IdentifierHash::~IdentifierHash ( )
default

◆ IdentifierHash() [4/4]

IdentifierHash::IdentifierHash ( value_type  value)

Initialization with value.

Member Function Documentation

◆ is_valid()

bool IdentifierHash::is_valid ( ) const

Check if id is in a valid state.


Error management

◆ operator unsigned int()

IdentifierHash::operator unsigned int ( void  ) const

Get the value.


Accessors

◆ operator+=()

IdentifierHash& IdentifierHash::operator+= ( unsigned int  value)

◆ operator-=()

IdentifierHash& IdentifierHash::operator-= ( unsigned int  value)

◆ operator=() [1/3]

IdentifierHash& IdentifierHash::operator= ( const IdentifierHash other)
default

◆ operator=() [2/3]

IdentifierHash& IdentifierHash::operator= ( IdentifierHash &&  other)
default

◆ operator=() [3/3]

IdentifierHash& IdentifierHash::operator= ( value_type  value)

Assignment operators.


Modifications

◆ value()

unsigned int IdentifierHash::value ( void  ) const

Member Data Documentation

◆ m_value

value_type IdentifierHash::m_value = max_value
private

Definition at line 98 of file IdentifierHash.h.


The documentation for this class was generated from the following file: