ATLAS Offline Software
Loading...
Searching...
No Matches
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
15#include "AthLinks/exceptions.h"
17#include <concepts>
18#include <cassert>
19#include <stdexcept>
20
21
22namespace SG {
23
24
38template <class CONT>
40{
41private:
42 typedef typename CONT::IDENTIFIABLE coll_type;
43 typedef typename coll_type::value_type obj_type;
44
45
46public:
51
53 typedef unsigned int index_type;
54
57
58
64
65
71
72
78
79
88 static
90
91
100 static void
101 reverseLookup(const CONT& data,
102 ElementConstReference element,
104};
105
106
107} // namespace SG
108
109
111
112
113#endif // ATHLINKS_TOOLS_IDENTCONTINDEXINGPOLICY_H
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
Indexing policy for an IdentifiableContainer.
static bool isValid(stored_index_type index)
Test to see if an index is valid.
static ElementType lookup(index_type index, const CONT &data)
Retrieve from a container the element corresponding to an index.
type_tools::Copy< obj_type >::const_pointer ElementConstPointer
type_tools::Copy< obj_type >::type ElementType
The type we get when we dereference a link, and derived types.
static void reverseLookup(const CONT &data, ElementConstReference element, index_type &index)
Find the index of the (first) instance of ELEMENT in DATA.
static index_type storedToExternal(stored_index_type index)
Convert from stored to external index types.
unsigned int index_type
The type of an index, as provided to or returned from a link.
type_tools::Copy< obj_type >::const_reference ElementConstReference
index_type stored_index_type
The type of an index, as stored internally within a link.
static void reset(stored_index_type &index)
Make an index invalid.
Forward declaration.
Definition index.py:1
const T & const_reference
Definition type_tools.h:53
const T * const_pointer
Definition type_tools.h:54