Streaming view of a foreign or non-contiguous string.
More...
#include <foreign_string_view.hpp>
|
| constexpr | foreign_string_view () noexcept=default |
| | Constructs an empty (null) foreign string view.
|
| |
| constexpr | foreign_string_view (uintptr_t addr, address_space_ref space, span< char > scratch RELOCO_LIFETIMEBOUND RELOCO_LIFETIME_CAPTURE_BY_THIS, size_t max_limit=4096) noexcept |
| | Constructs a view over a foreign string using an address space and address.
|
| |
| template<size_t N> |
| constexpr | foreign_string_view (uintptr_t addr, address_space_ref space, char(&scratch RELOCO_LIFETIMEBOUND RELOCO_LIFETIME_CAPTURE_BY_THIS)[N], size_t max_limit=4096) noexcept |
| | Constructs a view over a foreign string using a fixed C array as scratch.
|
| |
| constexpr uintptr_t | address () const noexcept |
| | Returns the foreign string address.
|
| |
| constexpr address_space_ref | space () const noexcept |
| | Returns the address space handle.
|
| |
| constexpr span< char > | scratch () const noexcept RELOCO_LIFETIMEBOUND |
| | Returns the scratch chunk buffer.
|
| |
| constexpr size_t | max_limit () const noexcept |
| | Returns the maximum render length.
|
| |
Streaming view of a foreign or non-contiguous string.
Pulls a string from a custom source or foreign address space through a reusable scratch buffer in bounded chunks.
◆ foreign_string_view() [1/3]
| constexpr microfmt::foreign_string_view::foreign_string_view |
( |
| ) |
|
|
constexprdefaultnoexcept |
Constructs an empty (null) foreign string view.
◆ foreign_string_view() [2/3]
| constexpr microfmt::foreign_string_view::foreign_string_view |
( |
uintptr_t |
addr, |
|
|
address_space_ref |
space, |
|
|
span< char > scratch RELOCO_LIFETIMEBOUND |
RELOCO_LIFETIME_CAPTURE_BY_THIS, |
|
|
size_t |
max_limit = 4096 |
|
) |
| |
|
inlineconstexprnoexcept |
Constructs a view over a foreign string using an address space and address.
- Parameters
-
| addr | Absolute address or identifier of the foreign string. |
| space | Address space handle used to read the string chunks. |
| scratch | Reusable chunk-read buffer. |
| max_limit | Maximum characters to render. |
◆ foreign_string_view() [3/3]
template<size_t N>
| constexpr microfmt::foreign_string_view::foreign_string_view |
( |
uintptr_t |
addr, |
|
|
address_space_ref |
space, |
|
|
char(&) |
RELOCO_LIFETIME_CAPTURE_BY_THIS[N], |
|
|
size_t |
max_limit = 4096 |
|
) |
| |
|
inlineconstexprnoexcept |
Constructs a view over a foreign string using a fixed C array as scratch.
- Template Parameters
-
| N | Size of the scratch array. |
- Parameters
-
| addr | Absolute address or identifier of the foreign string. |
| space | Address space handle used to read the string chunks. |
| scratch | Reusable chunk-read buffer. |
| max_limit | Maximum characters to render. |
◆ address()
| constexpr uintptr_t microfmt::foreign_string_view::address |
( |
| ) |
const |
|
inlineconstexprnoexcept |
Returns the foreign string address.
- Returns
- Absolute address, or
0 when null.
◆ max_limit()
| constexpr size_t microfmt::foreign_string_view::max_limit |
( |
| ) |
const |
|
inlineconstexprnoexcept |
Returns the maximum render length.
- Returns
- Character limit.
◆ scratch()
| constexpr span< char > microfmt::foreign_string_view::scratch |
( |
| ) |
const |
|
inlineconstexprnoexcept |
Returns the scratch chunk buffer.
- Returns
- Scratch span used for chunked reads.
◆ space()
The documentation for this class was generated from the following file: