#include <Allocator.h>
Public Member Functions | |
VirtualAddress (uintptr_t ptr) | |
bool | IsValid () const |
bool | IsNull () const |
Static Public Member Functions | |
static VirtualAddress | CreateNull () |
static VirtualAddress | CreateZero () |
Creates a valid address with a zero offset. | |
static VirtualAddress | CreateFromPointer (void *ptr) |
Creates an address from a pointer. | |
static VirtualAddress | CreateFromOffset (uint64_t offset) |
Creates an address from an offset from a base pointer. | |
Public Attributes | |
uintptr_t | m_ptr |
A virtual address which may be relative to a base resource. This means 0 might be a valid address (dependent on the Allocator::Descriptor::m_addressBase value). To account for this, VirtualAddress::Null is used instead. Check validity of the address using IsValid or IsNull instead of checking for 0. VirtualAddress is initialized to Null, so returning the default constructor is sufficient to represent an invalid address.