![]() |
ATLAS Offline Software
|
Helper class to keep track of a range of elements added to the end of a container. More...
#include <ContainerRangeGuard.h>
Public Member Functions | |
| ContainerRangeGuard (T_ContainerPtr ptr) | |
| T_RangeType | range () const |
| create a range for the elements added to the container since the guard was created. | |
| std::size_t | startIndex () const |
| T_ContainerPtr & | ptr () |
| return the pointer to the container which contains the element range of this range guard | |
| const T_ContainerPtr & | ptr () const |
| return the pointer to the container which contains the element range of this range guard (read only) | |
| bool | empty () const |
| return true if no elements have been added to the container since the construction of this guard. | |
Private Attributes | |
| T_ContainerPtr | m_ptr |
| std::size_t | m_startIndex |
Helper class to keep track of a range of elements added to the end of a container.
The element range is defined by the size of the container when this guard is constructed and the size of the container when the range is requested. The container may additionally be identified by an id in the container collection Usage: <verbatim> ContainerRangeGuard<DataRange, ContainerPtr> range_guard(container_ptr); for (const auto input : input_container) { /*... add elements to container_ptr e.g. addDataForModule(container_collection, range_guard, ... ); / } if (!range_guard.empty()) { / ... register range ... */ } </verbatim>
Definition at line 32 of file ContainerRangeGuard.h.
|
inline |
Definition at line 34 of file ContainerRangeGuard.h.
|
inline |
return true if no elements have been added to the container since the construction of this guard.
Definition at line 57 of file ContainerRangeGuard.h.
|
inline |
return the pointer to the container which contains the element range of this range guard
Definition at line 48 of file ContainerRangeGuard.h.
|
inline |
return the pointer to the container which contains the element range of this range guard (read only)
Definition at line 52 of file ContainerRangeGuard.h.
|
inline |
create a range for the elements added to the container since the guard was created.
Definition at line 36 of file ContainerRangeGuard.h.
|
inline |
Definition at line 44 of file ContainerRangeGuard.h.
|
private |
Definition at line 61 of file ContainerRangeGuard.h.
|
private |
Definition at line 62 of file ContainerRangeGuard.h.