#include <Result.hpp>
Public Member Functions | |
Result () | |
Result (void *vpValue, size_t size, std::string strType="void*") | |
Result (int iValue) | |
Result (double dValue) | |
Result (bool bValue) | |
Result (Result *pres) | |
void | setValue (void *vpValue, size_t size, std::string strType) |
void | setValue (double dValue) |
void | setValue (int iValue) |
void | setValue (bool bValue) |
void | setValue (Result *pres) |
void * | getValue () const |
double | toDouble () const |
int | toInt () const |
bool | toBool () const |
size_t | getSize () const |
Result::Result | ( | ) |
Creates a new empty result object.
Result::Result | ( | void * | vpValue, | |
size_t | size, | |||
std::string | strType = "void*" | |||
) |
Creates a result object storing an arbitrary block of memory.
[in] | vpValue | A pointer to the block of memory to be stored. |
[in] | size | The size in bytes of the memory to be stored. |
[in] | strType | A string specifying the type of value stored in the memory being copied. |
Result::Result | ( | int | iValue | ) |
Creates a result object storing an int.
[in] | iValue | The int to be stored |
Result::Result | ( | double | dValue | ) |
Creates a result object storing a double.
[in] | dValue | The double to be stored |
Result::Result | ( | bool | bValue | ) |
Creates a result object storing a bool.
[in] | bValue | The bool to be stored |
Result::Result | ( | Result * | pres | ) |
Creates a result object storing the contents of another Result object.
[in] | pres | The result to be copied. |
size_t Result::getSize | ( | ) | const |
Returns the size of the data stored in the result.
void * Result::getValue | ( | ) | const |
Returns a pointer to the value stored in this result.
void Result::setValue | ( | Result * | pres | ) |
Sets this result to store the contents of another result.
[in] | pres | The result to be copied. |
void Result::setValue | ( | bool | bValue | ) |
Sets this result to store a bool.
[in] | bValue | The bool to be stored. |
void Result::setValue | ( | int | iValue | ) |
Sets this result to store an int.
[in] | iValue | The int to be stored. |
void Result::setValue | ( | double | dValue | ) |
Sets this result to store a double.
[in] | dValue | The double to be stored. |
void Result::setValue | ( | void * | vpValue, | |
size_t | size, | |||
std::string | strType | |||
) |
Set this result to store an arbitrary block of memory.
[in] | vpValue | A pointer to the block of memory to be stored. |
[in] | size | The size in bytes of the memory to be stored. |
[in] | strType | A string specifying the type of value stored in the memory being copied. |
bool Result::toBool | ( | ) | const |
Returns the value stored in this result as a bool if the conversion is known.
double Result::toDouble | ( | ) | const |
Returns the value stored in this result as a double if the conversion is known.
int Result::toInt | ( | ) | const |
Returns the value stored in this result as an int if the conversion is known.