#include <gridclientvariant.hpp>
List of all members.
Detailed Description
Class that replaces java.lang.Object holder for primitive types and string. It can hold boolean, int_*, float, double, string and byte array values.
Constructor & Destructor Documentation
| GridClientVariant::GridClientVariant |
( |
|
) |
|
No-arg constructor - variant with null value is created.
| GridClientVariant::~GridClientVariant |
( |
|
) |
[virtual] |
| GridClientVariant::GridClientVariant |
( |
bool |
val |
) |
|
Constructor with boolean argument.
- Parameters:
-
| val | Value for the variant. |
| GridClientVariant::GridClientVariant |
( |
int16_t |
val |
) |
|
Constructor with int16_t argument.
- Parameters:
-
| val | Value for the variant. |
| GridClientVariant::GridClientVariant |
( |
int32_t |
val |
) |
|
Constructor with int32_t argument.
- Parameters:
-
| val | Value for the variant. |
| GridClientVariant::GridClientVariant |
( |
int64_t |
val |
) |
|
Constructor with int64_t argument.
- Parameters:
-
| val | Value for the variant. |
| GridClientVariant::GridClientVariant |
( |
double |
val |
) |
|
Constructor with double argument.
- Parameters:
-
| val | Value for the variant. |
| GridClientVariant::GridClientVariant |
( |
float |
val |
) |
|
Constructor with float argument.
- Parameters:
-
| val | Value for the variant. |
| GridClientVariant::GridClientVariant |
( |
const char * |
val |
) |
|
Constructor with string argument. Added const char* explicitly because otherwise it boolean constructor was called.
- Parameters:
-
| val | Value for the variant. |
| GridClientVariant::GridClientVariant |
( |
const std::string & |
val |
) |
|
Constructor with string argument.
- Parameters:
-
| val | Value for the variant. |
| GridClientVariant::GridClientVariant |
( |
const std::wstring & |
val |
) |
|
Constructor with wide string argument.
- Parameters:
-
| val | Value for the variant. |
| GridClientVariant::GridClientVariant |
( |
const std::vector< int8_t > & |
val |
) |
|
Constructor with byte array argument.
- Parameters:
-
| val | Value for the variant. |
| GridClientVariant::GridClientVariant |
( |
const std::vector< GridClientVariant > & |
val |
) |
|
Constructor with variant vector argument.
Constructor with UUID argument.
Copy constructor.
- Parameters:
-
| other | Variant to take value from. |
Member Function Documentation
Method for visitors.
- Parameters:
-
| visitor | Visitor to accept. |
| void GridClientVariant::clear |
( |
|
) |
|
Clears value held (becomes null).
| string GridClientVariant::debugString |
( |
|
) |
const |
Returns debug string that contains type information and value.
- Returns:
- Type and value information.
| bool GridClientVariant::getBool |
( |
|
) |
const |
Returns a boolean value from this variant.
- Returns:
- Value held in the variant.
| vector< int8_t > GridClientVariant::getByteArray |
( |
|
) |
const |
Returns a byte array value from this variant.
- Returns:
- Value held in the variant.
| double GridClientVariant::getDouble |
( |
|
) |
const |
Returns a double value from this variant.
- Returns:
- Value held in the variant.
| float GridClientVariant::getFloat |
( |
|
) |
const |
Returns a float value from this variant.
- Returns:
- Value held in the variant.
| int32_t GridClientVariant::getInt |
( |
|
) |
const |
Returns an int16_t value from this variant.
- Returns:
- Value held in the variant.
| int64_t GridClientVariant::getLong |
( |
|
) |
const |
Returns an int64_t value from this variant.
- Returns:
- Value held in the variant.
| int16_t GridClientVariant::getShort |
( |
|
) |
const |
Returns an int16_t value from this variant.
- Returns:
- Value held in the variant.
| string GridClientVariant::getString |
( |
|
) |
const |
Returns a string value from this variant.
- Returns:
- Value held in the variant.
Returns a UUID value from this variant.
- Returns:
- Value held in the variant.
Returns a variant vector value from this variant.
- Returns:
- Value held in the variant.
| wstring GridClientVariant::getWideString |
( |
|
) |
const |
Returns a wide string value from this variant.
- Returns:
- Value held in the variant.
| bool GridClientVariant::hasAnyValue |
( |
|
) |
const |
Method to check if this variant holds any value.
- Returns:
true if it has a value set, false otherwise.
| bool GridClientVariant::hasBool |
( |
|
) |
const |
Checks if this variant holds a boolean value.
- Returns:
true if value is of boolean type, false otherwise.
| bool GridClientVariant::hasByteArray |
( |
|
) |
const |
Checks if this variant holds a byte array value.
- Returns:
true if value is of byte array type, false otherwise.
| bool GridClientVariant::hasDouble |
( |
|
) |
const |
Checks if this variant holds a double value.
- Returns:
true if value is of double type, false otherwise.
| bool GridClientVariant::hasFloat |
( |
|
) |
const |
Checks if this variant holds a float value.
- Returns:
true if value is of float type, false otherwise.
| bool GridClientVariant::hasInt |
( |
|
) |
const |
Checks if this variant holds an int32_t value.
- Returns:
true if value is of int32_t type, false otherwise.
| bool GridClientVariant::hasLong |
( |
|
) |
const |
Checks if this variant holds an int64_t value.
- Returns:
true if value is of int64_t type, false otherwise.
| bool GridClientVariant::hasShort |
( |
|
) |
const |
Checks if this variant holds an int16_t value.
- Returns:
true if value is of int16_t type, false otherwise.
| bool GridClientVariant::hasString |
( |
|
) |
const |
Checks if this variant holds a string value.
- Returns:
true if value is of string type, false otherwise.
| bool GridClientVariant::hasUuid |
( |
|
) |
const |
Checks if this variant holds a UUID value.
- Returns:
true if value is of UUID type, false otherwise.
| bool GridClientVariant::hasVariantVector |
( |
|
) |
const |
Checks if this variant holds a variant vector value.
- Returns:
true if value is of variant vector type, false otherwise.
| bool GridClientVariant::hasWideString |
( |
|
) |
const |
Checks if this variant holds a wide string value.
- Returns:
true if value is of wide string type, false otherwise.
Comparison operator for variant.
- Parameters:
-
| other | Variant to compare this variant to. |
- Returns:
true if this variant is less than other, false otherwise.
Assignment operator.
- Parameters:
-
| other | Variant to take value from. |
Comparison operator for variant.
- Parameters:
-
| other | Variant to compare this variant to. |
- Returns:
true if this variant equals to the other, false otherwise.
| void GridClientVariant::set |
( |
int16_t |
val |
) |
|
Assigns this variant an int16_t value.
- Parameters:
-
| val | New value for the variant. |
| void GridClientVariant::set |
( |
bool |
val |
) |
|
Assigns this variant a boolean value.
- Parameters:
-
| val | New value for the variant. |
| void GridClientVariant::set |
( |
const char * |
val |
) |
|
Assigns this variant a string value.
- Parameters:
-
| val | New value for the variant. |
| void GridClientVariant::set |
( |
int32_t |
val |
) |
|
Assigns this variant an int32_t value.
- Parameters:
-
| val | New value for the variant. |
| void GridClientVariant::set |
( |
int64_t |
val |
) |
|
Assigns this variant an int64_t value.
- Parameters:
-
| val | New value for the variant. |
| void GridClientVariant::set |
( |
double |
val |
) |
|
Assigns this variant a double value.
- Parameters:
-
| val | New value for the variant. |
Assigns this variant a UUID value.
- Parameters:
-
| val | New value for the variant. |
| void GridClientVariant::set |
( |
float |
val |
) |
|
Assigns this variant a float value.
- Parameters:
-
| val | New value for the variant. |
| void GridClientVariant::set |
( |
const std::string & |
val |
) |
|
Assigns this variant a string value.
- Parameters:
-
| val | New value for the variant. |
| void GridClientVariant::set |
( |
const std::vector< int8_t > & |
val |
) |
|
Assigns this variant a byte array value.
- Parameters:
-
| val | New value for the variant. |
| string GridClientVariant::toString |
( |
|
) |
const |
Converts value contained in variant, to string.
- Returns:
- String representation of the value held.
The documentation for this class was generated from the following files: