ReXGlue SDK
Loading...
Searching...
No Matches
mapped_ptr.h File Reference
#include <cstddef>
#include <cstdint>
#include <cstring>
#include <string_view>
#include <type_traits>
#include <rex/platform.h>
#include <rex/types.h>

Go to the source code of this file.

Classes

class  rex::memory::MappedPtr< T >
class  rex::memory::MappedPtr< void >
class  rex::memory::MappedPtr< char >
class  rex::memory::MappedPtr< char16_t >
struct  rex::memory::IsMappedPtr< T >
struct  rex::memory::IsMappedPtr< MappedPtr< T > >
struct  rex::memory::MappedPtrInnerType< MappedPtr< T > >
class  rex::memory::GuestMembase

Namespaces

namespace  rex
namespace  rex::memory

Typedefs

using MappedVoid = rex::memory::MappedPtr<void>
using MappedU8 = rex::memory::MappedPtr<rex::u8>
using MappedU16 = rex::memory::MappedPtr<rex::be_u16>
using MappedU32 = rex::memory::MappedPtr<rex::be_u32>
using MappedU64 = rex::memory::MappedPtr<rex::be_u64>
using MappedF32 = rex::memory::MappedPtr<rex::be_f32>
using MappedF64 = rex::memory::MappedPtr<rex::be_f64>
using MappedString = rex::memory::MappedPtr<char>
using MappedWString = rex::memory::MappedPtr<char16_t>
template<typename T>
using GuestPtrT = rex::memory::MappedPtr<T>

Functions

template<typename T = u8*>
T rex::memory::GuestPtr (u8 *base, u32 guest_address) noexcept
u32 rex::memory::HostPtrToGuest (const u8 *base, const void *host_address) noexcept

Variables

template<typename T>
constexpr bool rex::memory::is_mapped_ptr_v = IsMappedPtr<T>::value

Detailed Description

License
BSD 3-Clause License See LICENSE file in the project root for full license text.
Remarks
The guest address arithmetic is derived from Xenia's xenia/base/memory.h (Ben Vanik, 2020).