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

64-bit/Native remote string pointer wrapper. More...

#include <remote_object.hpp>

Public Member Functions

constexpr string_ptr () noexcept
 
constexpr string_ptr (uintptr_t addr) noexcept
 
RELOCO_BEGIN_UNSAFE_CODE string_ptr (const char *ptr) noexcept
 
RELOCO_END_UNSAFE_CODE constexpr uintptr_t address () const noexcept
 
constexpr bool is_null () const noexcept
 
constexpr operator bool () const noexcept
 
constexpr foreign_string_view as_view (address_space_ref space, span< char > scratch RELOCO_LIFETIMEBOUND, size_t max_limit=4096) const &noexcept RELOCO_LIFETIMEBOUND
 Synthesizes a foreign_string_view over the pointed string.
 
constexpr foreign_string_view as_view (address_space_ref space, span< char > scratch RELOCO_LIFETIMEBOUND, size_t max_limit=4096) const &&=delete
 

Detailed Description

64-bit/Native remote string pointer wrapper.

Stores an absolute address and synthesizes a foreign_string_view on demand using caller-supplied scratch buffers.

Constructor & Destructor Documentation

◆ string_ptr() [1/3]

constexpr microfmt::string_ptr::string_ptr ( )
inlineconstexprnoexcept

◆ string_ptr() [2/3]

constexpr microfmt::string_ptr::string_ptr ( uintptr_t  addr)
inlineexplicitconstexprnoexcept

◆ string_ptr() [3/3]

RELOCO_BEGIN_UNSAFE_CODE microfmt::string_ptr::string_ptr ( const char *  ptr)
inlineexplicitnoexcept

Member Function Documentation

◆ address()

RELOCO_END_UNSAFE_CODE constexpr uintptr_t microfmt::string_ptr::address ( ) const
inlineconstexprnoexcept

◆ as_view() [1/2]

constexpr foreign_string_view microfmt::string_ptr::as_view ( address_space_ref  space,
span< char > scratch  RELOCO_LIFETIMEBOUND,
size_t  max_limit = 4096 
) const &&
constexprdelete

◆ as_view() [2/2]

constexpr foreign_string_view microfmt::string_ptr::as_view ( address_space_ref  space,
span< char > scratch  RELOCO_LIFETIMEBOUND,
size_t  max_limit = 4096 
) const &
inlineconstexprnoexcept

Synthesizes a foreign_string_view over the pointed string.

Parameters
spaceAddress space handle.
scratchScratch work buffer for chunked reading.
max_limitMaximum character render limit.

◆ is_null()

constexpr bool microfmt::string_ptr::is_null ( ) const
inlineconstexprnoexcept

◆ operator bool()

constexpr microfmt::string_ptr::operator bool ( ) const
inlineexplicitconstexprnoexcept

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