ATLAS Offline Software
Loading...
Searching...
No Matches
Utils::ContainerProxyBase< Container, ElementIndexType, accessPolicy >::ElementProxyBase< ptrAccessPolicy > Struct Template Reference

#include <ProxyContainer.h>

Collaboration diagram for Utils::ContainerProxyBase< Container, ElementIndexType, accessPolicy >::ElementProxyBase< ptrAccessPolicy >:

Public Types

using index_t = ElementIndexType

Public Member Functions

 ElementProxyBase (const Container *container, const index_t &index)
 ElementProxyBase (Container *container, const index_t &index)
 ElementProxyBase (const Container *container, index_t &&index)
 ElementProxyBase (Container *container, index_t &&index)
 ElementProxyBase (const ElementProxyBase< ptrAccessPolicy > &other)
 ElementProxyBase (const ElementProxyBase< AccessPolicy::ReadWrite > &other)
template<typename T_RWProxy>
requires (ptrAccessPolicy == AccessPolicy::ReadOnly && isConvertableToReadOnlyProxy<ElementProxyBase<ptrAccessPolicy>, T_RWProxy> )
 ElementProxyBase (const T_RWProxy &other)
index_t index () const
const Containercontainer () const
Containercontainer ()

Protected Attributes

ContainerPtrBase< ptrAccessPolicy > m_container
index_t m_index

Detailed Description

template<class Container, typename ElementIndexType, AccessPolicy accessPolicy = AccessPolicy::ReadOnly>
template<AccessPolicy ptrAccessPolicy = accessPolicy>
struct Utils::ContainerProxyBase< Container, ElementIndexType, accessPolicy >::ElementProxyBase< ptrAccessPolicy >

Definition at line 190 of file ProxyContainer.h.

Member Typedef Documentation

◆ index_t

template<class Container, typename ElementIndexType, AccessPolicy accessPolicy = AccessPolicy::ReadOnly>
template<AccessPolicy ptrAccessPolicy = accessPolicy>
using Utils::ContainerProxyBase< Container, ElementIndexType, accessPolicy >::ElementProxyBase< ptrAccessPolicy >::index_t = ElementIndexType

Definition at line 191 of file ProxyContainer.h.

Constructor & Destructor Documentation

◆ ElementProxyBase() [1/7]

template<class Container, typename ElementIndexType, AccessPolicy accessPolicy = AccessPolicy::ReadOnly>
template<AccessPolicy ptrAccessPolicy = accessPolicy>
Utils::ContainerProxyBase< Container, ElementIndexType, accessPolicy >::ElementProxyBase< ptrAccessPolicy >::ElementProxyBase ( const Container * container,
const index_t & index )
inline

◆ ElementProxyBase() [2/7]

template<class Container, typename ElementIndexType, AccessPolicy accessPolicy = AccessPolicy::ReadOnly>
template<AccessPolicy ptrAccessPolicy = accessPolicy>
Utils::ContainerProxyBase< Container, ElementIndexType, accessPolicy >::ElementProxyBase< ptrAccessPolicy >::ElementProxyBase ( Container * container,
const index_t & index )
inline

Definition at line 200 of file ProxyContainer.h.

◆ ElementProxyBase() [3/7]

template<class Container, typename ElementIndexType, AccessPolicy accessPolicy = AccessPolicy::ReadOnly>
template<AccessPolicy ptrAccessPolicy = accessPolicy>
Utils::ContainerProxyBase< Container, ElementIndexType, accessPolicy >::ElementProxyBase< ptrAccessPolicy >::ElementProxyBase ( const Container * container,
index_t && index )
inline

Definition at line 203 of file ProxyContainer.h.

◆ ElementProxyBase() [4/7]

template<class Container, typename ElementIndexType, AccessPolicy accessPolicy = AccessPolicy::ReadOnly>
template<AccessPolicy ptrAccessPolicy = accessPolicy>
Utils::ContainerProxyBase< Container, ElementIndexType, accessPolicy >::ElementProxyBase< ptrAccessPolicy >::ElementProxyBase ( Container * container,
index_t && index )
inline

Definition at line 206 of file ProxyContainer.h.

◆ ElementProxyBase() [5/7]

template<class Container, typename ElementIndexType, AccessPolicy accessPolicy = AccessPolicy::ReadOnly>
template<AccessPolicy ptrAccessPolicy = accessPolicy>
Utils::ContainerProxyBase< Container, ElementIndexType, accessPolicy >::ElementProxyBase< ptrAccessPolicy >::ElementProxyBase ( const ElementProxyBase< ptrAccessPolicy > & other)
inline

