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

Lazily-loaded remote object reference with diagnostics support. More...

#include <remote_diagnostics.hpp>

Public Member Functions

constexpr remote_diag_ref (uintptr_t addr, address_space_ref space, symbol_resolver_ref resolver, span< std::byte > scratch RELOCO_LIFETIMEBOUND, symbol_resolution_context &symbol_context RELOCO_LIFETIMEBOUND) noexcept
 Constructs a diagnostics-aware remote object reference.
 
constexpr uintptr_t address () const noexcept
 Returns the remote object address.
 
constexpr bool is_null () const noexcept
 Reports whether the reference points to address zero.
 
expected< T *, remote_load_error > load () const noexcept RELOCO_LIFETIMEBOUND
 Loads the object into the scratch buffer.
 
constexpr address_space_ref space () const noexcept
 Returns the address space handle.
 
constexpr symbol_resolver_ref resolver () const noexcept
 Returns the symbol resolver handle.
 
constexpr symbol_resolution_context & symbol_context () const noexcept RELOCO_LIFETIMEBOUND
 

Detailed Description

template<typename T>
class microfmt::remote_diag_ref< T >

Lazily-loaded remote object reference with diagnostics support.

Template Parameters
TReferenced remote object type.

Constructor & Destructor Documentation

◆ remote_diag_ref()

template<typename T >
constexpr microfmt::remote_diag_ref< T >::remote_diag_ref ( uintptr_t  addr,
address_space_ref  space,
symbol_resolver_ref  resolver,
span< std::byte > scratch  RELOCO_LIFETIMEBOUND,
symbol_resolution_context &symbol_context  RELOCO_LIFETIMEBOUND 
)
inlineconstexprnoexcept

Constructs a diagnostics-aware remote object reference.

Parameters
addrAbsolute address of the object.
spaceAddress space the object lives in.
resolverSymbol resolver used on read faults.
scratchReusable, aligned object scratch buffer.
symbol_contextCaller-owned symbol-resolution temporaries.

Member Function Documentation

◆ address()

template<typename T >
constexpr uintptr_t microfmt::remote_diag_ref< T >::address ( ) const
inlineconstexprnoexcept

Returns the remote object address.

Returns
Absolute address, or 0 when null.

◆ is_null()

template<typename T >
constexpr bool microfmt::remote_diag_ref< T >::is_null ( ) const
inlineconstexprnoexcept

Reports whether the reference points to address zero.

Returns
true when the reference is null.

◆ load()

template<typename T >
expected< T *, remote_load_error > microfmt::remote_diag_ref< T >::load ( ) const
inlinenoexcept

Loads the object into the scratch buffer.

Returns
A pointer into the scratch buffer, or a precise loading error.

◆ resolver()

template<typename T >
constexpr symbol_resolver_ref microfmt::remote_diag_ref< T >::resolver ( ) const
inlineconstexprnoexcept

Returns the symbol resolver handle.

Returns
Bound symbol_resolver_ref.

◆ space()

template<typename T >
constexpr address_space_ref microfmt::remote_diag_ref< T >::space ( ) const
inlineconstexprnoexcept

Returns the address space handle.

Returns
Bound address_space_ref.

◆ symbol_context()

template<typename T >
constexpr symbol_resolution_context & microfmt::remote_diag_ref< T >::symbol_context ( ) const
inlineconstexprnoexcept

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