iceoryx_doc
1.0.1
|
typed version so we can use operator-> More...
#include <relative_pointer.hpp>
Public Member Functions | |
RelativePointer (ptr_t ptr, id_t id) noexcept | |
constructs a RelativePointer pointing to the same pointee as ptr in a segment identified by id More... | |
RelativePointer (offset_t offset, id_t id) noexcept | |
constructs a RelativePointer from a given offset and segment id More... | |
RelativePointer (ptr_t ptr=nullptr) noexcept | |
constructs a RelativePointer pointing to the same pointee as ptr More... | |
RelativePointer (const BaseRelativePointer &other) noexcept | |
creates a RelativePointer from a BaseRelativePointer More... | |
RelativePointer & | operator= (const BaseRelativePointer &other) noexcept |
assign this to point to the same pointee as the BaseRelativePointer other More... | |
RelativePointer & | operator= (ptr_t ptr) noexcept |
assigns the RelativePointer to point to the same pointee as ptr More... | |
template<typename U = T> | |
std::enable_if<!std::is_void< U >::value, U & >::type | operator* () noexcept |
dereferencing operator which returns a reference to the underlying object More... | |
T * | operator-> () noexcept |
access to the underlying object More... | |
template<typename U = T> | |
std::enable_if<!std::is_void< U >::value, const U & >::type | operator* () const noexcept |
dereferencing operator which returns a const reference to the underlying object More... | |
T * | operator-> () const noexcept |
read-only access to the underlying object More... | |
T * | get () const noexcept |
access the underlying object More... | |
operator T* () const noexcept | |
converts the RelativePointer to a pointer of the type of the underlying object More... | |
bool | operator== (T *const ptr) const noexcept |
checks if this and ptr point to the same pointee More... | |
bool | operator!= (T *const ptr) const noexcept |
checks if this and ptr point not to the same pointee More... | |
![]() | |
BaseRelativePointer (ptr_t ptr, id_t id) noexcept | |
constructs a BaseRelativePointer pointing to the same pointee as ptr in a segment identified by id More... | |
BaseRelativePointer (offset_t offset, id_t id) noexcept | |
constructs a BaseRelativePointer from a given offset and segment id More... | |
BaseRelativePointer (ptr_t ptr=nullptr) noexcept | |
constructs a BaseRelativePointer pointing to the same pointer as ptr More... | |
BaseRelativePointer (const BaseRelativePointer &other) noexcept | |
copy constructor More... | |
BaseRelativePointer (BaseRelativePointer &&other) noexcept | |
move constructor More... | |
BaseRelativePointer & | operator= (const BaseRelativePointer &other) noexcept |
copy assignment More... | |
BaseRelativePointer & | operator= (void *ptr) noexcept |
assigns the BaseRelativePointer to point to the same pointee as ptr More... | |
BaseRelativePointer & | operator= (BaseRelativePointer &&other) noexcept |
move assignment More... | |
ptr_t | get () const noexcept |
access to the underlying object More... | |
id_t | getId () const noexcept |
returns the id which identifies the segment More... | |
offset_t | getOffset () const noexcept |
returns the offset More... | |
ptr_t | getBasePtr () const noexcept |
get the base pointer associated with this' id More... | |
offset_t | computeOffset (ptr_t ptr) const noexcept |
get the offset from the start address of the segment and ptr More... | |
ptr_t | computeRawPtr () const noexcept |
get the pointer from stored id and offset More... | |
Additional Inherited Members | |
![]() | |
using | id_t = uint64_t |
using | ptr_t = void * |
using | const_ptr_t = const void *const |
using | offset_t = std::uintptr_t |
![]() | |
static id_t | registerPtr (const ptr_t ptr, uint64_t size=0U) noexcept |
registers a memory segment at ptr with size of a new id More... | |
static bool | registerPtr (const id_t id, const ptr_t ptr, uint64_t size=0U) noexcept |
tries to register a memory segment with a given size starting at ptr to a given id More... | |
static bool | unregisterPtr (const id_t id) noexcept |
unregisters ptr with given id More... | |
static ptr_t | getBasePtr (const id_t id) noexcept |
get the base ptr associated with the given id More... | |
static void | unregisterAll () noexcept |
unregisters all ptr id pairs (leads to initial state) | |
static offset_t | getOffset (const id_t id, const_ptr_t ptr) noexcept |
get the offset from id and ptr More... | |
static ptr_t | getPtr (const id_t id, const offset_t offset) noexcept |
get the pointer from id and offset ("inverse" to getOffset) More... | |
static id_t | searchId (ptr_t ptr) noexcept |
get the id for a given ptr More... | |
static bool | isValid (id_t id) noexcept |
checks if given id is valid More... | |
static PointerRepository< id_t, ptr_t > & | getRepository () noexcept |
returns the pointer repository More... | |
![]() | |
static constexpr id_t | NULL_POINTER_ID = std::numeric_limits<id_t>::max() |
static constexpr offset_t | NULL_POINTER_OFFSET = std::numeric_limits<offset_t>::max() |
![]() | |
id_t | m_id {NULL_POINTER_ID} |
offset_t | m_offset {NULL_POINTER_OFFSET} |
typed version so we can use operator->
|
inlinenoexcept |
constructs a RelativePointer pointing to the same pointee as ptr in a segment identified by id
[in] | ptr | the pointer whose pointee shall be the same for this |
[in] | id | is the unique id of the segment |
|
inlinenoexcept |
constructs a RelativePointer from a given offset and segment id
[in] | offset | is the offset |
[in] | id | is the unique id of the segment |
|
inlinenoexcept |
constructs a RelativePointer pointing to the same pointee as ptr
[in] | ptr | the pointer whose pointee shall be the same for this |
|
inlinenoexcept |
creates a RelativePointer from a BaseRelativePointer
[in] | other | is the BaseRelativePointer |
|
inlinenoexcept |
access the underlying object
|
inlinenoexcept |
converts the RelativePointer to a pointer of the type of the underlying object
|
inlinenoexcept |
checks if this and ptr point not to the same pointee
[in] | ptr | is the pointer whose pointee is compared with this' pointee |
|
inlinenoexcept |
dereferencing operator which returns a const reference to the underlying object
U | a template parameter to enable the dereferencing operator only for non-void T |
|
inlinenoexcept |
dereferencing operator which returns a reference to the underlying object
U | a template parameter to enable the dereferencing operator only for non-void T |
|
inlinenoexcept |
read-only access to the underlying object
|
inlinenoexcept |
access to the underlying object
|
inlinenoexcept |
assign this to point to the same pointee as the BaseRelativePointer other
[in] | other | the pointer whose pointee shall be the same for this |
|
inlinenoexcept |
assigns the RelativePointer to point to the same pointee as ptr
[in] | ptr | the pointer whose pointee shall be the same for this |
|
inlinenoexcept |
checks if this and ptr point to the same pointee
[in] | ptr | is the pointer whose pointee is compared with this' pointee |