The data type to uniquely identify a cryostat. More...
#include <geo_types.h>
Public Types | |
using | CryostatID_t = unsigned int |
Type for the ID number. More... | |
using | ThisID_t = CryostatID |
Type of this ID. More... | |
using | ParentID_t = void |
Type of the parent ID (none!). More... | |
template<std::size_t L> | |
using | ID_t = details::AbsIDtype< L, ThisID_t > |
Type of the ID with the specified level L . More... | |
template<std::size_t A> | |
using | UpperID_t = details::RelIDtype< A, ThisID_t > |
Type of the ID A levels above this one. More... | |
Public Member Functions | |
constexpr | CryostatID ()=default |
Default constructor: an invalid cryostat. More... | |
constexpr | CryostatID (CryostatID_t c) |
Constructor: valid ID of cryostat with index c. More... | |
constexpr | CryostatID (CryostatID_t c, bool valid) |
Constructor: valid ID of cryostat with index c. More... | |
constexpr auto const & | deepestIndex () const |
Returns the value of the deepest ID available (cryostat's). More... | |
auto & | deepestIndex () |
Returns the deepest ID available (cryostat's). More... | |
constexpr ParentID_t | parentID () const |
Return the parent ID of this one (void). More... | |
ParentID_t | parentID () |
Return the parent ID of this one (void). More... | |
template<std::size_t Index = 0U> | |
constexpr auto | getIndex () const |
Returns the index level Index of this type. More... | |
template<std::size_t Index = 0U> | |
auto & | writeIndex () |
Returns the index level Index of this type. More... | |
template<std::size_t Above> | |
constexpr auto | getRelIndex () const |
Returns the index Above levels higher than Level . More... | |
constexpr int | cmp (CryostatID const &other) const |
Returns < 0 if this is smaller than other, 0 if equal, > 0 if larger. More... | |
constexpr CryostatID const & | asCryostatID () const |
Conversion to CryostatID (for convenience of notation). More... | |
CryostatID & | asCryostatID () |
Conversion to CryostatID (for convenience of notation). More... | |
constexpr CryostatID const & | asConstCryostatID () |
Conversion to CryostatID (for convenience of notation). More... | |
ID validity | |
constexpr | operator bool () const |
Returns true if the ID is valid. More... | |
constexpr bool | operator! () const |
Returns true if the ID is not valid. More... | |
void | setValidity (bool valid) |
Sets the validity of the ID. More... | |
void | markValid () |
Sets the ID as valid. More... | |
void | markInvalid () |
Sets the ID as invalid. More... | |
std::string | toString () const |
Human-readable representation of the cryostat ID. More... | |
operator std::string () const | |
Static Public Member Functions | |
static constexpr CryostatID_t | getInvalidID () |
Return the value of the invalid ID as a r-value. More... | |
template<typename T > | |
static constexpr int | ThreeWayComparison (T a, T b) |
Returns < 0 if a < b, 0 if a == b, > 0 if a > b. More... | |
Public Attributes | |
bool | isValid = false |
Whether this ID points to a valid element. More... | |
CryostatID_t | Cryostat = InvalidID |
Index of cryostat. More... | |
Static Public Attributes | |
static constexpr CryostatID_t | InvalidID = std::numeric_limits<CryostatID_t>::max() |
Special code for an invalid ID. More... | |
static constexpr auto | Level = geo::ElementLevel::Cryostat |
Level of this element. More... | |
The data type to uniquely identify a cryostat.
Definition at line 190 of file geo_types.h.
using geo::CryostatID::CryostatID_t = unsigned int |
Type for the ID number.
Definition at line 191 of file geo_types.h.
using geo::CryostatID::ID_t = details::AbsIDtype<L, ThisID_t> |
Type of the ID with the specified level L
.
Definition at line 198 of file geo_types.h.
using geo::CryostatID::ParentID_t = void |
Type of the parent ID (none!).
Definition at line 194 of file geo_types.h.
using geo::CryostatID::ThisID_t = CryostatID |
Type of this ID.
Definition at line 193 of file geo_types.h.
using geo::CryostatID::UpperID_t = details::RelIDtype<A, ThisID_t> |
Type of the ID A
levels above this one.
Definition at line 202 of file geo_types.h.
|
default |
Default constructor: an invalid cryostat.
|
inlineexplicit |
Constructor: valid ID of cryostat with index c.
Definition at line 218 of file geo_types.h.
|
inline |
Constructor: valid ID of cryostat with index c.
Definition at line 221 of file geo_types.h.
|
inline |
Conversion to CryostatID (for convenience of notation).
Definition at line 279 of file geo_types.h.
|
inline |
Conversion to CryostatID (for convenience of notation).
Definition at line 275 of file geo_types.h.
|
inline |
Conversion to CryostatID (for convenience of notation).
Definition at line 277 of file geo_types.h.
|
inline |
Returns < 0 if this is smaller than other, 0 if equal, > 0 if larger.
Definition at line 271 of file geo_types.h.
|
inline |
Returns the value of the deepest ID available (cryostat's).
Definition at line 253 of file geo_types.h.
|
inline |
constexpr auto geo::CryostatID::getIndex | ( | ) | const |
|
inlinestatic |
Return the value of the invalid ID as a r-value.
Definition at line 285 of file geo_types.h.
constexpr auto geo::CryostatID::getRelIndex | ( | ) | const |
Returns the index Above
levels higher than Level
.
Definition at line 895 of file geo_types.h.
|
inline |
Sets the ID as invalid.
Definition at line 240 of file geo_types.h.
|
inline |
Sets the ID as valid.
Definition at line 237 of file geo_types.h.
|
inlineexplicit |
Returns true if the ID is valid.
Definition at line 228 of file geo_types.h.
|
inlineexplicit |
Definition at line 248 of file geo_types.h.
|
inline |
Returns true if the ID is not valid.
Definition at line 231 of file geo_types.h.
|
inline |
|
inline |
|
inline |
Sets the validity of the ID.
Definition at line 234 of file geo_types.h.
|
inlinestatic |
|
inline |
Human-readable representation of the cryostat ID.
Definition at line 247 of file geo_types.h.
auto & geo::CryostatID::writeIndex | ( | ) |
CryostatID_t geo::CryostatID::Cryostat = InvalidID |
Index of cryostat.
Definition at line 212 of file geo_types.h.
|
static |
Special code for an invalid ID.
Definition at line 208 of file geo_types.h.
bool geo::CryostatID::isValid = false |
Whether this ID points to a valid element.
Definition at line 211 of file geo_types.h.
|
static |
Level of this element.
Definition at line 282 of file geo_types.h.