ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthLinks
AthLinks
tools
IdentContIndexingPolicy.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-2025 CERN for the benefit of the ATLAS collaboration
4
*/
10
11
#ifndef ATHLINKS_TOOLS_IDENTCONTINDEXINGPOLICY_H
12
#define ATHLINKS_TOOLS_IDENTCONTINDEXINGPOLICY_H
13
14
#include "
AthLinks/tools/IdentContIndex.h
"
15
#include "
AthLinks/exceptions.h
"
16
#include "
AthenaKernel/tools/type_tools.h
"
17
#include <concepts>
18
#include <cassert>
19
#include <stdexcept>
20
21
22
namespace
SG
{
23
24
38
template
<
class
CONT>
39
class
IdentContIndexingPolicy
40
{
41
private
:
42
typedef
typename
CONT::IDENTIFIABLE
coll_type
;
43
typedef
typename
coll_type::value_type
obj_type
;
44
45
46
public
:
48
typedef
typename
type_tools::Copy<obj_type>::type
ElementType
;
49
typedef
typename
type_tools::Copy<obj_type>::const_reference
ElementConstReference
;
50
typedef
typename
type_tools::Copy<obj_type>::const_pointer
ElementConstPointer
;
51
53
typedef
unsigned
int
index_type
;
54
56
typedef
index_type
stored_index_type
;
57
58
63
static
bool
isValid
(
stored_index_type
index
);
64
65
70
static
index_type
storedToExternal
(
stored_index_type
index
);
71
72
77
static
void
reset
(
stored_index_type
&
index
);
78
79
88
static
89
ElementType
lookup
(
index_type
index
,
const
CONT& data);
90
91
100
static
void
101
reverseLookup
(
const
CONT& data,
102
ElementConstReference
element,
103
index_type
&
index
);
104
};
105
106
107
}
// namespace SG
108
109
110
#include "
AthLinks/tools/IdentContIndexingPolicy.icc
"
111
112
113
#endif
// ATHLINKS_TOOLS_IDENTCONTINDEXINGPOLICY_H
exceptions.h
Exceptions that can be thrown from AthLinks.
IdentContIndex.h
IdentContIndexingPolicy.icc
SG::IdentContIndexingPolicy
Indexing policy for an IdentifiableContainer.
Definition
IdentContIndexingPolicy.h:40
SG::IdentContIndexingPolicy::isValid
static bool isValid(stored_index_type index)
Test to see if an index is valid.
SG::IdentContIndexingPolicy::lookup
static ElementType lookup(index_type index, const CONT &data)
Retrieve from a container the element corresponding to an index.
SG::IdentContIndexingPolicy::ElementConstPointer
type_tools::Copy< obj_type >::const_pointer ElementConstPointer
Definition
IdentContIndexingPolicy.h:50
SG::IdentContIndexingPolicy::ElementType
type_tools::Copy< obj_type >::type ElementType
The type we get when we dereference a link, and derived types.
Definition
IdentContIndexingPolicy.h:48
SG::IdentContIndexingPolicy::obj_type
coll_type::value_type obj_type
Definition
IdentContIndexingPolicy.h:43
SG::IdentContIndexingPolicy::reverseLookup
static void reverseLookup(const CONT &data, ElementConstReference element, index_type &index)
Find the index of the (first) instance of ELEMENT in DATA.
SG::IdentContIndexingPolicy::storedToExternal
static index_type storedToExternal(stored_index_type index)
Convert from stored to external index types.
SG::IdentContIndexingPolicy::index_type
unsigned int index_type
The type of an index, as provided to or returned from a link.
Definition
IdentContIndexingPolicy.h:53
SG::IdentContIndexingPolicy::ElementConstReference
type_tools::Copy< obj_type >::const_reference ElementConstReference
Definition
IdentContIndexingPolicy.h:49
SG::IdentContIndexingPolicy::coll_type
CONT::IDENTIFIABLE coll_type
Definition
IdentContIndexingPolicy.h:42
SG::IdentContIndexingPolicy::stored_index_type
index_type stored_index_type
The type of an index, as stored internally within a link.
Definition
IdentContIndexingPolicy.h:56
SG::IdentContIndexingPolicy::reset
static void reset(stored_index_type &index)
Make an index invalid.
SG
Forward declaration.
Definition
CaloCellPacker_400_500.h:32
index
Definition
index.py:1
type_tools::Copy::type
T type
Definition
type_tools.h:52
type_tools::Copy::const_reference
const T & const_reference
Definition
type_tools.h:53
type_tools::Copy::const_pointer
const T * const_pointer
Definition
type_tools.h:54
type_tools.h
Generated on
for ATLAS Offline Software by
1.17.0