Go to the documentation of this file.
26 #include "spdlog/fmt/ostr.h"
27 #include "spdlog/spdlog.h"
46 #define AD_MAP_ACCESS_PARTITIONID_THROWS_EXCEPTION 1
48 #if SAFE_DATATYPES_EXPLICIT_CONVERSION
52 #define _AD_MAP_ACCESS_PARTITIONID_EXPLICIT_CONVERSION_ explicit
57 #define _AD_MAP_ACCESS_PARTITIONID_EXPLICIT_CONVERSION_
86 : mPartitionId(std::numeric_limits<uint64_t>::quiet_NaN())
96 : mPartitionId(iPartitionId)
139 return mPartitionId == other.mPartitionId;
167 return (mPartitionId > other.mPartitionId) &&
operator!=(other);
183 return (mPartitionId < other.mPartitionId) &&
operator!=(other);
199 return ((mPartitionId > other.mPartitionId) ||
operator==(other));
215 return ((mPartitionId < other.mPartitionId) ||
operator==(other));
232 PartitionId const result(mPartitionId + other.mPartitionId);
251 mPartitionId += other.mPartitionId;
270 PartitionId const result(mPartitionId - other.mPartitionId);
289 mPartitionId -= other.mPartitionId;
314 auto const valueClass = std::fpclassify(mPartitionId);
315 return ((valueClass == FP_NORMAL) || (valueClass == FP_ZERO)) && (
cMinValue <= mPartitionId)
329 spdlog::info(
"ensureValid(::ad::map::access::PartitionId)>> {} value out of range", *
this);
330 #if (AD_MAP_ACCESS_PARTITIONID_THROWS_EXCEPTION == 1)
331 throw std::out_of_range(
"PartitionId value out of range");
347 spdlog::info(
"ensureValid(::ad::map::access::PartitionId)>> {} value is zero", *
this);
348 #if (AD_MAP_ACCESS_PARTITIONID_THROWS_EXCEPTION == 1)
349 throw std::out_of_range(
"PartitionId value is zero");
374 uint64_t mPartitionId;
399 static inline ::ad::map::access::PartitionId
lowest()
401 return ::ad::map::access::PartitionId::getMin();
406 static inline ::ad::map::access::PartitionId
max()
408 return ::ad::map::access::PartitionId::getMax();
414 static inline ::ad::map::access::PartitionId
epsilon()
416 return ::ad::map::access::PartitionId(0);
425 #ifndef GEN_GUARD_AD_MAP_ACCESS_PARTITIONID
426 #define GEN_GUARD_AD_MAP_ACCESS_PARTITIONID
453 return os << uint64_t(_value);
466 return to_string(
static_cast<uint64_t
>(value));
469 #endif // GEN_GUARD_AD_MAP_ACCESS_PARTITIONID
namespace ad
Definition: GeometryStoreItem.hpp:28
PartitionId operator-=(const PartitionId &other)
standard arithmetic operator
Definition: PartitionId.hpp:285
static PartitionId getMin()
get minimum valid PartitionId (i.e. cMinValue)
Definition: PartitionId.hpp:357
void ensureValid() const
ensure that the PartitionId is valid
Definition: PartitionId.hpp:325
static inline ::ad::map::access::PartitionId lowest()
Definition: PartitionId.hpp:399
bool operator<(const PartitionId &other) const
standard comparison operator
Definition: PartitionId.hpp:179
bool operator>(const PartitionId &other) const
standard comparison operator
Definition: PartitionId.hpp:163
static const uint64_t cMinValue
constant defining the minimum valid PartitionId value (used in isValid())
Definition: PartitionId.hpp:72
PartitionId & operator+=(const PartitionId &other)
standard arithmetic operator
Definition: PartitionId.hpp:247
PartitionId operator-(const PartitionId &other) const
standard arithmetic operator
Definition: PartitionId.hpp:266
bool operator!=(const PartitionId &other) const
standard comparison operator
Definition: PartitionId.hpp:149
#define _AD_MAP_ACCESS_PARTITIONID_EXPLICIT_CONVERSION_
Enable/Disable explicit conversion. Currently set to "implicit conversion allowed".
Definition: PartitionId.hpp:57
std::string to_string(::ad::map::access::GeometryStoreItem const &value)
overload of the std::to_string for GeometryStoreItem
Definition: GeometryStoreItem.hpp:183
static inline ::ad::map::access::PartitionId epsilon()
Definition: PartitionId.hpp:414
static const uint64_t cMaxValue
constant defining the maximum valid PartitionId value (used in isValid())
Definition: PartitionId.hpp:77
PartitionId()
default constructor
Definition: PartitionId.hpp:85
bool operator>=(const PartitionId &other) const
standard comparison operator
Definition: PartitionId.hpp:195
DataType PartitionId.
Definition: PartitionId.hpp:66
_AD_MAP_ACCESS_PARTITIONID_EXPLICIT_CONVERSION_ PartitionId(uint64_t const iPartitionId)
standard constructor
Definition: PartitionId.hpp:95
bool operator==(const PartitionId &other) const
standard comparison operator
Definition: PartitionId.hpp:135
bool operator<=(const PartitionId &other) const
standard comparison operator
Definition: PartitionId.hpp:211
PartitionId & operator=(const PartitionId &other)=default
standard assignment operator
bool isValid() const
Definition: PartitionId.hpp:312
static PartitionId getMax()
get maximum valid PartitionId (i.e. cMaxValue)
Definition: PartitionId.hpp:365
std::ostream & operator<<(std::ostream &os, GeometryStoreItem const &_value)
standard ostream operator
Definition: GeometryStoreItem.hpp:157
PartitionId operator+(const PartitionId &other) const
standard arithmetic operator
Definition: PartitionId.hpp:228
static inline ::ad::map::access::PartitionId max()
Definition: PartitionId.hpp:406
void ensureValidNonZero() const
ensure that the PartitionId is valid and non zero
Definition: PartitionId.hpp:342