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

Base class of a container proxy. More...

#include <ProxyContainer.h>

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

Classes

struct  ContainerPtrBase
struct  ElementProxyBase

Public Types

using element_index_t = ElementIndexType
using ContainerPtr = ContainerPtrBase<AccessPolicy::ReadWrite>
using ConstContainerPtr = ContainerPtrBase<AccessPolicy::ReadOnly>

Public Member Functions

 ContainerProxyBase (const Container *container)
 ContainerProxyBase (Container *container)
const Containercontainer () const
 return a const pointer of the container which contains the elements this proxy refers to.
Containercontainer ()
 Return a non const pointer of the container which contains the elements this proxy refers to provided the access policy permits read-write access.

Public Attributes

ContainerPtrBase< accessPolicy > m_container

Detailed Description

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

Base class of a container proxy.

Template Parameters
Containerthe container type this proxy refers to e.g. CellData
ElementIndexTypethe index type to refer to an element of the container proxy e.g. unsigned int, but it could be an object with associated data e.g. an index to the parent element or on index offset for its child elements The base class provides an access controlled pointer to the container this proxy is referring to.

Definition at line 98 of file ProxyContainer.h.

Member Typedef Documentation

◆ ConstContainerPtr

template<class Container, typename ElementIndexType, AccessPolicy accessPolicy = AccessPolicy::ReadOnly>
using Utils::ContainerProxyBase< Container, ElementIndexType, accessPolicy >::ConstContainerPtr = ContainerPtrBase<AccessPolicy::ReadOnly>

Definition at line 181 of file ProxyContainer.h.

◆ ContainerPtr

template<class Container, typename ElementIndexType, AccessPolicy accessPolicy = AccessPolicy::ReadOnly>
using Utils::ContainerProxyBase< Container, ElementIndexType, accessPolicy >::ContainerPtr = ContainerPtrBase<AccessPolicy::ReadWrite>

Definition at line 180 of file ProxyContainer.h.

◆ element_index_t

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

Definition at line 99 of file ProxyContainer.h.

Constructor & Destructor Documentation

◆ ContainerProxyBase() [1/2]

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

Definition at line 184 of file ProxyContainer.h.

184: m_container(container) {} // creates a proxy which provides read-only access to its elements
const Container & container() const
return a const pointer of the container which contains the elements this proxy refers to.
ContainerPtrBase< accessPolicy > m_container

◆ ContainerProxyBase() [2/2]

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

Definition at line 185 of file ProxyContainer.h.

185: m_container(container) {} // creates a proxy which provides read-write access to its elements

Member Function Documentation

◆ container() [1/2]

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

Return a non const pointer of the container which contains the elements this proxy refers to provided the access policy permits read-write access.

Definition at line 244 of file ProxyContainer.h.

244{ return m_container.container(); }

◆ container() [2/2]

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

return a const pointer of the container which contains the elements this proxy refers to.

Definition at line 241 of file ProxyContainer.h.

241{ return m_container.container(); }

Member Data Documentation

◆ m_container

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

Definition at line 182 of file ProxyContainer.h.


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