microfmt
Zero-allocation C++ formatting for constrained environments
Loading...
Searching...
No Matches
Public Member Functions | List of all members
microfmt::remote_intrusive_ptr_view< T, RemotePtr, RemoteRefCount > Class Template Reference

Formattable view over an intrusive pointer with an embedded count. More...

#include <remote_smart_ptr.hpp>

Public Member Functions

constexpr remote_intrusive_ptr_view (uintptr_t intrusive_ptr_addr, address_space_ref space, span< std::byte > scratch RELOCO_LIFETIMEBOUND, ptrdiff_t ptr_offset, ptrdiff_t ref_count_offset) noexcept
 Constructs a view over a remote intrusive-pointer object.
 
bool format (const sink &out) const noexcept
 Loads and renders the pointee and its embedded reference count.
 

Detailed Description

template<typename T, typename RemotePtr = uintptr_t, typename RemoteRefCount = int32_t>
class microfmt::remote_intrusive_ptr_view< T, RemotePtr, RemoteRefCount >

Formattable view over an intrusive pointer with an embedded count.

Template Parameters
TPointee type.
RemotePtrPointer representation in the target process.
RemoteRefCountReference-count representation in the target process.

Constructor & Destructor Documentation

◆ remote_intrusive_ptr_view()

template<typename T , typename RemotePtr = uintptr_t, typename RemoteRefCount = int32_t>
constexpr microfmt::remote_intrusive_ptr_view< T, RemotePtr, RemoteRefCount >::remote_intrusive_ptr_view ( uintptr_t  intrusive_ptr_addr,
address_space_ref  space,
span< std::byte > scratch  RELOCO_LIFETIMEBOUND,
ptrdiff_t  ptr_offset,
ptrdiff_t  ref_count_offset 
)
inlineconstexprnoexcept

Constructs a view over a remote intrusive-pointer object.

Parameters
intrusive_ptr_addrAddress of the remote pointer object.
spaceAddress space containing the pointer and pointee.
scratchStorage used to load the pointee.
ptr_offsetOffset to the stored pointee pointer.
ref_count_offsetOffset in the pointee to its reference count.

Member Function Documentation

◆ format()

template<typename T , typename RemotePtr = uintptr_t, typename RemoteRefCount = int32_t>
bool microfmt::remote_intrusive_ptr_view< T, RemotePtr, RemoteRefCount >::format ( const sink &  out) const
inlinenoexcept

Loads and renders the pointee and its embedded reference count.

Parameters
outDestination sink.
Returns
true on success; false when the pointer read fails.

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