Base Framework
|
#include <base/Cast.h>
Classes | |
class | Container |
class | Extract |
class | Impersonate |
Static Public Member Functions | |
template<class RESULT > | |
static RESULT | implicit (RESULT argument) noexcept |
template<class TYPE > | |
static uint8 * | getAddress (TYPE &value) noexcept |
template<class TYPE > | |
static const uint8 * | getAddress (const TYPE &value) noexcept |
template<class TYPE > | |
static volatile uint8 * | getAddress (volatile TYPE &value) noexcept |
template<class TYPE > | |
static const volatile uint8 * | getAddress (volatile const TYPE &value) noexcept |
template<class TYPE > | |
static uint8 * | getAddress (TYPE value[]) noexcept |
template<class TYPE > | |
static const uint8 * | getAddress (const TYPE value[]) noexcept |
template<class TYPE > | |
static volatile uint8 * | getAddress (volatile TYPE value[]) noexcept |
template<class TYPE > | |
static const volatile uint8 * | getAddress (volatile const TYPE value[]) noexcept |
template<class TYPE > | |
static char * | getCharAddress (TYPE &value) noexcept |
template<class TYPE > | |
static const char * | getCharAddress (const TYPE &value) noexcept |
template<class TYPE > | |
static volatile char * | getCharAddress (volatile TYPE &value) noexcept |
template<class TYPE > | |
static const volatile char * | getCharAddress (volatile const TYPE &value) noexcept |
template<class TYPE > | |
static char * | getCharAddress (TYPE value[]) noexcept |
template<class TYPE > | |
static const char * | getCharAddress (const TYPE value[]) noexcept |
template<class TYPE > | |
static volatile char * | getCharAddress (volatile TYPE value[]) noexcept |
template<class TYPE > | |
static const volatile char * | getCharAddress (volatile const TYPE value[]) noexcept |
static MemorySize | getOffset (const volatile void *value) noexcept |
template<class TYPE > | |
static TYPE | getPointer (MemorySize value) noexcept |
template<class RESULT > | |
static RESULT | up (RESULT value) noexcept |
template<class RESULT , class ORIGINAL > | |
static RESULT | explicitly (ORIGINAL value) noexcept |
template<class RESULT , class ORIGINAL > | |
static RESULT | pointer (ORIGINAL value) noexcept |
template<class RESULT , class ORIGINAL > | |
static RESULT | anypointer (ORIGINAL value) noexcept |
template<class RESULT , class ORIGINAL > | |
static RESULT | reinterpret (ORIGINAL value) noexcept |
template<class RESULT , class ARGUMENT > | |
static RESULT | impersonate (ARGUMENT value) noexcept |
template<class RESULT , class ARGUMENT > | |
static RESULT | container (ARGUMENT value) noexcept |
template<class RESULT , class ARGUMENT > | |
static RESULT | extract (ARGUMENT value) noexcept |
|
inlinestaticnoexcept |
Casts the argument to the specified type. The result type must not occupy less memory than the argument type.
|
inlinestaticnoexcept |
Casts the argument to the specified type. The result type must not occupy more memory than the argument type.
|
inlinestaticnoexcept |
Returns the address of the specified object as a byte pointer (i.e. uint8*).
|
inlinestaticnoexcept |
Returns the address of the specified object as a byte pointer (i.e. uint8*).
|
inlinestaticnoexcept |
Returns the address of the specified object as a byte pointer (i.e. uint8*).
|
inlinestaticnoexcept |
Returns the address of the specified array as a byte pointer (i.e. uint8*).
|
inlinestaticnoexcept |
Returns the address of the specified object as a byte pointer (i.e. uint8*).
|
inlinestaticnoexcept |
Returns the address of the specified object as a byte pointer (i.e. uint8*).
|
inlinestaticnoexcept |
Returns the address of the specified object as a byte pointer (i.e. uint8*).
|
inlinestaticnoexcept |
Returns the address of the specified object as a byte pointer (i.e. uint8*).
|
inlinestaticnoexcept |
Returns the address of the specified object as a char pointer.
|
inlinestaticnoexcept |
Returns the address of the specified object as a char pointer.
|
inlinestaticnoexcept |
Returns the address of the specified object as a char pointer.
|
inlinestaticnoexcept |
Returns the address of the specified object as a char pointer.
|
inlinestaticnoexcept |
Returns the address of the specified object as a char pointer.
|
inlinestaticnoexcept |
Returns the address of the specified object as a char pointer.
|
inlinestaticnoexcept |
Returns the address of the specified object as a char pointer.
|
inlinestaticnoexcept |
Returns the address of the specified object as a char pointer.
|
inlinestaticnoexcept |
Returns the memory offset of the specified pointer. Any qualifiers are lost in the process!
|
inlinestaticnoexcept |
Returns the pointer value corresponding to the specified memory offset.
|
inlinestaticnoexcept |
Casts the argument to the specified type. The argument and result types must have the exact same memory size.
|
inlinestaticnoexcept |
Implicit cast to the specified type.
|
inlinestaticnoexcept |
This method casts any pointer type to any other pointer type (at compile time). You should definitely avoid this function when possible. However, it is not as dangerous as using reinterpret_cast directly. This function does not cast away the qualifiers (e.g. const).
|
inlinestaticnoexcept |
This cast function is used to up cast pointers (i.e. you can explicitly specify the desired pointer type). This function only works if there exists implicit rules which convert the input type to the desired type.