ATLAS Offline Software
Loading...
Searching...
No Matches
Control
AthLinks
AthLinks
tools
IndexHolder.h
Go to the documentation of this file.
1
// This file's extension implies that it's C, but it's really -*- C++ -*-.
2
/*
3
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
4
*/
11
12
13
#ifndef ATHLINKS_INDEXHOLDER_H
14
#define ATHLINKS_INDEXHOLDER_H
15
16
17
namespace
SG
{
18
19
31
template
<
class
T>
32
class
IndexHolder
33
{
34
public
:
36
IndexHolder
() :
m_index
(),
m_valid
(false) {}
37
39
IndexHolder
(
const
T& t) :
m_index
(t),
m_valid
(true) {}
40
42
bool
isValid
()
const
{
return
m_valid
; }
43
45
void
reset
() {
m_valid
=
false
;
m_index
= T(); }
46
48
// cppcheck-suppress returnByReference
49
operator
const
T&()
const
{
return
m_index
; }
50
51
52
private
:
54
T
m_index
;
55
57
bool
m_valid
;
58
};
59
60
61
}
// namespace SG
62
63
64
#endif
// not ATHLINKS_INDEXHOLDER_H
SG::IndexHolder< index_type >::m_valid
bool m_valid
Definition
IndexHolder.h:57
SG::IndexHolder::IndexHolder
IndexHolder(const T &t)
Copy constructor.
Definition
IndexHolder.h:39
SG::IndexHolder< index_type >::m_index
index_type m_index
Definition
IndexHolder.h:54
SG::IndexHolder::reset
void reset()
Reset the index to a null value.
Definition
IndexHolder.h:45
SG::IndexHolder::IndexHolder
IndexHolder()
Constructor.
Definition
IndexHolder.h:36
SG::IndexHolder::isValid
bool isValid() const
Return valid flag.
Definition
IndexHolder.h:42
SG
Forward declaration.
Definition
CaloCellPacker_400_500.h:32
Generated on
for ATLAS Offline Software by
1.14.0