![]() |
LArSoft
v10_04_05
Liquid Argon Software toolkit - https://larsoft.org/
|
#include "GeometryDataContainers.h"
Public Types | |
using | index_type = size_type |
Type used internally (so far) for indexing. More... | |
STL container types. | |
using | value_type = typename Container_t::value_type |
using | reference = typename Container_t::reference |
using | const_reference = typename Container_t::const_reference |
using | pointer = typename Container_t::pointer |
using | const_pointer = typename Container_t::const_pointer |
using | iterator = typename Container_t::iterator |
using | const_iterator = typename Container_t::const_iterator |
using | reverse_iterator = typename Container_t::reverse_iterator |
using | const_reverse_iterator = typename Container_t::const_reverse_iterator |
using | difference_type = typename Container_t::difference_type |
using | size_type = typename Container_t::size_type |
Public Member Functions | |
GeoContainerData ()=default | |
Default constructor with empty container. Good for nothing. More... | |
GeoContainerData (size_type size) | |
Prepares the container with default-constructed data. More... | |
GeoContainerData (size_type size, value_type const &defValue) | |
Container status query | |
size_type | size () const |
Returns the number of elements in the container. More... | |
size_type | capacity () const |
Returns the number of elements the container has memory for. More... | |
bool | empty () const |
Returns whether the container has no elements (false by assumptions). More... | |
Data modification | |
In general, each single element can be accessed and changed. In addition, this section includes methods acting on multiple elements at once. | |
void | fill (value_type value) |
Sets all elements to the specified value (copied). More... | |
void | reset () |
Sets all the elements to a default-constructed value_type . More... | |
template<typename Op > | |
Op | apply (Op &&op) |
Applies an operation on all elements. More... | |
template<typename Op > | |
Op | apply (Op &&op) const |
Applies an operation on all elements. More... | |
Container modification | |
void | resize (size_type size) |
Prepares the container with default-constructed data. More... | |
void | resize (size_type size, value_type const &defValue) |
Prepares the container with copies of the specified default value. More... | |
void | clear () |
Makes the container empty, with no usable storage space. More... | |
Element access | |
reference | operator[] (index_type index) |
Returns the element for the specified index. More... | |
const_reference | operator[] (index_type index) const |
Returns the element for the specified index (read-only). More... | |
Iterators | |
iterator | begin () |
iterator | end () |
const_iterator | begin () const |
const_iterator | end () const |
const_iterator | cbegin () const |
const_iterator | cend () const |
reverse_iterator | rbegin () |
reverse_iterator | rend () |
const_reverse_iterator | rbegin () const |
const_reverse_iterator | rend () const |
const_reverse_iterator | crbegin () const |
const_reverse_iterator | crend () const |
Static Public Member Functions | |
template<typename Value , typename Upper > | |
static bool | bounded (Value v, Upper upper) |
Returns whether the specified value is between 0 and the upper limit. More... | |
Private Types | |
using | Container_t = std::vector< T > |
Private Attributes | |
Container_t | fData |
Data storage area. More... | |
Definition at line 44 of file GeometryDataContainers.h.
using geo::details::GeoContainerData< T >::const_iterator = typename Container_t::const_iterator |
Definition at line 962 of file GeometryDataContainers.h.
using geo::details::GeoContainerData< T >::const_pointer = typename Container_t::const_pointer |
Definition at line 960 of file GeometryDataContainers.h.
using geo::details::GeoContainerData< T >::const_reference = typename Container_t::const_reference |
Definition at line 958 of file GeometryDataContainers.h.
using geo::details::GeoContainerData< T >::const_reverse_iterator = typename Container_t::const_reverse_iterator |
Definition at line 964 of file GeometryDataContainers.h.
|
private |
Definition at line 949 of file GeometryDataContainers.h.
using geo::details::GeoContainerData< T >::difference_type = typename Container_t::difference_type |
Definition at line 965 of file GeometryDataContainers.h.
using geo::details::GeoContainerData< T >::index_type = size_type |
Type used internally (so far) for indexing.
Definition at line 971 of file GeometryDataContainers.h.
using geo::details::GeoContainerData< T >::iterator = typename Container_t::iterator |
Definition at line 961 of file GeometryDataContainers.h.
using geo::details::GeoContainerData< T >::pointer = typename Container_t::pointer |
Definition at line 959 of file GeometryDataContainers.h.
using geo::details::GeoContainerData< T >::reference = typename Container_t::reference |
Definition at line 957 of file GeometryDataContainers.h.
using geo::details::GeoContainerData< T >::reverse_iterator = typename Container_t::reverse_iterator |
Definition at line 963 of file GeometryDataContainers.h.
using geo::details::GeoContainerData< T >::size_type = typename Container_t::size_type |
Definition at line 966 of file GeometryDataContainers.h.
using geo::details::GeoContainerData< T >::value_type = typename Container_t::value_type |
Definition at line 956 of file GeometryDataContainers.h.
|
default |
Default constructor with empty container. Good for nothing.
|
inline |
Prepares the container with default-constructed data.
Definition at line 979 of file GeometryDataContainers.h.
|
inline |
Definition at line 982 of file GeometryDataContainers.h.
|
inline |
Applies an operation on all elements.
Op | type of operation |
op | Operation |
The operation op
is a unary functor, i.e. an object that supports the call to op(value_type&)
.
The return values of op
calls are discarded.
Definition at line 1030 of file GeometryDataContainers.h.
Referenced by geo::GeoIDdataContainer< T, Mapper >::apply(), and geo::GeoIDdataContainer< T, Mapper >::clear().
|
inline |
Applies an operation on all elements.
Op | type of operation |
op | Operation |
The operation op
is a unary functor, i.e. an object that supports the call to op(value_type const&)
.
The return values of op
calls are discarded.
Definition at line 1049 of file GeometryDataContainers.h.
|
inline |
Definition at line 1114 of file GeometryDataContainers.h.
Referenced by geo::GeoIDdataContainer< T, Mapper >::begin(), and geo::GeoIDdataContainer< T, Mapper >::end().
|
inline |
Definition at line 1116 of file GeometryDataContainers.h.
|
inlinestatic |
Returns whether the specified value is between 0
and the upper limit.
Definition at line 1133 of file GeometryDataContainers.h.
|
inline |
Returns the number of elements the container has memory for.
Definition at line 994 of file GeometryDataContainers.h.
Referenced by geo::GeoIDdataContainer< T, Mapper >::capacity().
|
inline |
Definition at line 1118 of file GeometryDataContainers.h.
|
inline |
Definition at line 1119 of file GeometryDataContainers.h.
|
inline |
Makes the container empty, with no usable storage space.
resize()
The container needs to be resized before it is useful again.
Definition at line 1092 of file GeometryDataContainers.h.
Referenced by geo::GeoIDdataContainer< T, Mapper >::clear().
|
inline |
Definition at line 1125 of file GeometryDataContainers.h.
|
inline |
Definition at line 1126 of file GeometryDataContainers.h.
|
inline |
Returns whether the container has no elements (false
by assumptions).
Definition at line 997 of file GeometryDataContainers.h.
Referenced by geo::GeoIDdataContainer< T, Mapper >::empty(), and geo::GeoIDdataContainer< T, Mapper >::GeoIDdataContainer().
|
inline |
Definition at line 1115 of file GeometryDataContainers.h.
Referenced by geo::GeoIDdataContainer< T, Mapper >::end().
|
inline |
Definition at line 1117 of file GeometryDataContainers.h.
|
inline |
Sets all elements to the specified value
(copied).
Definition at line 1013 of file GeometryDataContainers.h.
References trkf::fill(), and value.
Referenced by geo::GeoIDdataContainer< T, Mapper >::fill().
|
inline |
Returns the element for the specified index.
Definition at line 1102 of file GeometryDataContainers.h.
|
inline |
Returns the element for the specified index (read-only).
Definition at line 1105 of file GeometryDataContainers.h.
|
inline |
Definition at line 1121 of file GeometryDataContainers.h.
|
inline |
Definition at line 1123 of file GeometryDataContainers.h.
|
inline |
Definition at line 1122 of file GeometryDataContainers.h.
|
inline |
Definition at line 1124 of file GeometryDataContainers.h.
|
inline |
Sets all the elements to a default-constructed value_type
.
Definition at line 1016 of file GeometryDataContainers.h.
References trkf::fill().
Referenced by geo::GeoIDdataContainer< T, Mapper >::reset().
|
inline |
Prepares the container with default-constructed data.
size | number of elements in the container |
The container is sized to host data for all the elements. Each new element in the container is default-constructed. Existing data is not touched.
Definition at line 1072 of file GeometryDataContainers.h.
Referenced by geo::GeoIDdataContainer< T, Mapper >::resize(), and geo::GeoIDdataContainer< T, Mapper >::resizeAs().
|
inline |
Prepares the container with copies of the specified default value.
size | number of elements in the container |
defValue | the value copied to fill all entries in the container |
The container is sized to host data for all the elements. Each new element in the container is constructed as copy of defValue
. Existing data is not touched.
Definition at line 1084 of file GeometryDataContainers.h.
|
inline |
Returns the number of elements in the container.
Definition at line 991 of file GeometryDataContainers.h.
Referenced by geo::GeoIDdataContainer< T, Mapper >::size().
|
private |
Data storage area.
Definition at line 1139 of file GeometryDataContainers.h.