Created
January 5, 2025 23:48
-
-
Save twist84/4a0a142fc1f9188db62b0f9f05653248 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ptr32_void_t | |
{ | |
public: | |
uint64_t operator uint64_t() const; | |
int8_t* operator int8_t*() const; | |
uint8_t* operator uint8_t*() const; | |
const int8_t* operator const int8_t*() const; | |
const uint8_t* operator const uint8_t*() const; | |
int16_t* operator int16_t*() const; | |
uint16_t* operator uint16_t*() const; | |
const int16_t* operator const int16_t*() const; | |
const uint16_t* operator const uint16_t*() const; | |
int32_t* operator int32_t*() const; | |
uint32_t* operator uint32_t*() const; | |
const int32_t* operator const int32_t*() const; | |
const uint32_t* operator const uint32_t*() const; | |
long* operator long*() const; | |
unsigned long* operator unsigned long*() const; | |
const long* operator const long*() const; | |
const unsigned long* operator const unsigned long*() const; | |
real* operator real*() const; | |
const real* operator const real*() const; | |
void* operator void*() const; | |
const void* operator const void*() const; | |
bool operator==(const ptr32_void_t&) const; | |
void SetPtr(const void*); | |
void* GetPtr() const; | |
bool IsEqual(const void*) const; | |
uint32_t GetCompressed() const; | |
public: | |
static uint32_t CompressPtr(const void*); | |
static void* ExpandPtr(uint32_t); | |
private: | |
uint32_t m_stored; | |
}; | |
template<typename t_type> | |
class ptr32_t | |
{ | |
public: | |
t_type* operator t_type*() const; | |
t_type* operator->() const; | |
void SetPtr(t_type*); | |
t_type* GetPtr() const; | |
uint32_t GetCompressed() const; | |
private: | |
ptr32_void_t m_ptr; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment