17 #ifndef IOX_UTILS_RELOCATABLE_POINTER_RELATIVE_POINTER_DATA_HPP
18 #define IOX_UTILS_RELOCATABLE_POINTER_RELATIVE_POINTER_DATA_HPP
20 #include "iceoryx_utils/cxx/helplets.hpp"
33 using id_t = uint16_t;
34 using offset_t = uint64_t;
46 id_t
id() const noexcept;
60 static constexpr id_t
ID_RANGE{std::numeric_limits<id_t>::max()};
81 #include "iceoryx_utils/internal/relocatable_pointer/relative_pointer_data.inl"
This are the data for a relative pointer. To be able so safely be used in the shared memory and preve...
Definition: relative_pointer_data.hpp:31
static constexpr offset_t LOGICAL_NULLPTR
Definition: relative_pointer_data.hpp:72
static constexpr id_t NULL_POINTER_ID
Definition: relative_pointer_data.hpp:62
offset_t offset() const noexcept
Getter for the offset within the segment.
static constexpr offset_t MAX_VALID_OFFSET
Definition: relative_pointer_data.hpp:70
static constexpr id_t MAX_VALID_ID
Definition: relative_pointer_data.hpp:64
static constexpr id_t ID_RANGE
Definition: relative_pointer_data.hpp:60
void reset() noexcept
Resets the pointer to a logically nullptr.
constexpr RelativePointerData() noexcept=default
Default constructed RelativePointerData which is logically equal to a nullptr.
bool isLogicalNullptr() const noexcept
Checks if the pointer is logically a nullptr.
static constexpr offset_t OFFSET_RANGE
id_t is 16 bit and the offset consumes the remaining 48 bits -> offset range is 2^48 - 1
Definition: relative_pointer_data.hpp:66
static constexpr offset_t NULL_POINTER_OFFSET
Definition: relative_pointer_data.hpp:68
building block to easily create free function for logging in a library context
Definition: lockfree_queue.hpp:28