Sparksee 6.1.0
Value Class Reference

Value class. More...

#include <Value.h>

Inheritance diagram for Value:
Inheritance graph
Collaboration diagram for Value:
Collaboration graph

Public Member Functions

 Value ()
 Creates a new instance.
 Value (const Value &value)
 Copy constructor.
virtual ~Value ()
 Destructor.
Valueoperator= (const Value &value)
 Assignment operator.
bool_t IsNull () const
 Gets if this is a NULL Value.
void SetNullVoid ()
 Sets the Value to NULL.
ValueSetNull ()
 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.
ValueSetBoolean (bool_t value)
 Sets the Value.
void SetIntegerVoid (int32_t value)
 Sets the Value.
ValueSetInteger (int32_t value)
 Sets the Value.
void SetLongVoid (int64_t value)
 Sets the Value.
ValueSetLong (int64_t value)
 Sets the Value.
void SetDoubleVoid (double64_t value)
 Sets the Value.
ValueSetDouble (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.
ValueSetTimestamp (int64_t value)
 Sets the Value.
ValueSetTimestamp (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.
ValueSetString (const std::wstring &value)
 Sets the Value.
void SetOIDVoid (oid_t value)
 Sets the OID Value.
ValueSetOID (oid_t value)
 Sets the Value.
void SetVoid (Value &value)
 Sets the Value.
ValueSet (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 Public Attributes

static const int32_t MaxLengthString
 Maximum number of characters allowed for a String.

Friends

class Graph
class ValuesIterator
class ResultSet
class Query
class KeyValues
class KeyValue
class ValueArray

Detailed Description

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

Constructor & Destructor Documentation

◆ Value() [1/2]

Value::Value ( )

◆ Value() [2/2]

Value::Value ( const Value & value)

Copy constructor.

Parameters
value[in] Value to be copied.

References Value().

Member Function Documentation

◆ Compare()

int32_t Value::Compare ( const Value & value) const

Compares with the given Value.

It does not work if the given Value objects does not have the same DataType.

Parameters
valueGiven 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()

bool_t Value::Equals ( const Value & value) const

Compares with the given Value.

It does not work if the given Value objects does not have the same DataType.

Parameters
valueGiven 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()

DataType Value::GetDataType ( ) const

Gets the DataType.

Value cannot be NULL.

Returns
The DataType.

◆ GetDouble()

double64_t Value::GetDouble ( ) const

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()

int64_t Value::GetLong ( ) const

Gets Long Value.

This must be a non-NULL Long Value.

Returns
The Long Value.

◆ GetOID()

oid_t Value::GetOID ( ) const

Gets OID Value.

This must be an non-NULL OID Value.

Returns
The OID Value.

◆ 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=()

Value & Value::operator= ( const Value & value)

Assignment operator.

Parameters
value[in] Value to be copied.
Returns
Returns the Value reference.

References Value().

◆ Set()

Value & Value::Set ( Value & value)
inline

Sets the Value.

Parameters
value[in] New value.
Returns
The calling instance.

References SetVoid(), and Value().

◆ SetBoolean()

Value & Value::SetBoolean ( bool_t value)
inline

Sets the Value.

Parameters
value[in] Nex Boolean value.
Returns
The calling instance.

References SetBooleanVoid(), and Value().

◆ SetBooleanVoid()

void Value::SetBooleanVoid ( bool_t value)

Sets the Value.

Parameters
value[in] New Boolean value.

Referenced by SetBoolean().

◆ SetDouble()

Value & Value::SetDouble ( double64_t value)
inline

Sets the Value.

Parameters
value[in] New Double value.
Returns
The calling instance.

References SetDoubleVoid(), and Value().

◆ SetDoubleVoid()

void Value::SetDoubleVoid ( double64_t value)

Sets the Value.

Parameters
value[in] New Double value.

Referenced by SetDouble().

◆ SetInteger()

Value & Value::SetInteger ( int32_t value)
inline

Sets the Value.

Parameters
value[in] New Integer value.
Returns
The calling instance.

References SetIntegerVoid(), and Value().

◆ SetIntegerVoid()

void Value::SetIntegerVoid ( int32_t value)

Sets the Value.

Parameters
value[in] New Integer value.

Referenced by SetInteger().

◆ SetLong()

Value & Value::SetLong ( int64_t value)
inline

Sets the Value.

Parameters
value[in] New Long value.
Returns
The calling instance.

References SetLongVoid(), and Value().

◆ SetLongVoid()

void Value::SetLongVoid ( int64_t value)

Sets the Value.

Parameters
value[in] New Long value.

Referenced by SetLong().

◆ SetNull()

Value & Value::SetNull ( )
inline

Sets the Value to NULL.

Returns
The calling instance.

References SetNullVoid(), and Value().

◆ SetOID()

Value & Value::SetOID ( oid_t value)
inline

Sets the Value.

Parameters
value[in] New OID Value.
Returns
The calling instance.

References SetOIDVoid(), and Value().

◆ SetOIDVoid()

void Value::SetOIDVoid ( oid_t value)

Sets the OID Value.

Parameters
value[in] New OID value.

Referenced by SetOID().

◆ SetString()

Value & Value::SetString ( const std::wstring & value)
inline

Sets the Value.

Parameters
value[in] New String value.
Returns
The calling instance.

References SetStringVoid(), and Value().

◆ SetStringVoid()

void Value::SetStringVoid ( const std::wstring & value)

Sets the Value.

Parameters
value[in] New String value.

Referenced by SetString().

◆ SetTimestamp() [1/2]

Value & Value::SetTimestamp ( int32_t year,
int32_t month,
int32_t day,
int32_t hour,
int32_t minutes,
int32_t seconds,
int32_t millisecs )
inline

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]

Value & Value::SetTimestamp ( int64_t value)
inline

Sets the Value.

Parameters
value[in] New Timestamp value.
Returns
The calling instance.

References SetTimestampVoid(), and Value().

◆ SetTimestampVoid() [1/2]

void Value::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.

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)

Sets the Value.

Parameters
value[in] New Timestamp value.

Referenced by SetTimestamp(), and SetTimestamp().

◆ SetVoid()

void Value::SetVoid ( Value & value)
inline

Sets the Value.

Parameters
value[in] New value.

References SetVoid(), and Value().

Referenced by Set(), and SetVoid().

◆ ToString()

std::wstring & Value::ToString ( std::wstring & str) const

Gets a string representation of the Value.

Parameters
strString 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: