Value Class Reference
[Gdb]

Value class. More...

Inheritance diagram for Value:

Inheritance graph
Collaboration diagram for Value:

Collaboration graph

List of all members.

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


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

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

Assignment operator.

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

bool_t Value::IsNull (  )  const

Gets if this is a NULL Value.

Returns:
TRUE if this is a NULL Value, FALSE otherwise.

Reimplemented from Handler< sparksee_core::Value >.

Value& Value::SetNull (  )  [inline]

Sets the Value to NULL.

Returns:
The calling instance.

DataType Value::GetDataType (  )  const

Gets the DataType.

Value cannot be NULL.

Returns:
The DataType.

bool_t Value::GetBoolean (  )  const

Gets Boolean Value.

This must be a non-NULL Boolean Value.

Returns:
The Boolean 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.

double64_t Value::GetDouble (  )  const

Gets Double Value.

This must be a non-NULL Double Value.

Returns:
The Double Value.

int64_t Value::GetTimestamp (  )  const

Gets Timestamp Value.

This must be a non-NULL Timestamp Value.

Returns:
The Timestamp Value.

const std::wstring& Value::GetString (  )  const

Gets String Value.

This must be a non-NULL String Value.

Returns:
The String Value.

oid_t Value::GetOID (  )  const

Gets OID Value.

This must be an non-NULL OID Value.

Returns:
The OID Value.

void Value::SetBooleanVoid ( bool_t  value  ) 

Sets the Value.

Parameters:
value [in] New Boolean value.

Value& Value::SetBoolean ( bool_t  value  )  [inline]

Sets the Value.

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

void Value::SetIntegerVoid ( int32_t  value  ) 

Sets the Value.

Parameters:
value [in] New Integer value.

Value& Value::SetInteger ( int32_t  value  )  [inline]

Sets the Value.

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

void Value::SetLongVoid ( int64_t  value  ) 

Sets the Value.

Parameters:
value [in] New Long value.

Value& Value::SetLong ( int64_t  value  )  [inline]

Sets the Value.

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

void Value::SetDoubleVoid ( double64_t  value  ) 

Sets the Value.

Parameters:
value [in] New Double value.

Value& Value::SetDouble ( double64_t  value  )  [inline]

Sets the Value.

Parameters:
value [in] New Double value.
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]).

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::SetStringVoid ( const std::wstring &  value  ) 

Sets the Value.

Parameters:
value [in] New String value.

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

Sets the Value.

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

void Value::SetOIDVoid ( oid_t  value  ) 

Sets the OID Value.

Parameters:
value [in] New OID value.

Value& Value::SetOID ( oid_t  value  )  [inline]

Sets the Value.

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

void Value::SetVoid ( Value value  )  [inline]

Sets the Value.

Parameters:
value [in] New value.

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

Sets the Value.

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

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

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:
value Given value to compare to.
Returns:
TRUE if this Value is equal to the given one; FALSE otherwise.

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:

Generated on Tue Jun 2 13:44:33 2015 for Sparksee by  doxygen 1.5.6