ATLAS Offline Software
IdentifierHash.icc
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 
6 inline IdentifierHash::IdentifierHash (value_type value)
7  : m_value(value)
8 {}
9 
10 inline IdentifierHash&
11 IdentifierHash::operator = (value_type value){
12  m_value = value;
13  return (*this);
14 }
15 
16 inline IdentifierHash&
17 IdentifierHash::operator += (unsigned int value){
18  m_value += value;
19  return (*this);
20 }
21 
22 inline IdentifierHash&
23 IdentifierHash::operator -= (unsigned int value){
24  m_value = (m_value > value) ? m_value - value : 0;
25  return (*this);
26 }
27 
28 inline IdentifierHash::operator unsigned int () const{
29  return (m_value);
30 }
31 
32 inline unsigned int
33 IdentifierHash::value() const{
34  return (m_value);
35 }
36 
37 inline bool
38 IdentifierHash::is_valid() const{
39  return (!(m_max_value == m_value));
40 }
41 
42 inline MsgStream&
43 operator << (MsgStream& f, const IdentifierHash& id){
44  f << id.value();
45  return f;
46 }
47 
48 inline std::ostream&
49 operator << (std::ostream& os, const IdentifierHash& id){
50  os << id.value();
51  return os;
52 }
53 
54 
55