Definition at line 209 of file ProxyContainer.h.

211 {}
Base class of a container proxy.
ContainerPtrBase< accessPolicy > m_container

◆ ElementProxyBase() [6/7]

template<class Container, typename ElementIndexType, AccessPolicy accessPolicy = AccessPolicy::ReadOnly>
template<AccessPolicy ptrAccessPolicy = accessPolicy>
Utils::ContainerProxyBase< Container, ElementIndexType, accessPolicy >::ElementProxyBase< ptrAccessPolicy >::ElementProxyBase ( const ElementProxyBase< AccessPolicy::ReadWrite > & other)
inline

Definition at line 212 of file ProxyContainer.h.

214 : m_container(other.container().cptr()), m_index(other.m_index)
215 {}
const Container & container() const
return a const pointer of the container which contains the elements this proxy refers to.

◆ ElementProxyBase() [7/7]

template<class Container, typename ElementIndexType, AccessPolicy accessPolicy = AccessPolicy::ReadOnly>
template<AccessPolicy ptrAccessPolicy = accessPolicy>
template<typename T_RWProxy>
requires (ptrAccessPolicy == AccessPolicy::ReadOnly && isConvertableToReadOnlyProxy<ElementProxyBase<ptrAccessPolicy>, T_RWProxy> )
Utils::ContainerProxyBase< Container, ElementIndexType, accessPolicy >::ElementProxyBase< ptrAccessPolicy >::ElementProxyBase ( const T_RWProxy & other)
inline

Definition at line 218 of file ProxyContainer.h.

220 : m_container(&other.container()), m_index(other.index())
221 {}

Member Function Documentation

◆ container() [1/2]

template<class Container, typename ElementIndexType, AccessPolicy accessPolicy = AccessPolicy::ReadOnly>
template<AccessPolicy ptrAccessPolicy = accessPolicy>
Container & Utils::ContainerProxyBase< Container, ElementIndexType, accessPolicy >::ElementProxyBase< ptrAccessPolicy >::container ( )
inline
Returns
A non const pointer of the container which contains the elements this proxy refers to if the access policy permits read-write access

Definition at line 237 of file ProxyContainer.h.

237{ return m_container.container(); }

◆ container() [2/2]

template<class Container, typename ElementIndexType, AccessPolicy accessPolicy = AccessPolicy::ReadOnly>
template<AccessPolicy ptrAccessPolicy = accessPolicy>
const Container & Utils::ContainerProxyBase< Container, ElementIndexType, accessPolicy >::ElementProxyBase< ptrAccessPolicy >::container ( ) const
inline
Returns
A const pointer of the container which contains the elements this proxy refers to. The value returned by index identifies the element within this container.

Definition at line 234 of file ProxyContainer.h.

234{ return m_container.container(); }

◆ index()

template<class Container, typename ElementIndexType, AccessPolicy accessPolicy = AccessPolicy::ReadOnly>
template<AccessPolicy ptrAccessPolicy = accessPolicy>
index_t Utils::ContainerProxyBase< Container, ElementIndexType, accessPolicy >::ElementProxyBase< ptrAccessPolicy >::index ( ) const
inline
Parameters
Returnthe "index" which identifies the element this proxy refers to within the container returned by container. This may or may not be the index which was used to create this proxy from the parent proxy i.e. in auto child_proxy=parent_proxy[index] it may be that child_proxy.index() != index. To recover "index" use auto index_recover = ParentProxy::getOriginalElementIndex(child_proxy);

Definition at line 230 of file ProxyContainer.h.

230{ return m_index; }

Member Data Documentation

◆ m_container

template<class Container, typename ElementIndexType, AccessPolicy accessPolicy = AccessPolicy::ReadOnly>
template<AccessPolicy ptrAccessPolicy = accessPolicy>
ContainerPtrBase<ptrAccessPolicy> Utils::ContainerProxyBase< Container, ElementIndexType, accessPolicy >::ElementProxyBase< ptrAccessPolicy >::m_container
protected

Definition at line 194 of file ProxyContainer.h.

◆ m_index

template<class Container, typename ElementIndexType, AccessPolicy accessPolicy = AccessPolicy::ReadOnly>
template<AccessPolicy ptrAccessPolicy = accessPolicy>
index_t Utils::ContainerProxyBase< Container, ElementIndexType, accessPolicy >::ElementProxyBase< ptrAccessPolicy >::m_index
protected

Definition at line 195 of file ProxyContainer.h.


The documentation for this struct was generated from the following file: