Base forward iterator browsing all cryostat IDs in the detector. More...
#include <GeometryCore.h>
Public Types | |
using | ElementPtr_t = geo::CryostatGeo const * |
using | GeoID_t = GEOID |
type of the actual ID stored in the iterator More... | |
using | iterator = cryostat_id_iterator_base< GeoID_t > |
this iterator More... | |
using | LocalID_t = geo::CryostatID |
type of the ID we change More... | |
Iterator traits | |
using | difference_type = std::ptrdiff_t |
using | value_type = LocalID_t |
using | reference = value_type const & |
using | pointer = value_type const * |
using | iterator_category = std::input_iterator_tag |
Public Member Functions | |
cryostat_id_iterator_base () | |
Default constructor; effect not defined: assign to it before using! More... | |
cryostat_id_iterator_base (geo::GeometryCore const *geom) | |
Constructor: points to begin. More... | |
cryostat_id_iterator_base (geo::GeometryCore const *geom, GeoID_t const &start_from) | |
Constructor: points to the specified cryostat. More... | |
cryostat_id_iterator_base (geo::GeometryCore const *geom, BeginPos_t const) | |
Constructor: points to begin. More... | |
cryostat_id_iterator_base (geo::GeometryCore const *geom, EndPos_t) | |
Constructor: points to end. More... | |
template<typename OTHERID > | |
bool | operator== (cryostat_id_iterator_base< OTHERID > const &as) const |
Returns true if the two iterators point to the same cryostat. More... | |
template<typename OTHERID > | |
bool | operator!= (cryostat_id_iterator_base< OTHERID > const &as) const |
Returns true if the two iterators point to different cryostats. More... | |
reference | operator* () const |
Returns the ID the iterator points to. More... | |
pointer | operator-> () const |
Returns a pointer to the ID the iterator points to. More... | |
iterator & | operator++ () |
Prefix increment: returns this iterator pointing to the next cryostat. More... | |
iterator | operator++ (int) |
Postfix increment: returns the current iterator, then increments it. More... | |
operator bool () const | |
Returns whether the iterator is pointing to a valid cryostat. More... | |
ElementPtr_t | get () const |
Returns a pointer to cryostat, or nullptr if invalid. More... | |
Public Member Functions inherited from geo::details::geometry_iterator_base | |
geometry_iterator_base (geo::GeometryCore const *geom) | |
Constructor: associates with the specified geometry. More... | |
Protected Types | |
using | ID_t = typename LocalID_t::CryostatID_t |
Protected Member Functions | |
cryostat_id_iterator_base (geo::GeometryCore const *geom, UndefinedPos_t) | |
Constructor: does not set the current ID. More... | |
void | next () |
Skips to the next cryostat. More... | |
bool | at_end () const |
Returns whether this iterator has reached the end. More... | |
GeoID_t const & | ID () const |
Returns the actual type of ID we store. More... | |
GeoID_t & | ID () |
Protected Member Functions inherited from geo::details::geometry_iterator_base | |
geo::GeometryCore const * | geometry () const |
Returns a pointer to the geometry. More... | |
geometry_iterator_base () | |
Default constructor; do not use a default-constructed iterator as-is! More... | |
Private Member Functions | |
void | set_local_limits () |
Sets the limit member to the past-the-end cryostat number. More... | |
void | set_begin () |
Sets the iterator to the begin position. More... | |
void | set_end () |
Sets the iterator to the end position. More... | |
LocalID_t const & | localID () const |
Returns the type of ID we act on. More... | |
LocalID_t & | localID () |
ID_t const & | local_index () const |
Returns the index (part if the ID) this iterator runs on. More... | |
ID_t & | local_index () |
Private Attributes | |
GeoID_t | id |
ID of the current cryostat. More... | |
ID_t | limit = LocalID_t::InvalidID |
maximum number of cryostats More... | |
Additional Inherited Members | |
Static Public Attributes inherited from geo::details::geometry_iterator_types | |
static constexpr BeginPos_t | begin_pos = {} |
static constexpr EndPos_t | end_pos = {} |
static constexpr UndefinedPos_t | undefined_pos = {} |
Base forward iterator browsing all cryostat IDs in the detector.
GEOID | ID type to be used |
This iterator assumes that GEOID is derived from geo::CryostatID. Note that no polymorphic behaviour is required, or expected, from GEOID.
This iterator is designed to carry on, untouched, anything else that the GEOID type defines beyond the required CryostatID data.
Currently, backward iterations are not supported.
Definition at line 148 of file GeometryCore.h.
using geo::details::cryostat_id_iterator_base< GEOID >::difference_type = std::ptrdiff_t |
Definition at line 164 of file GeometryCore.h.
using geo::details::cryostat_id_iterator_base< GEOID >::ElementPtr_t = geo::CryostatGeo const* |
Definition at line 152 of file GeometryCore.h.
using geo::details::cryostat_id_iterator_base< GEOID >::GeoID_t = GEOID |
type of the actual ID stored in the iterator
Definition at line 153 of file GeometryCore.h.
|
protected |
Definition at line 226 of file GeometryCore.h.
using geo::details::cryostat_id_iterator_base< GEOID >::iterator = cryostat_id_iterator_base<GeoID_t> |
this iterator
Definition at line 155 of file GeometryCore.h.
using geo::details::cryostat_id_iterator_base< GEOID >::iterator_category = std::input_iterator_tag |
Definition at line 168 of file GeometryCore.h.
using geo::details::cryostat_id_iterator_base< GEOID >::LocalID_t = geo::CryostatID |
type of the ID we change
Definition at line 157 of file GeometryCore.h.
using geo::details::cryostat_id_iterator_base< GEOID >::pointer = value_type const* |
Definition at line 167 of file GeometryCore.h.
using geo::details::cryostat_id_iterator_base< GEOID >::reference = value_type const& |
Definition at line 166 of file GeometryCore.h.
using geo::details::cryostat_id_iterator_base< GEOID >::value_type = LocalID_t |
Definition at line 165 of file GeometryCore.h.
|
inline |
Default constructor; effect not defined: assign to it before using!
Definition at line 173 of file GeometryCore.h.
|
inline |
Constructor: points to begin.
Definition at line 176 of file GeometryCore.h.
|
inline |
Constructor: points to the specified cryostat.
Definition at line 181 of file GeometryCore.h.
|
inline |
Constructor: points to begin.
Definition at line 187 of file GeometryCore.h.
|
inline |
Constructor: points to end.
Definition at line 192 of file GeometryCore.h.
|
inlineprotected |
Constructor: does not set the current ID.
Definition at line 229 of file GeometryCore.h.
|
inlineprotected |
Returns whether this iterator has reached the end.
Definition at line 243 of file GeometryCore.h.
|
inline |
Returns a pointer to cryostat, or nullptr if invalid.
Definition at line 5838 of file GeometryCore.h.
|
inlineprotected |
Returns the actual type of ID we store.
Definition at line 235 of file GeometryCore.h.
|
inlineprotected |
Definition at line 236 of file GeometryCore.h.
|
inlineprivate |
Returns the index (part if the ID) this iterator runs on.
Definition at line 267 of file GeometryCore.h.
|
inlineprivate |
Definition at line 268 of file GeometryCore.h.
|
inlineprivate |
Returns the type of ID we act on.
Definition at line 260 of file GeometryCore.h.
|
inlineprivate |
Definition at line 262 of file GeometryCore.h.
|
protected |
Skips to the next cryostat.
Definition at line 5855 of file GeometryCore.h.
|
inline |
Returns whether the iterator is pointing to a valid cryostat.
Definition at line 5834 of file GeometryCore.h.
|
inline |
Returns true if the two iterators point to different cryostats.
Definition at line 204 of file GeometryCore.h.
|
inline |
Returns the ID the iterator points to.
Definition at line 208 of file GeometryCore.h.
|
inline |
Prefix increment: returns this iterator pointing to the next cryostat.
Definition at line 214 of file GeometryCore.h.
|
inline |
Postfix increment: returns the current iterator, then increments it.
Definition at line 217 of file GeometryCore.h.
|
inline |
Returns a pointer to the ID the iterator points to.
Definition at line 211 of file GeometryCore.h.
|
inline |
Returns true if the two iterators point to the same cryostat.
Definition at line 199 of file GeometryCore.h.
|
inlineprivate |
Sets the iterator to the begin position.
Definition at line 5847 of file GeometryCore.h.
|
inlineprivate |
Sets the iterator to the end position.
Definition at line 5851 of file GeometryCore.h.
|
inlineprivate |
Sets the limit member to the past-the-end cryostat number.
Definition at line 5843 of file GeometryCore.h.
|
private |
ID of the current cryostat.
Definition at line 246 of file GeometryCore.h.
|
private |
maximum number of cryostats
Definition at line 247 of file GeometryCore.h.