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