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

Length-aware view over a remote C++ string object. More...

#include <remote_basic_string.hpp>

Public Member Functions

constexpr remote_basic_string_view (uintptr_t object_address, address_space_ref space, span< char > scratch RELOCO_LIFETIMEBOUND RELOCO_LIFETIME_CAPTURE_BY_THIS, Layout layout, size_t max_limit=4096) noexcept
 Constructs a view over a remote string object.
 
template<size_t N>
constexpr remote_basic_string_view (uintptr_t object_address, address_space_ref space, char(&scratch RELOCO_LIFETIMEBOUND RELOCO_LIFETIME_CAPTURE_BY_THIS)[N], Layout layout, size_t max_limit=4096) noexcept
 Constructs a view using a fixed C array as scratch storage.
 
constexpr uintptr_t object_address () const noexcept
 
constexpr address_space_ref space () const noexcept
 
constexpr span< char > scratch () const noexcept RELOCO_LIFETIMEBOUND
 
constexpr size_t max_limit () const noexcept
 
bool resolve (uintptr_t &data_address, size_t &size) const noexcept
 

Detailed Description

template<typename Layout>
class microfmt::remote_basic_string_view< Layout >

Length-aware view over a remote C++ string object.

The layout object resolves the character-data address and byte length from the remote string representation. Formatting reads exactly that many bytes in bounded chunks, so embedded NUL characters do not terminate the read.

Template Parameters
LayoutObject providing separate read_size and read_data_address operations.

Constructor & Destructor Documentation

◆ remote_basic_string_view() [1/2]

template<typename Layout >
constexpr microfmt::remote_basic_string_view< Layout >::remote_basic_string_view ( uintptr_t  object_address,
address_space_ref  space,
span< char > scratch RELOCO_LIFETIMEBOUND  RELOCO_LIFETIME_CAPTURE_BY_THIS,
Layout  layout,
size_t  max_limit = 4096 
)
inlineconstexprnoexcept

Constructs a view over a remote string object.

Parameters
object_addressAddress of the remote string object.
spaceAddress space containing the object and character data.
scratchReusable character-read buffer.
layoutLayout resolver retained by value.
max_limitMaximum characters to render.

◆ remote_basic_string_view() [2/2]

template<typename Layout >
template<size_t N>
constexpr microfmt::remote_basic_string_view< Layout >::remote_basic_string_view ( uintptr_t  object_address,
address_space_ref  space,
char(&)  RELOCO_LIFETIME_CAPTURE_BY_THIS[N],
Layout  layout,
size_t  max_limit = 4096 
)
inlineconstexprnoexcept

Constructs a view using a fixed C array as scratch storage.

Member Function Documentation

◆ max_limit()

template<typename Layout >
constexpr size_t microfmt::remote_basic_string_view< Layout >::max_limit ( ) const
inlineconstexprnoexcept

◆ object_address()

template<typename Layout >
constexpr uintptr_t microfmt::remote_basic_string_view< Layout >::object_address ( ) const
inlineconstexprnoexcept

◆ resolve()

template<typename Layout >
bool microfmt::remote_basic_string_view< Layout >::resolve ( uintptr_t &  data_address,
size_t &  size 
) const
inlinenoexcept

◆ scratch()

template<typename Layout >
constexpr span< char > microfmt::remote_basic_string_view< Layout >::scratch ( ) const
inlineconstexprnoexcept

◆ space()

template<typename Layout >
constexpr address_space_ref microfmt::remote_basic_string_view< Layout >::space ( ) const
inlineconstexprnoexcept

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