ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthContainers
AthContainers
tools
ElementProxy.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
*/
11
12
13
#ifndef ATHCONTAINERS_TOOLS_ELEMENTPROXY_H
14
#define ATHCONTAINERS_TOOLS_ELEMENTPROXY_H
15
16
17
#include "
AthContainers/OwnershipPolicy.h
"
18
#include <memory>
19
#include <RootMetaSelection.h>
20
21
22
// Forward declarations.
23
namespace
ROOT
{
namespace
Meta
{
namespace
Selection
{
24
namespace
DataModel_detail
{
25
template
<
class
DVL>
class
ElementProxy
;
26
}
27
}}}
28
29
30
namespace
DataModel_detail
{
31
32
51
template
<
class
DVL>
52
class
ElementProxy
53
{
54
public
:
61
ElementProxy
(
typename
DVL::BaseContainer::iterator i,
62
DVL*
container
);
63
64
66
ElementProxy
(
const
ElementProxy
&) =
default
;
67
68
80
ElementProxy
&
operator=
(
const
ElementProxy
& rhs);
81
82
93
// Disable this method if the container must own its elements.
94
// In that case, only the unique_ptr overload is relevant.
95
template
<
bool
= true>
96
requires
(!DVL::must_own)
97
ElementProxy<DVL>
&
98
operator
= (
typename
DVL::value_type rhs);
99
100
110
ElementProxy
&
operator=
(
typename
DVL::unique_type rhs);
111
112
118
operator
typename
DVL::value_type
const
()
const
;
119
120
126
typename
DVL::value_type
const
operator->
()
const
;
127
128
129
133
DVL*
container
();
134
135
139
const
DVL*
container
()
const
;
140
141
142
typedef
typename
143
ROOT::Meta::Selection::DataModel_detail::ElementProxy<DVL>::self
144
self
;
145
146
147
private
:
149
typename
DVL::BaseContainer::iterator
m_proxied
;
150
152
DVL*
m_container
;
153
};
154
155
156
}
// namespace DataModel_detail
157
158
159
namespace
ROOT
{
namespace
Meta {
namespace
Selection {
160
161
namespace
DataModel_detail
{
162
163
template
<
class
DVL>
class
ElementProxy
:
public
SelectNoInstance
164
{
165
public
:
166
typedef
ElementProxy<DVL>
self
;
167
ROOT::Meta::Selection::MemberAttributes< kTransient >
m_proxied
;
168
ROOT::Meta::Selection::MemberAttributes< kTransient >
m_container
;
169
};
170
171
}
172
}}}
// ROOT namespace
173
174
175
#include "
AthContainers/tools/ElementProxy.icc
"
176
177
178
#endif
// not ATHCONTAINERS_TOOLS_ELEMENTPROXY_H
ElementProxy.icc
OwnershipPolicy.h
DataModel_detail::ElementProxy::operator->
DVL::value_type const operator->() const
Conversion to a (const) pointer.
DataModel_detail::ElementProxy< ConstDataVector >::container
ConstDataVector * container()
DataModel_detail::ElementProxy::ElementProxy
ElementProxy(typename DVL::BaseContainer::iterator i, DVL *container)
Constructor.
DataModel_detail::ElementProxy< ConstDataVector >::m_container
ConstDataVector * m_container
Definition
ElementProxy.h:152
DataModel_detail::ElementProxy::operator=
ElementProxy & operator=(const ElementProxy &rhs)
Assignment operator, from an Element proxy.
DataModel_detail::ElementProxy::ElementProxy
ElementProxy(const ElementProxy &)=default
Default copy.
DataModel_detail::ElementProxy::container
const DVL * container() const
Return the container holding the element that this object proxies.
DataModel_detail::ElementProxy< ConstDataVector >::self
ROOT::Meta::Selection::DataModel_detail::ElementProxy< ConstDataVector >::self self
Definition
ElementProxy.h:144
DataModel_detail::ElementProxy< ConstDataVector >::m_proxied
ConstDataVector::BaseContainer::iterator m_proxied
Definition
ElementProxy.h:149
ROOT::Meta::Selection::DataModel_detail::ElementProxy
Definition
ElementProxy.h:164
ROOT::Meta::Selection::DataModel_detail::self::m_container
ROOT::Meta::Selection::MemberAttributes< kTransient > m_container
Definition
ElementProxy.h:168
ROOT::Meta::Selection::DataModel_detail::ElementProxy::self
ElementProxy< DVL > self
Definition
ElementProxy.h:166
ROOT::Meta::Selection::DataModel_detail::self::m_proxied
ROOT::Meta::Selection::MemberAttributes< kTransient > m_proxied
Definition
ElementProxy.h:167
DataModel_detail
Definition
CompareAndPrint.h:15
ROOT::Meta::Selection
Definition
DataVector.h:581
ROOT::Meta
Definition
DataVector.h:581
ROOT
Selection rules: declare transient members.
Definition
DataVector.h:581
Generated on
for ATLAS Offline Software by
1.17.0