Sparksee  6.0.2
Value Class Reference

Value class. More...

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

Public Member Functions

 Value ()
 Creates a new instance. More...
 
 Value (const Value &value)
 Copy constructor. More...
 
virtual ~Value ()
 Destructor.
 
Valueoperator= (const Value &value)
 Assignment operator. More...
 
bool_t IsNull () const
 Gets if this is a NULL Value. More...
 
void SetNullVoid ()
 Sets the Value to NULL.
 
ValueSetNull ()
 Sets the Value to NULL. More...
 
DataType GetDataType () const
 Gets the DataType. More...
 
bool_t GetBoolean () const
 Gets Boolean Value. More...
 
int32_t GetInteger () const
 Gets Integer Value. More...
 
int64_t GetLong () const
 Gets Long Value. More...
 
double64_t GetDouble () const
 Gets Double Value. More...
 
int64_t GetTimestamp () const
 Gets Timestamp Value. More...
 
const std::wstring & GetString () const
 Gets String Value. More...
 
oid_t GetOID () const
 Gets OID Value. More...
 
void SetBooleanVoid (bool_t value)
 Sets the Value. More...
 
ValueSetBoolean (bool_t value)
 Sets the Value. More...
 
void SetIntegerVoid (int32_t value)
 Sets the Value. More...
 
ValueSetInteger (int32_t value)
 Sets the Value. More...
 
void SetLongVoid (int64_t value)
 Sets the Value. More...
 
ValueSetLong (int64_t value)
 Sets the Value. More...
 
void SetDoubleVoid (double64_t value)
 Sets the Value. More...
 
ValueSetDouble (double64_t value)
 Sets the Value. More...
 
void SetTimestampVoid (int64_t value)
 Sets the Value. More...
 
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. More...
 
ValueSetTimestamp (int64_t value)
 Sets the Value. More...
 
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. More...
 
void SetStringVoid (const std::wstring &value)
 Sets the Value. More...
 
ValueSetString (const std::wstring &value)
 Sets the Value. More...
 
void SetOIDVoid (oid_t value)
 Sets the OID Value. More...
 
ValueSetOID (oid_t value)
 Sets the Value. More...
 
void SetVoid (Value &value)
 Sets the Value. More...
 
ValueSet (Value &value)
 Sets the Value. More...
 
int32_t Compare (const Value &value) const
 Compares with the given Value. More...
 
bool_t Equals (const Value &value) const
 Compares with the given Value. More...
 
std::wstring & ToString (std::wstring &str) const
 Gets a string representation of the Value. More...
 

Static Public Attributes

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

Private Member Functions

sparksee_core::Value * GetHandler ()
 Gets the handled reference. More...
 
const sparksee_core::Value * GetHandler () const
 Gets the handled reference. More...
 
void SetHandler (sparksee_core::Value *h)
 Sets the handled reference. More...
 
void FreeHandler ()
 Frees (deletes) the handled reference.
 

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

Creates a new instance.

It creates a NULL Value.

Value::Value ( const Value value)

Copy constructor.

Parameters
value[in] Value to be copied.

Member Function Documentation

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.
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.
bool_t Value::GetBoolean ( ) const

Gets Boolean Value.

This must be a non-NULL Boolean Value.

Returns
The Boolean Value.
DataType Value::GetDataType ( ) const

Gets the DataType.

Value cannot be NULL.

Returns
The DataType.
double64_t Value::GetDouble ( ) const

Gets Double Value.

This must be a non-NULL Double Value.

Returns
The Double Value.
int32_t Value::GetInteger ( ) const

Gets Integer Value.

This must be a non-NULL Integer Value.

Returns
The Integer Value.
int64_t Value::GetLong ( ) const

Gets Long Value.

This must be a non-NULL Long Value.

Returns
The Long Value.
oid_t Value::GetOID ( ) const

Gets OID Value.

This must be an non-NULL OID Value.

Returns
The OID Value.
const std::wstring& Value::GetString ( ) const

Gets String Value.

This must be a non-NULL String Value.

Returns
The String Value.
int64_t Value::GetTimestamp ( ) const

Gets Timestamp Value.

This must be a non-NULL Timestamp Value.

Returns
The Timestamp Value.
bool_t Value::IsNull ( ) const

Gets if this is a NULL Value.

Returns
TRUE if this is a NULL Value, FALSE otherwise.
Value& Value::operator= ( const Value value)

Assignment operator.

Parameters
value[in] Value to be copied.
Returns
Returns the Value reference.
Value& Value::Set ( Value value)
inline

Sets the Value.

Parameters
value[in] New value.
Returns
The calling instance.
Value& Value::SetBoolean ( bool_t  value)
inline

Sets the Value.

Parameters
value[in] Nex Boolean value.
Returns
The calling instance.
void Value::SetBooleanVoid ( bool_t  value)

Sets the Value.

Parameters
value[in] New Boolean value.
Value& Value::SetDouble ( double64_t  value)
inline

Sets the Value.

Parameters
value[in] New Double value.
Returns
The calling instance.
void Value::SetDoubleVoid ( double64_t  value)

Sets the Value.

Parameters
value[in] New Double value.
Value& Value::SetInteger ( int32_t  value)
inline

Sets the Value.

Parameters
value[in] New Integer value.
Returns
The calling instance.
void Value::SetIntegerVoid ( int32_t  value)

Sets the Value.

Parameters
value[in] New Integer value.
Value& Value::SetLong ( int64_t  value)
inline

Sets the Value.

Parameters
value[in] New Long value.
Returns
The calling instance.
void Value::SetLongVoid ( int64_t  value)

Sets the Value.

Parameters
value[in] New Long value.
Value& Value::SetNull ( )
inline
Value& Value::SetOID ( oid_t  value)
inline

Sets the Value.

Parameters
value[in] New OID Value.
Returns
The calling instance.
void Value::SetOIDVoid ( oid_t  value)

Sets the OID Value.

Parameters
value[in] New OID value.
Value& Value::SetString ( const std::wstring &  value)
inline

Sets the Value.

Parameters
value[in] New String value.
Returns
The calling instance.
void Value::SetStringVoid ( const std::wstring &  value)

Sets the Value.

Parameters
value[in] New String value.
Value& Value::SetTimestamp ( int64_t  value)
inline

Sets the Value.

Parameters
value[in] New Timestamp value.
Returns
The calling instance.
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.
void Value::SetTimestampVoid ( int64_t  value)

Sets the Value.

Parameters
value[in] New Timestamp value.
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]).
void Value::SetVoid ( Value value)
inline

Sets the Value.

Parameters
value[in] New value.

References Handler< T >::GetHandler().

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: