ReXGlue SDK
Loading...
Searching...
No Matches
rex::kernel::GuestGlobal< T, Address > Struct Template Reference

#include <rex/kernel/memory_view.h>

Public Member Functions

T * GetHost () const
T * GetHost (const rex::kernel::MemoryView &view) const
T * TryGetHost () const
T * TryGetHost (const rex::kernel::MemoryView &view) const
T * operator-> () const
T & operator* () const

Static Public Member Functions

static constexpr u32 GetAddress ()

Detailed Description

template<typename T, u32 Address>
struct rex::kernel::GuestGlobal< T, Address >

Binds a type to a guest address. Every access resolves it through guest memory.

Template Parameters
TThe type the title keeps at the address, laid out as the title stores it.

Member Function Documentation

◆ GetHost() [1/2]

template<typename T, u32 Address>
T * rex::kernel::GuestGlobal< T, Address >::GetHost ( ) const
inline

Resolves the value through the guest memory of the calling thread.

◆ GetHost() [2/2]

template<typename T, u32 Address>
T * rex::kernel::GuestGlobal< T, Address >::GetHost ( const rex::kernel::MemoryView & view) const
inline

Resolves the value through a memory view, for a host thread with no bound runtime.

◆ TryGetHost() [1/2]

template<typename T, u32 Address>
T * rex::kernel::GuestGlobal< T, Address >::TryGetHost ( ) const
inline

Like GetHost, but checks that the title could read the value.

Returns
The host pointer, null when the address is in no heap, its page is not readable, or the calling thread has no runtime.

◆ TryGetHost() [2/2]

template<typename T, u32 Address>
T * rex::kernel::GuestGlobal< T, Address >::TryGetHost ( const rex::kernel::MemoryView & view) const
inline

Like GetHost with a view, but checks that the title could read the value.

Returns
The host pointer, null when the address is in no heap or its page is not readable.

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