ad_map_access
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
ad::map::access::PartitionId Class Reference

DataType PartitionId. More...

#include <ad/map/access/PartitionId.hpp>

Public Member Functions

 PartitionId ()
 default constructor More...
 
_AD_MAP_ACCESS_PARTITIONID_EXPLICIT_CONVERSION_ PartitionId (uint64_t const iPartitionId)
 standard constructor More...
 
 PartitionId (const PartitionId &other)=default
 standard copy constructor
 
 PartitionId (PartitionId &&other)=default
 standard move constructor
 
PartitionIdoperator= (const PartitionId &other)=default
 standard assignment operator More...
 
PartitionIdoperator= (PartitionId &&other)=default
 standard move operator More...
 
bool operator== (const PartitionId &other) const
 standard comparison operator More...
 
bool operator!= (const PartitionId &other) const
 standard comparison operator More...
 
bool operator> (const PartitionId &other) const
 standard comparison operator More...
 
bool operator< (const PartitionId &other) const
 standard comparison operator More...
 
bool operator>= (const PartitionId &other) const
 standard comparison operator More...
 
bool operator<= (const PartitionId &other) const
 standard comparison operator More...
 
PartitionId operator+ (const PartitionId &other) const
 standard arithmetic operator More...
 
PartitionIdoperator+= (const PartitionId &other)
 standard arithmetic operator More...
 
PartitionId operator- (const PartitionId &other) const
 standard arithmetic operator More...
 
PartitionId operator-= (const PartitionId &other)
 standard arithmetic operator More...
 
_AD_MAP_ACCESS_PARTITIONID_EXPLICIT_CONVERSION_ operator uint64_t () const
 conversion to base type: uint64_t More...
 
bool isValid () const
 
void ensureValid () const
 ensure that the PartitionId is valid More...
 
void ensureValidNonZero () const
 ensure that the PartitionId is valid and non zero More...
 

Static Public Member Functions

static PartitionId getMin ()
 get minimum valid PartitionId (i.e. cMinValue)
 
static PartitionId getMax ()
 get maximum valid PartitionId (i.e. cMaxValue)
 

Static Public Attributes

static const uint64_t cMinValue
 constant defining the minimum valid PartitionId value (used in isValid())
 
static const uint64_t cMaxValue
 constant defining the maximum valid PartitionId value (used in isValid())
 

Detailed Description

DataType PartitionId.

Defines the id of an partition of the map. The unit is: Identifier

Constructor & Destructor Documentation

◆ PartitionId() [1/2]

ad::map::access::PartitionId::PartitionId ( )
inline

default constructor

The default value of PartitionId is: std::numeric_limits<uint64_t>::quiet_NaN()

◆ PartitionId() [2/2]

_AD_MAP_ACCESS_PARTITIONID_EXPLICIT_CONVERSION_ ad::map::access::PartitionId::PartitionId ( uint64_t const  iPartitionId)
inline

standard constructor

Note
_AD_MAP_ACCESS_PARTITIONID_EXPLICIT_CONVERSION_ defines, if only an explicit conversion is allowed.

Member Function Documentation

◆ ensureValid()

void ad::map::access::PartitionId::ensureValid ( ) const
inline

ensure that the PartitionId is valid

Throws an std::out_of_range() exception if the PartitionId in not valid (i.e. isValid() returns false)

◆ ensureValidNonZero()

void ad::map::access::PartitionId::ensureValidNonZero ( ) const
inline

ensure that the PartitionId is valid and non zero

Throws an std::out_of_range() exception if the PartitionId in not valid or zero (i.e. isValid() returns false)

◆ isValid()

bool ad::map::access::PartitionId::isValid ( ) const
inline
Returns
true if the PartitionId in a valid range

An PartitionId value is defined to be valid if:

◆ operator uint64_t()

_AD_MAP_ACCESS_PARTITIONID_EXPLICIT_CONVERSION_ ad::map::access::PartitionId::operator uint64_t ( ) const
inline

conversion to base type: uint64_t

Note
the conversion to the base type removes the physical unit. _AD_MAP_ACCESS_PARTITIONID_EXPLICIT_CONVERSION_ defines, if only explicit calls are allowed.

◆ operator!=()

bool ad::map::access::PartitionId::operator!= ( const PartitionId other) const
inline

standard comparison operator

Parameters
[in]otherOther PartitionId.
Returns
true if one of the PartitionId is not valid or they can be taken as numerically different

◆ operator+()

PartitionId ad::map::access::PartitionId::operator+ ( const PartitionId other) const
inline

standard arithmetic operator

Parameters
[in]otherOther PartitionId
Returns
Result of arithmetic operation.
Note
throws a std::out_of_range exception if one of the two operands or the result of the operation is not valid

◆ operator+=()

PartitionId& ad::map::access::PartitionId::operator+= ( const PartitionId other)
inline

standard arithmetic operator

Parameters
[in]otherOther PartitionId
Returns
Result of arithmetic operation.
Note
throws a std::out_of_range exception if one of the two operands or the result of the operation is not valid

◆ operator-()

PartitionId ad::map::access::PartitionId::operator- ( const PartitionId other) const
inline

standard arithmetic operator

Parameters
[in]otherOther PartitionId
Returns
Result of arithmetic operation.
Note
throws a std::out_of_range exception if one of the two operands or the result of the operation is not valid

◆ operator-=()

PartitionId ad::map::access::PartitionId::operator-= ( const PartitionId other)
inline

standard arithmetic operator

Parameters
[in]otherOther PartitionId
Returns
Result of arithmetic operation.
Note
throws a std::out_of_range exception if one of the two operands or the result of the operation is not valid

◆ operator<()

bool ad::map::access::PartitionId::operator< ( const PartitionId other) const
inline

standard comparison operator

Parameters
[in]otherOther PartitionId.
Returns
true if both PartitionId are valid and this PartitionId is strictly numerically smaller than other.
Note
the precision of PartitionId is considered

◆ operator<=()

bool ad::map::access::PartitionId::operator<= ( const PartitionId other) const
inline

standard comparison operator

Parameters
[in]otherOther PartitionId
Returns
true if both PartitionId are valid and this PartitionId is numerically smaller than other.
Note
the precision of PartitionId is considered

◆ operator=() [1/2]

PartitionId& ad::map::access::PartitionId::operator= ( const PartitionId other)
default

standard assignment operator

Parameters
[in]otherOther PartitionId
Returns
Reference to this PartitionId.

◆ operator=() [2/2]

PartitionId& ad::map::access::PartitionId::operator= ( PartitionId &&  other)
default

standard move operator

Parameters
[in]otherOther PartitionId
Returns
Reference to this PartitionId.

◆ operator==()

bool ad::map::access::PartitionId::operator== ( const PartitionId other) const
inline

standard comparison operator

Parameters
[in]otherOther PartitionId
Returns
true if both PartitionId are valid and can be taken as numerically equal

◆ operator>()

bool ad::map::access::PartitionId::operator> ( const PartitionId other) const
inline

standard comparison operator

Parameters
[in]otherOther PartitionId.
Returns
true if both PartitionId are valid and this PartitionId is strictly numerically greater than other.
Note
the precision of PartitionId is considered

◆ operator>=()

bool ad::map::access::PartitionId::operator>= ( const PartitionId other) const
inline

standard comparison operator

Parameters
[in]otherOther PartitionId.
Returns
true if both PartitionId are valid and this PartitionId is numerically greater than other.
Note
the precision of PartitionId is considered

The documentation for this class was generated from the following file: