Lazily-loaded reference to a trivially-copyable remote object.
More...
#include <address_space.hpp>
|
| constexpr | remote_ref (uintptr_t addr, address_space_ref space, span< std::byte > scratch RELOCO_LIFETIMEBOUND RELOCO_LIFETIME_CAPTURE_BY_THIS) noexcept |
| | Constructs a remote object reference.
|
| |
| template<size_t N> |
| constexpr | remote_ref (uintptr_t addr, address_space_ref space, std::byte(&scratch)[N]) noexcept |
| | Constructs a remote object reference over a fixed C array.
|
| |
| 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.
|
| |
| RELOCO_BEGIN_UNSAFE_CODE expected< T *, remote_load_error > | load () const noexcept |
| | Loads the object into the scratch buffer.
|
| |
template<typename T>
class microfmt::remote_ref< T >
Lazily-loaded reference to a trivially-copyable remote object.
- Template Parameters
-
| T | Object type loaded into a caller-supplied scratch buffer. |
◆ remote_ref() [1/2]
Constructs a remote object reference.
- Parameters
-
| addr | Absolute address of the object. |
| space | Address space the object lives in. |
| scratch | Reusable, properly-aligned scratch buffer (>= sizeof(T)). |
◆ remote_ref() [2/2]
template<typename T >
template<size_t N>
Constructs a remote object reference over a fixed C array.
- Template Parameters
-
| N | Size of the scratch array. |
- Parameters
-
| addr | Absolute address of the object. |
| space | Address space the object lives in. |
| scratch | Reusable, properly-aligned scratch buffer. |
◆ address()
Returns the remote object address.
- Returns
- Absolute address, or
0 when null.
◆ is_null()
Reports whether the reference points to address zero.
- Returns
true when the reference is null.
◆ load()
Loads the object into the scratch buffer.
- Returns
- A pointer into the scratch buffer, or a precise loading error.
The documentation for this class was generated from the following file: