ATLAS Offline Software
Loading...
Searching...
No Matches
JaggedVecImpl.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-2026 CERN for the benefit of the ATLAS collaboration.
4 */
15
16
17#ifndef ATHCONTAINERS_JAGGEDVECIMPL_H
18#define ATHCONTAINERS_JAGGEDVECIMPL_H
19
20
21#include <cstddef>
22#include <cstdint>
23
24
25namespace SG {
26
27
57{
58public:
61 using index_type = uint32_t;
62
63
67 JaggedVecEltBase () = default;
68
69
75
76
81 index_type begin (size_t elt_ndx) const;
82
83
87 index_type end() const;
88
89
94 size_t size (size_t elt_ndx) const;
95
96
101 bool operator== (const JaggedVecEltBase& other) const;
102
103
107 struct Shift
108 {
110 Shift (int offs);
111
114
115
116 private:
119 };
120
121
122private:
123 friend struct Shift;
124
127};
128
129
133template <class T>
135 : public JaggedVecEltBase
136{
137public:
139};
140
141
142} // namespace SG
143
144
146
147
148#endif // not ATHCONTAINERS_JAGGEDVECIMPL_H
uint32_t index_type
Type for the indices.
index_type begin(size_t elt_ndx) const
Return the index of the beginning of the range.
size_t size(size_t elt_ndx) const
Return the number of items in this range.
bool operator==(const JaggedVecEltBase &other) const
Equality test.
index_type m_end
End index.
JaggedVecEltBase()=default
Default constructor.
index_type end() const
Return the index of the end of the range.
JaggedVecEltBase(index_type end)
Constructor.
Describe one element of a jagged vector.
JaggedVecEltBase()=default
Default constructor.
Forward declaration.
Helper to shift indices.
void operator()(JaggedVecEltBase &e) const
Shift indices in e by the offset given to the constructor.
int m_offs
Offset by which to shift.
Shift(int offs)
Constructor.