Value class.
More...
#include <Value.h>
|
| | Value () |
| | Creates a new instance.
|
| | Value (const Value &value) |
| | Copy constructor.
|
|
virtual | ~Value () |
| | Destructor.
|
| Value & | operator= (const Value &value) |
| | Assignment operator.
|
| bool_t | IsNull () const |
| | Gets if this is a NULL Value.
|
|
void | SetNullVoid () |
| | Sets the Value to NULL.
|
| Value & | SetNull () |
| | Sets the Value to NULL.
|
| DataType | GetDataType () const |
| | Gets the DataType.
|
| bool_t | GetBoolean () const |
| | Gets Boolean Value.
|
| int32_t | GetInteger () const |
| | Gets Integer Value.
|
| int64_t | GetLong () const |
| | Gets Long Value.
|
| double64_t | GetDouble () const |
| | Gets Double Value.
|
| int64_t | GetTimestamp () const |
| | Gets Timestamp Value.
|
| const std::wstring & | GetString () const |
| | Gets String Value.
|
| oid_t | GetOID () const |
| | Gets OID Value.
|
| void | SetBooleanVoid (bool_t value) |
| | Sets the Value.
|
| Value & | SetBoolean (bool_t value) |
| | Sets the Value.
|
| void | SetIntegerVoid (int32_t value) |
| | Sets the Value.
|
| Value & | SetInteger (int32_t value) |
| | Sets the Value.
|
| void | SetLongVoid (int64_t value) |
| | Sets the Value.
|
| Value & | SetLong (int64_t value) |
| | Sets the Value.
|
| void | SetDoubleVoid (double64_t value) |
| | Sets the Value.
|
| Value & | SetDouble (double64_t value) |
| | Sets the Value.
|
| void | SetTimestampVoid (int64_t value) |
| | Sets the Value.
|
| void | SetTimestampVoid (int32_t year, int32_t month, int32_t day, int32_t hour, int32_t minutes, int32_t seconds, int32_t millisecs) |
| | Sets the Value.
|
| Value & | SetTimestamp (int64_t value) |
| | Sets the Value.
|
| Value & | SetTimestamp (int32_t year, int32_t month, int32_t day, int32_t hour, int32_t minutes, int32_t seconds, int32_t millisecs) |
| | Sets the Value.
|
| void | SetStringVoid (const std::wstring &value) |
| | Sets the Value.
|
| Value & | SetString (const std::wstring &value) |
| | Sets the Value.
|
| void | SetOIDVoid (oid_t value) |
| | Sets the OID Value.
|
| Value & | SetOID (oid_t value) |
| | Sets the Value.
|
| void | SetVoid (Value &value) |
| | Sets the Value.
|
| Value & | Set (Value &value) |
| | Sets the Value.
|
| int32_t | Compare (const Value &value) const |
| | Compares with the given Value.
|
| bool_t | Equals (const Value &value) const |
| | Compares with the given Value.
|
| std::wstring & | ToString (std::wstring &str) const |
| | Gets a string representation of the Value.
|
|
|
static const int32_t | MaxLengthString |
| | Maximum number of characters allowed for a String.
|
|
|
class | Graph |
|
class | ValuesIterator |
|
class | ResultSet |
|
class | Query |
|
class | KeyValues |
|
class | KeyValue |
|
class | ValueArray |
Value class.
It is a container which stores a value and its data type (domain). A Value can be NULL.
- Author
- Sparsity Technologies http://www.sparsity-technologies.com
◆ Value() [1/2]
Creates a new instance.
It creates a NULL Value.
Referenced by Compare(), Equals(), operator=(), Set(), SetBoolean(), SetDouble(), SetInteger(), SetLong(), SetNull(), SetOID(), SetString(), SetTimestamp(), SetTimestamp(), SetVoid(), and Value().
◆ Value() [2/2]
| Value::Value |
( |
const Value & | value | ) |
|
Copy constructor.
- Parameters
-
| value | [in] Value to be copied. |
References Value().
◆ Compare()
Compares with the given Value.
It does not work if the given Value objects does not have the same DataType.
- Parameters
-
| value | Given value to compare to. |
- Returns
- 0 if this Value is equal to the given one; a value less than 0 if this Value is less than the given one; and a value greater than 0 if this Value is greater than the given one.
References Value().
◆ Equals()
Compares with the given Value.
It does not work if the given Value objects does not have the same DataType.
- Parameters
-
| value | Given value to compare to. |
- Returns
- TRUE if this Value is equal to the given one; FALSE otherwise.
References Value().
◆ GetBoolean()
| bool_t Value::GetBoolean |
( |
| ) |
const |
Gets Boolean Value.
This must be a non-NULL Boolean Value.
- Returns
- The Boolean Value.
◆ GetDataType()
◆ GetDouble()
Gets Double Value.
This must be a non-NULL Double Value.
- Returns
- The Double Value.
◆ GetInteger()
| int32_t Value::GetInteger |
( |
| ) |
const |
Gets Integer Value.
This must be a non-NULL Integer Value.
- Returns
- The Integer Value.
◆ GetLong()
Gets Long Value.
This must be a non-NULL Long Value.
- Returns
- The Long Value.
◆ GetOID()
| oid_t Value::GetOID |
( |
| ) |
const |
◆ GetString()
| const std::wstring & Value::GetString |
( |
| ) |
const |
Gets String Value.
This must be a non-NULL String Value.
- Returns
- The String Value.
◆ GetTimestamp()
| int64_t Value::GetTimestamp |
( |
| ) |
const |
Gets Timestamp Value.
This must be a non-NULL Timestamp Value.
- Returns
- The Timestamp Value.
◆ IsNull()
| bool_t Value::IsNull |
( |
| ) |
const |
Gets if this is a NULL Value.
- Returns
- TRUE if this is a NULL Value, FALSE otherwise.
◆ operator=()
Assignment operator.
- Parameters
-
| value | [in] Value to be copied. |
- Returns
- Returns the Value reference.
References Value().
◆ Set()
◆ SetBoolean()
◆ SetBooleanVoid()
| void Value::SetBooleanVoid |
( |
bool_t | value | ) |
|
◆ SetDouble()
◆ SetDoubleVoid()
Sets the Value.
- Parameters
-
| value | [in] New Double value. |
Referenced by SetDouble().
◆ SetInteger()
◆ SetIntegerVoid()
| void Value::SetIntegerVoid |
( |
int32_t | value | ) |
|
◆ SetLong()
◆ SetLongVoid()
| void Value::SetLongVoid |
( |
int64_t | value | ) |
|
Sets the Value.
- Parameters
-
| value | [in] New Long value. |
Referenced by SetLong().
◆ SetNull()
| Value & Value::SetNull |
( |
| ) |
|
|
inline |
◆ SetOID()
◆ SetOIDVoid()
| void Value::SetOIDVoid |
( |
oid_t | value | ) |
|
◆ SetString()
| Value & Value::SetString |
( |
const std::wstring & | value | ) |
|
|
inline |
◆ SetStringVoid()
| void Value::SetStringVoid |
( |
const std::wstring & | value | ) |
|
Sets the Value.
- Parameters
-
| value | [in] New String value. |
Referenced by SetString().
◆ SetTimestamp() [1/2]
Sets the Value.
- Parameters
-
| year | [in] The year (>=1970). |
| month | [in] The month ([1..12]). |
| day | [in] The of the month ([1..31]). |
| hour | [in] The hour ([0..23]). |
| minutes | [in] The minutes ([0..59]). |
| seconds | [in] The seconds ([0..59]). |
| millisecs | [in] The milliseconds ([0..999]). |
- Returns
- The calling instance.
References SetTimestampVoid(), and Value().
◆ SetTimestamp() [2/2]
◆ SetTimestampVoid() [1/2]
Sets the Value.
- Parameters
-
| year | [in] The year (>=1970). |
| month | [in] The month ([1..12]). |
| day | [in] The of the month ([1..31]). |
| hour | [in] The hour ([0..23]). |
| minutes | [in] The minutes ([0..59]). |
| seconds | [in] The seconds ([0..59]). |
| millisecs | [in] The milliseconds ([0..999]). |
◆ SetTimestampVoid() [2/2]
| void Value::SetTimestampVoid |
( |
int64_t | value | ) |
|
◆ SetVoid()
| void Value::SetVoid |
( |
Value & | value | ) |
|
|
inline |
◆ ToString()
| std::wstring & Value::ToString |
( |
std::wstring & | str | ) |
const |
Gets a string representation of the Value.
- Parameters
-
| str | String to be used. It is cleared and set with the string representation of the Value. |
- Returns
- The given string which has been updated.
The documentation for this class was generated from the following file: