ReXGlue SDK
Loading...
Searching...
No Matches
rex::memory::MappedPtr< char16_t > Class Reference

#include <rex/memory/mapped_ptr.h>

Public Member Functions

 MappedPtr ()=default
 MappedPtr (char16_t *host_ptr, u32 guest_addr)
 MappedPtr (std::nullptr_t)
u32 GetGuestAddress () const
char16_t * GetHostPtr () const
 operator char16_t * () const
 operator bool () const
std::u16string_view GetValue () const
char16_t * operator-> () const
char16_t & operator* () const
MappedPtr operator+ (std::ptrdiff_t offset) const
MappedPtr operator- (std::ptrdiff_t offset) const
char16_t & operator[] (size_t idx) const
template<typename U>
U As () const
 operator char16_t * () const
 operator u32 () const
rex::BE< U > * AsArray () const
void Zero () const

Static Public Member Functions

static MappedPtr FromHost (char16_t *host_ptr)

Detailed Description

MappedPtr to a null terminated UTF-16 string.

Constructor & Destructor Documentation

◆ MappedPtr() [1/2]

rex::memory::MappedPtr< char16_t >::MappedPtr ( )
default

Null pointer at guest address 0.

◆ MappedPtr() [2/2]

rex::memory::MappedPtr< char16_t >::MappedPtr ( std::nullptr_t )
inline

Null pointer at guest address 0.

Member Function Documentation

◆ AsArray()

rex::BE< U > * rex::memory::MappedPtr< char16_t >::AsArray ( ) const
inline
Returns
The host pointer as an array of big endian U values.

◆ FromHost()

MappedPtr rex::memory::MappedPtr< char16_t >::FromHost ( char16_t * host_ptr)
inlinestatic
Returns
A MappedPtr with guest address 0.

◆ GetValue()

std::u16string_view rex::memory::MappedPtr< char16_t >::GetValue ( ) const
inline
Returns
The string, or an empty view when the pointer is null.

◆ operator+()

MappedPtr rex::memory::MappedPtr< char16_t >::operator+ ( std::ptrdiff_t offset) const
inline
Parameters
offsetCharacters to advance.
Returns
A MappedPtr with both addresses advanced by offset characters.

◆ operator-()

MappedPtr rex::memory::MappedPtr< char16_t >::operator- ( std::ptrdiff_t offset) const
inline
Parameters
offsetCharacters to move back.
Returns
A MappedPtr with both addresses moved back by offset characters.

◆ Zero()

void rex::memory::MappedPtr< char16_t >::Zero ( ) const
inline

Zeroes sizeof(T) bytes at the host pointer. Does nothing when it is null.


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