ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthAllocators
AthAllocators
ArenaHandleBaseT.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
/*
4
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5
*/
6
7
// $Id: ArenaHandleBaseT.h 470529 2011-11-24 23:54:22Z ssnyder $
8
17
18
19
#ifndef ATLALLOCATORS_ARENAHANDLEBASET_H
20
#define ATLALLOCATORS_ARENAHANDLEBASET_H
21
22
#include "
AthAllocators/ArenaHandleBaseAllocT.h
"
23
#include "
AthAllocators/ArenaHeader.h
"
24
#include "boost/iterator/iterator_adaptor.hpp"
25
#include <cstdlib>
26
27
28
namespace
SG
{
29
30
36
template
<
class
T,
class
ALLOC>
37
class
ArenaHandleBaseT
38
:
public
ArenaHandleBaseAllocT
<ALLOC>
39
{
40
public
:
42
typedef
T*
pointer
;
43
45
typedef
ArenaHandleBaseAllocT<ALLOC>
Base
;
46
47
54
ArenaHandleBaseT
(
ArenaHeader
*
header
,
size_t
index
);
55
56
64
ArenaHandleBaseT
(
ArenaHeader
*
header
,
65
const
EventContext& ctx,
66
size_t
index
);
67
68
74
ArenaHandleBaseT
(
ArenaBase
* arena,
size_t
index
);
75
76
77
// Forward declaration.
78
class
const_iterator
;
79
80
94
class
iterator
95
:
public
boost::iterator_adaptor<
96
iterator,
97
typename ALLOC::iterator,
98
T,
99
boost::forward_traversal_tag>
100
{
101
public
:
106
iterator
(
const
typename
ALLOC::iterator& it);
107
108
109
// To allow initializing a @c const_iterator from an @c iterator.
110
friend
class
const_iterator
;
111
112
113
private
:
114
// Required by @c iterator_adaptor.
115
friend
class
boost::iterator_core_access
;
116
117
121
typename
iterator::reference
dereference
()
const
;
122
};
123
124
138
class
const_iterator
139
:
public
boost::iterator_adaptor<
140
const_iterator,
141
typename ALLOC::const_iterator,
142
T const,
143
boost::forward_traversal_tag>
144
{
145
146
public
:
151
const_iterator
(
const
typename
ALLOC::const_iterator& it);
152
153
158
const_iterator
(
const
iterator
& it);
159
160
161
private
:
162
// Required by @c iterator_adaptor.
163
friend
class
boost::iterator_core_access
;
164
165
169
typename
const_iterator::reference
dereference
()
const
;
170
};
171
172
181
iterator
begin
();
182
183
192
const_iterator
begin
()
const
;
193
194
201
iterator
end
();
202
203
210
const_iterator
end
()
const
;
211
212
223
void
free
(
pointer
p);
224
225
236
void
resetTo
(
pointer
p);
237
};
238
239
240
}
// namespace SG
241
242
243
#include "
AthAllocators/ArenaHandleBaseT.icc
"
244
245
246
#endif
// not ATLALLOCATORS_ARENAHANDLEBASET_H
ArenaHandleBaseAllocT.h
Base class for Handle classes, containing parts that depend only on the Allocator....
ArenaHandleBaseT.icc
ArenaHeader.h
Proxy for a group of Arenas. See Arena.h for an overview of the arena-based memory allocators.
iterator::reference
CONT::reference reference
Definition
AtlasHitsVector.h:43
SG::ArenaBase
Part of Arena dealing with the list of allocators.
Definition
ArenaBase.h:42
SG::ArenaHandleBaseAllocT::ArenaHandleBaseAllocT
ArenaHandleBaseAllocT(ArenaHeader *header, size_t index)
Constructor, passing in an index.
SG::ArenaHandleBaseT::const_iterator
Const iterator.
Definition
ArenaHandleBaseT.h:144
SG::ArenaHandleBaseT::const_iterator::dereference
const_iterator::reference dereference() const
Dereference the iterator.
SG::ArenaHandleBaseT::const_iterator::iterator_core_access
friend class boost::iterator_core_access
Definition
ArenaHandleBaseT.h:163
SG::ArenaHandleBaseT::const_iterator::const_iterator
const_iterator(const typename ALLOC::const_iterator &it)
Constructor.
SG::ArenaHandleBaseT::const_iterator::const_iterator
const_iterator(const iterator &it)
Constructor from a non-const iterator.
SG::ArenaHandleBaseT::iterator
Non-const iterator.
Definition
ArenaHandleBaseT.h:100
SG::ArenaHandleBaseT::iterator::iterator
iterator(const typename ALLOC::iterator &it)
Constructor.
SG::ArenaHandleBaseT::iterator::dereference
iterator::reference dereference() const
Dereference the iterator.
SG::ArenaHandleBaseT::iterator::iterator_core_access
friend class boost::iterator_core_access
Definition
ArenaHandleBaseT.h:115
SG::ArenaHandleBaseT::iterator::const_iterator
friend class const_iterator
Definition
ArenaHandleBaseT.h:110
SG::ArenaHandleBaseT::begin
const_iterator begin() const
Starting const iterator.
SG::ArenaHandleBaseT::pointer
T * pointer
A pointer to the element type we're allocating.
Definition
ArenaHandleBaseT.h:42
SG::ArenaHandleBaseT::ArenaHandleBaseT
ArenaHandleBaseT(ArenaHeader *header, const EventContext &ctx, size_t index)
Constructor, passing in an index, for a specific event slot.
SG::ArenaHandleBaseT::end
iterator end()
Ending iterator.
SG::ArenaHandleBaseT::ArenaHandleBaseT
ArenaHandleBaseT(ArenaBase *arena, size_t index)
Constructor, passing in an index, for a specific Arena.
SG::ArenaHandleBaseT::begin
iterator begin()
Starting iterator.
SG::ArenaHandleBaseT::end
const_iterator end() const
Ending const iterator.
SG::ArenaHandleBaseT::ArenaHandleBaseT
ArenaHandleBaseT(ArenaHeader *header, size_t index)
Constructor, passing in an index.
SG::ArenaHandleBaseT::Base
ArenaHandleBaseAllocT< ALLOC > Base
Shorthand for our base class.
Definition
ArenaHandleBaseT.h:45
SG::ArenaHandleBaseT::free
void free(pointer p)
Free an element.
SG::ArenaHandleBaseT::resetTo
void resetTo(pointer p)
Reset pool back to a previous state.
SG::ArenaHeader
Proxy for a group of Arenas.
Definition
ArenaHeader.h:54
header
Definition
hcg.cxx:529
SG
Forward declaration.
Definition
CaloCellPacker_400_500.h:32
index
Definition
index.py:1
Generated on
for ATLAS Offline Software by
1.17.0