coastline 0.0.4
Loading...
Searching...
No Matches
coastline::Ptr32Memory Class Reference

Writable memory within signed 32-bit offsets of g_abPtr32Anchor for converted asset pointers. More...

#include <ptr32memory.h>

Public Member Functions

 Ptr32Memory (std::size_t bytes)
 Allocate writable memory, or throw when no representable mapping is available.
 ~Ptr32Memory ()
 Release the mapping after all converted pointers into it are no longer used.
 Ptr32Memory (const Ptr32Memory &)=delete
 Copying is disabled because the mapping has exclusive lifetime management.
Ptr32Memory & operator= (const Ptr32Memory &)=delete
 Assignment is disabled because converted pointers require a stable mapping address.
void * Data () const

Detailed Description

Writable memory within signed 32-bit offsets of g_abPtr32Anchor for converted asset pointers.

Constructor & Destructor Documentation

◆ Ptr32Memory() [1/2]

coastline::Ptr32Memory::Ptr32Memory ( std::size_t bytes)
explicit

Allocate writable memory, or throw when no representable mapping is available.

Parameters
bytesThe requested mapping size, in bytes.
Exceptions
std::length_errorIf bytes is zero or exceeds INT32_MAX.
std::bad_allocIf a representable mapping cannot be allocated.

◆ ~Ptr32Memory()

coastline::Ptr32Memory::~Ptr32Memory ( )

Release the mapping after all converted pointers into it are no longer used.

◆ Ptr32Memory() [2/2]

coastline::Ptr32Memory::Ptr32Memory ( const Ptr32Memory & )
delete

Copying is disabled because the mapping has exclusive lifetime management.

Member Function Documentation

◆ operator=()

Ptr32Memory & coastline::Ptr32Memory::operator= ( const Ptr32Memory & )
delete

Assignment is disabled because converted pointers require a stable mapping address.

◆ Data()

void * coastline::Ptr32Memory::Data ( ) const
inline
Returns
The start of the mapping.

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