![]() |
ATLAS Offline Software
|
The proxy container object which provides the means to iterate over its elements and create element proxy objects @tparm Container The container type this proxy refers to e.g. More...
#include <ProxyContainer.h>
Public Types | |
| using | BASE = ContainerProxyBase<Container, typename ElementProxy::index_t> |
| using | ContainerNonConst = BASE::ContainerNonConst |
| using | value_type = ElementProxy |
| using | index_t = IndexType |
| using | element_index_t = typename ElementProxy::index_t |
| using | iterator = ProxyIterator<ContainerNonConst,T_Derived, ElementProxy> |
| using | const_iterator = ProxyIterator<const ContainerNonConst,T_Derived, ElementProxy> |
| using | ContainerPtr |
Public Member Functions | |
| ContainerProxy (ContainerNonConst *container) | |
| Create a root container proxy with read-write access to its elements where a root container proxy refers to the top node of a container hierarchy. | |
| ContainerProxy (const ContainerNonConst *container) | |
| Create a root container proxy with read-only access to its elements which is only possible if the container is not const this proxy permits non-const access to the container. | |
| ContainerProxy (ContainerNonConst *container, const index_t &index) | |
| Create a sub-container proxy with read-write access to its elements where a sub-container proxy is a container proxy which is an element of a parent container proxy. | |
| ContainerProxy (const ContainerNonConst *container, const index_t &index) | |
| Create a sub-container proxy with read-only access to its elements which is only possible if the container is const, this proxy will only allow const access to the container. | |
| template<typename T_RWProxy> requires (BASE::isConst && isConvertableToReadOnlyProxy<ContainerProxy<Container, T_Derived, ElementProxy, IndexType>, T_RWProxy> ) | |
| ContainerProxy (const T_RWProxy &other) | |
| Create a read only element proxy from a read write proxy. | |
| const index_t & | index () const |
| The index of this proxy container which identifies this proxy container within the parent container. | |
| element_index_t | computeChildElementIndex (const ElementProxy &element_proxy) const |
| Compute the "index" of the given element which can be used to recover this element via the access operator []. | |
| template<typename T_ElementProxy> requires ( hasCreateProxy<ElementProxy, const ContainerNonConst *, element_index_t> || hasCreateProxy<ElementProxy, ContainerNonConst *, element_index_t>) | |
| element_index_t | computeChildElementIndex (const T_ElementProxy &element_proxy) const |
| compute the "index" of the given element which can be used to recover this element via the access operator []. | |
| iterator | begin () |
| Get the begin iterator of this proxy container for read write element access provided the access policy permits it. | |
| iterator | end () |
| Get the end iterator of this proxy container for read write element access provided the access policy permits it. | |
| const_iterator | begin () const |
| Get the begin iterator of this proxy container for read only element access. | |
| const_iterator | end () const |
| Get the end iterator of this proxy container for read only element access. | |
| auto | operator[] (std::size_t element_count) const |
| Element access operator (read-only access) | |
| auto | operator[] (std::size_t element_count) |
| Element access operator (read-write access) | |
| auto | front () const |
| Get a proxy for the first child element (read-only) The operation is undefined if there are no child elements. | |
| auto | front () |
| Get a proxy for the first child element (read-write). | |
| auto | back () const |
| Get a proxy for the last child element (read-only). | |
| auto | back () |
| Get a proxy for the last child element (read-write). | |
| std::size_t | size () const |
| Default implementation to compute the number of elements this proxy container contains/refers to The default implementation simply computes the differences between the end index and begin index, thus the IndexType has to implement the subtraction operator. | |
| std::size_t | empty () const |
| Default implementation to test whether the container does not contain elements. | |
| const ContainerNonConst & | container () const |
| return a const pointer of the container which contains the elements this proxy refers to. | |
Static Public Member Functions | |
| static element_index_t | beginIndex (const ContainerNonConst *container, const index_t &this_index) |
| Default implementation to get the index of the first element of this proxy container For a full range container proxy e.g. | |
| static element_index_t | endIndex (const ContainerNonConst *container, const index_t &this_index) |
| Default implementation to get the index after the last element of this proxy container For a full range container proxy e.g. | |
| static element_index_t | nextElementIndex (const ContainerNonConst *container, element_index_t &&element_index) |
| static element_index_t | elementIndexAt (const ContainerNonConst *container, const index_t &this_index, std::size_t element_counter) |
| Default implementation to get the full index of a certain element. | |
Public Attributes | |
| index_t | m_index |
Static Public Attributes | |
| static constexpr bool | isConst |
Protected Member Functions | |
| const ContainerNonConst * | cptr () const |
| ContainerNonConst * | ptr () |
Protected Attributes | |
| ContainerPtr | m_container |
The proxy container object which provides the means to iterate over its elements and create element proxy objects @tparm Container The container type this proxy refers to e.g.
CellData, the proxy will not allow modifications if the contains is const. @tparm T_Derived The derived class of this proxy container class, which may have to define static methods to enable the iteration: element_index_t beginIndex(const container *, IndexType this_container_index); element_index_t endIndex(const container *, IndexType this_container_index); element_index_t nextIndex(const container *, element_index_t element_index);
| ElementProxy | The class to be used for element proxy objects, which can be a derived class of another ContainerProxy, or an ElementProxyBase |
| IndexType | The index type which is used to identify the element this container proxy refers to to if this container proxy is en element of a parent container proxy. The IndexType has to implement at least the equality operator. In most cases also a prefix increment operator is needed, which could also be implemented in the static method nextElementIndex of the parent container proxy. |
Definition at line 367 of file ProxyContainer.h.
| using Utils::ContainerProxy< Container, T_Derived, ElementProxy, IndexType >::BASE = ContainerProxyBase<Container, typename ElementProxy::index_t> |
Definition at line 369 of file ProxyContainer.h.
| using Utils::ContainerProxy< Container, T_Derived, ElementProxy, IndexType >::const_iterator = ProxyIterator<const ContainerNonConst,T_Derived, ElementProxy> |
Definition at line 410 of file ProxyContainer.h.
| using Utils::ContainerProxy< Container, T_Derived, ElementProxy, IndexType >::ContainerNonConst = BASE::ContainerNonConst |
Definition at line 370 of file ProxyContainer.h.
|
inherited |
Definition at line 178 of file ProxyContainer.h.
| using Utils::ContainerProxy< Container, T_Derived, ElementProxy, IndexType >::element_index_t = typename ElementProxy::index_t |
Definition at line 373 of file ProxyContainer.h.
| using Utils::ContainerProxy< Container, T_Derived, ElementProxy, IndexType >::index_t = IndexType |
Definition at line 372 of file ProxyContainer.h.
| using Utils::ContainerProxy< Container, T_Derived, ElementProxy, IndexType >::iterator = ProxyIterator<ContainerNonConst,T_Derived, ElementProxy> |
Definition at line 408 of file ProxyContainer.h.
| using Utils::ContainerProxy< Container, T_Derived, ElementProxy, IndexType >::value_type = ElementProxy |
Definition at line 371 of file ProxyContainer.h.
|
inline |
Create a root container proxy with read-write access to its elements where a root container proxy refers to the top node of a container hierarchy.
Definition at line 378 of file ProxyContainer.h.
|
inline |
Create a root container proxy with read-only access to its elements which is only possible if the container is not const this proxy permits non-const access to the container.
Definition at line 384 of file ProxyContainer.h.
|
inline |
Create a sub-container proxy with read-write access to its elements where a sub-container proxy is a container proxy which is an element of a parent container proxy.
Definition at line 391 of file ProxyContainer.h.
|
inline |
|
inline |
Create a read only element proxy from a read write proxy.
Definition at line 398 of file ProxyContainer.h.
|
inline |
Get a proxy for the last child element (read-write).
The operation is undefined if there are no child elements.
Definition at line 487 of file ProxyContainer.h.
|
inline |
Get a proxy for the last child element (read-only).
The operation is undefined if there are no child elements.
Definition at line 480 of file ProxyContainer.h.
|
inline |
Get the begin iterator of this proxy container for read write element access provided the access policy permits it.
Definition at line 437 of file ProxyContainer.h.
|
inline |
Get the begin iterator of this proxy container for read only element access.
Definition at line 446 of file ProxyContainer.h.
|
inlinestatic |
Default implementation to get the index of the first element of this proxy container For a full range container proxy e.g.
the root proxy container. this requires that the first element this proxy container refers to is identified by a simple integer index of 0u
Definition at line 498 of file ProxyContainer.h.
|
inline |
Compute the "index" of the given element which can be used to recover this element via the access operator [].
Definition at line 420 of file ProxyContainer.h.
|
inline |
compute the "index" of the given element which can be used to recover this element via the access operator [].
Definition at line 429 of file ProxyContainer.h.
|
inlineinherited |
return a const pointer of the container which contains the elements this proxy refers to.
Definition at line 190 of file ProxyContainer.h.
|
inlineprotectedinherited |
Definition at line 198 of file ProxyContainer.h.
|
inlinestatic |
Default implementation to get the full index of a certain element.
| container | The container which contains the element data, |
| this_index | The index of this proxy. |
| element_counter | the number of iterations from the first element to reach this element. |
Definition at line 526 of file ProxyContainer.h.
|
inline |
Default implementation to test whether the container does not contain elements.
The default implementation simply tests whether the begin and end index are identical.
Definition at line 543 of file ProxyContainer.h.
|
inline |
Get the end iterator of this proxy container for read write element access provided the access policy permits it.
Definition at line 441 of file ProxyContainer.h.
|
inline |
Get the end iterator of this proxy container for read only element access.
Definition at line 450 of file ProxyContainer.h.
|
inlinestatic |
Default implementation to get the index after the last element of this proxy container For a full range container proxy e.g.
the root proxy container. this requires that the last element this proxy container refers to is identified by a simple integer index which is provided by the size method of the container this proxy container refers to.
Definition at line 507 of file ProxyContainer.h.
|
inline |
Get a proxy for the first child element (read-write).
The operation is undefined if there are no child elements.
Definition at line 474 of file ProxyContainer.h.
|
inline |
Get a proxy for the first child element (read-only) The operation is undefined if there are no child elements.
Definition at line 469 of file ProxyContainer.h.
|
inline |
The index of this proxy container which identifies this proxy container within the parent container.
For the top-level proxy container the index will be the empty RootNodeIndex struct. The index is not necessarily an index that can be used as argument for the element access operator of the parent proxy to recover this proxy i.e. parent_proxy[index] is not necessarily this proxy. For the latter use computeChildElementIndex.
Definition at line 417 of file ProxyContainer.h.
|
inlinestatic |
Definition at line 515 of file ProxyContainer.h.
|
inline |
Element access operator (read-write access)
| element_count | is the "child_index", a consecutive number which is 0 for the first element and size()-1 for the last element |
Definition at line 463 of file ProxyContainer.h.
|
inline |
Element access operator (read-only access)
| element_count | is the "child_index", a consecutive number which is 0 for the first element and size()-1 for the last element |
Definition at line 457 of file ProxyContainer.h.
|
inlineprotectedinherited |
Definition at line 201 of file ProxyContainer.h.
|
inline |
Default implementation to compute the number of elements this proxy container contains/refers to The default implementation simply computes the differences between the end index and begin index, thus the IndexType has to implement the subtraction operator.
Definition at line 533 of file ProxyContainer.h.
|
staticconstexprinherited |
Definition at line 175 of file ProxyContainer.h.
|
protectedinherited |
Definition at line 205 of file ProxyContainer.h.
| index_t Utils::ContainerProxy< Container, T_Derived, ElementProxy, IndexType >::m_index |
Definition at line 374 of file ProxyContainer.h.