Container class for passing data to SafePrint. More...
Public Member Functions | |
template<class T > | |
ArgumentType (T Input) noexcept | |
Constructor most data types. | |
ArgumentType (uint16_t fInput, eArgumentType uType) noexcept | |
Constructor for a 16 bit float. | |
ArgumentType (const String *pString) noexcept | |
Constructor for a pointer to a Burgerlib String. | |
ArgumentType (const String &rString) noexcept | |
Constructor for a reference to a Burgerlib String. | |
ArgumentType (__m64 Input) noexcept | |
Constructor for an MMX 64 bit value. | |
ArgumentType (__m64 *pInput) noexcept | |
Constructor for a pointer to a MMX 64 bit value. | |
ArgumentType (const __m64 *pInput) noexcept | |
Constructor for a pointer to a MMX 64 bit value. | |
ArgumentType (const __m128 &rInput) noexcept | |
Constructor for an SSE 128 bit value (4 floats) | |
ArgumentType (const __m128d &rInput) noexcept | |
Constructor for an SSE 128 bit value (2 doubles) | |
ArgumentType (const __m128i &rInput) noexcept | |
Constructor for an SSE 128 bit value (4 integers) | |
ArgumentType (__m128 *pInput) noexcept | |
Constructor for a pointer to a SSE 128 bit value (4 floats) | |
ArgumentType (const __m128 *pInput) noexcept | |
Constructor for a pointer to a SSE 128 bit value (4 floats) | |
ArgumentType (__m128d *pInput) noexcept | |
Constructor for a pointer to a SSE 128 bit value (2 doubles. | |
ArgumentType (const __m128d *pInput) noexcept | |
Constructor for a pointer to a SSE 128 bit value (2 doubles. | |
ArgumentType (__m128i *pInput) noexcept | |
Constructor for a pointer to a SSE 128 bit value (4 integers) | |
ArgumentType (const __m128i *pInput) noexcept | |
Constructor for a pointer to a SSE 128 bit value (4 integers) | |
ArgumentType (void *pInput) noexcept | |
Constructor for a pointer. | |
ArgumentType (const void *pInput) noexcept | |
Constructor for a pointer. | |
uint_t | IsNumeric (void) const noexcept |
Test if the data is a numeric value. | |
uint_t | IsInteger (void) const noexcept |
Test if the data is an integer numeric value. | |
uint_t | IsSigned (void) const noexcept |
Test if the data is a signed integer value. | |
uint_t | IsUnsigned (void) const noexcept |
Test if the data is an unsigned integer value. | |
uint_t | IsBoolean (void) const noexcept |
Test if the data is a boolean. | |
uint_t | IsReal (void) const noexcept |
Test if the data is a floating point value. | |
uint_t | IsNegative (void) const noexcept |
Returns TRUE if the stored value is negative. | |
uint_t | IsZero (void) const noexcept |
Returns TRUE if the stored value is zero. | |
uint_t | IsCharacter (void) const noexcept |
Test if the data is a character type. | |
uint_t | IsTextPointer (void) const noexcept |
Test if the data is a pointer to a "C" string. | |
uint_t | IsPointer (void) const noexcept |
Test if the data is a pointer. | |
uint_t | Is64Bit (void) const noexcept |
Test if the data is a 64 bits wide. | |
uint_t | IsSIMD (void) const noexcept |
Test if the data is a vector value. | |
uint_t | IsSIMDPointer (void) const noexcept |
Test if the data is a pointer to a vector value. | |
uintptr_t | GetDataLengthInBytes (void) const noexcept |
Returns the size of the stored data in bytes. | |
const void * | GetDataAddress (void) const noexcept |
Returns the pointer the stored data. | |
eArgumentType | GetType (void) const noexcept |
Return the type of data contained in the container. | |
void | SetType (eArgumentType uType) noexcept |
Set the type of data contained in the container. | |
const char * | GetTypeName (void) const noexcept |
Returns the name of the data type contained. | |
int32_t | GetInt32 (void) const noexcept |
Returns the value as a signed 32 bit integer. | |
uint32_t | GetUInt32 (void) const noexcept |
Returns the value as an unsigned 32 bit integer. | |
int64_t | GetInt64 (void) const noexcept |
Returns the value as a signed 64 bit integer. | |
uint64_t | GetUInt64 (void) const noexcept |
Returns the value as an unsigned 64 bit integer. | |
char | GetChar (void) const noexcept |
Returns the value as a single character. | |
uint_t | GetBool (void) const noexcept |
Returns the value as a boolean. | |
const void * | GetPointer (void) const noexcept |
Returns the value as a pointer. | |
const char * | GetText (void) const noexcept |
Returns the value as a "C" string pointer. | |
uintptr_t | GetTextLength (void) const noexcept |
Returns the length of the "C" string. | |
uintptr_t | GetUTF8 (char *pOutput) const noexcept |
Convert integer to UTF8 stream. | |
Static Public Member Functions | |
static const char * | GetTypeName (eArgumentType uType) noexcept |
Returns the name of the data type. | |
Static Public Attributes | |
static const char | kInvalidCharConversion = '~' |
Character returned from GetChar() const for invalid character. | |
Additional Inherited Members | |
Public Attributes inherited from Burger::ArgumentType_t | |
ArgumentTypeDataUnion_t | m_Data |
Data stored in the container. | |
eArgumentType | m_eType |
Type of object found. | |
Container class for passing data to SafePrint.
Instead of relying on ... for sending parameters to a function, use instances of this type exclusively so that all passed types are known at runtime so robust error checking can be performed.
It's currently used by the SafePrint class to ensure the passed parameters match the data types requested by the format string.
|
inlinenoexcept |
Constructor most data types.
This template will invoke ArgumentType_Dispatch for processing. If it's a pointer, ArgumentType_DispatchPtr will subsequently be invoked to properly handle type determination.
T | Data type to be processed |
Input | Data to be stored in this class. |
|
inlinenoexcept |
Constructor for a 16 bit float.
Since 16 bit floats are not native to C++, it has to be manually cast by creating an argument manually. Example is below.
fInput | uint16_t representation of a 16 bit float |
uType | Type override for the 16 bit short |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Constructor for an MMX 64 bit value.
Input | A __m64 MMX 64 bit value |
|
inlinenoexcept |
Constructor for a pointer to a MMX 64 bit value.
pInput | Pointer to a __m64 MMX 64 bit value |
|
inlinenoexcept |
Constructor for a pointer to a MMX 64 bit value.
pInput | Pointer to a __m64 MMX 64 bit value |
|
inlinenoexcept |
Constructor for an SSE 128 bit value (4 floats)
rInput | A __m128 SSE 128 bit reference |
|
inlinenoexcept |
Constructor for an SSE 128 bit value (2 doubles)
rInput | A __m128d SSE 128 bit reference |
|
inlinenoexcept |
Constructor for an SSE 128 bit value (4 integers)
rInput | A __m128i SSE 128 bit reference |
|
inlinenoexcept |
Constructor for a pointer to a SSE 128 bit value (4 floats)
pInput | Pointer to a __m128 SSE 128 bit value |
|
inlinenoexcept |
Constructor for a pointer to a SSE 128 bit value (4 floats)
pInput | Pointer to a __m128 SSE 128 bit value |
|
inlinenoexcept |
Constructor for a pointer to a SSE 128 bit value (2 doubles.
pInput | Pointer to a __m128d SSE 128 bit value |
|
inlinenoexcept |
Constructor for a pointer to a SSE 128 bit value (2 doubles.
pInput | Pointer to a __m128d SSE 128 bit value |
|
inlinenoexcept |
Constructor for a pointer to a SSE 128 bit value (4 integers)
pInput | Pointer to a __m128 SSE 128 bit value |
|
inlinenoexcept |
Constructor for a pointer to a SSE 128 bit value (4 integers)
pInput | Pointer to a __m128 SSE 128 bit value |
|
inlinenoexcept |
Constructor for a pointer.
pInput | Pointer to data that wasn't already captured by a specific constructor |
|
inlinenoexcept |
Constructor for a pointer.
pInput | Pointer to data that wasn't already captured by a specific constructor |
|
noexcept |
|
noexcept |
Returns the value as a single character.
If the value is a compatible to be a character, return the converted value.
If it's not of this type, return kInvalidCharConversion
|
noexcept |
Returns the pointer the stored data.
|
noexcept |
Returns the size of the stored data in bytes.
|
noexcept |
Returns the value as a signed 32 bit integer.
If the value is a signed integer, convert to a 32 bit signed integer and return the converted value.
If it's not of this type, return 0.
|
noexcept |
Returns the value as a signed 64 bit integer.
If the value is a signed integer, convert to a 64 bit signed integer and return the converted value.
If it's not of this type, return 0.
|
noexcept |
|
noexcept |
|
noexcept |
Returns the length of the "C" string.
If the value is a compatible to a "C" string, return the length of the string or zero.
|
inlinenoexcept |
Return the type of data contained in the container.
|
staticnoexcept |
Returns the name of the data type.
Return a "C" string containing a user readable name of the data type.
Example: int8_t data, with an enumeration of kArgumentTypeInt8 returns "int8_t"
uType | Enumeration of the data type to check |
|
inlinenoexcept |
Returns the name of the data type contained.
Return a "C" string containing a user readable name of the data type contained in this class.
Example: int8_t data, with an enumeration of kArgumentTypeInt8 returns "int8_t"
|
noexcept |
Returns the value as an unsigned 32 bit integer.
If the value is an unsigned integer, convert to a 32 bit unsigned integer and return the converted value.
If it's not of this type, return 0.
|
noexcept |
Returns the value as an unsigned 64 bit integer.
If the value is an unsigned integer, convert to a 64 bit unsigned integer and return the converted value.
If it's not of this type, return 0.
|
noexcept |
Convert integer to UTF8 stream.
If the value is an 8, 16, or 32 bit integer, convert it to UTF8 and return the length of the data stream. The output buffer must be 5 bytes long and the data will not be zero terminated.
Incompatable data types will return a length of zero and perform no operation.
pOutput | Pointer to a buffer at least 5 bytes in length |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
noexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
noexcept |
|
inlinenoexcept |
Set the type of data contained in the container.
uType | eArgumentType of the new data contained in the class. |
|
static |
Character returned from GetChar() const for invalid character.