Sparksee  6.0.2
ValueArray Class Reference

ValueArray class. More...

Inheritance diagram for ValueArray:
Inheritance graph
Collaboration diagram for ValueArray:
Collaboration graph

Public Member Functions

void Get (int32_t index, Value &value) const throw (sparksee::gdb::WrongArgumentError, sparksee::gdb::AppError)
 Get a Value from the array. More...
 
void Set (int32_t index, const Value &value) throw (sparksee::gdb::WrongArgumentError, sparksee::gdb::AppError)
 Set a Value to a specific array position. More...
 
void Set (const Value &value) throw (sparksee::gdb::WrongArgumentError, sparksee::gdb::AppError)
 Set a Value to the whole array. More...
 
void MakeNull () throw (sparksee::gdb::AppError)
 Sets the attribute array to Null. More...
 
virtual ~ValueArray ()
 Destructor.
 
int32_t Size () const
 Returns the array size.
 
void GetDouble (std::vector< sparksee::gdb::double64_t > &values) const throw (sparksee::gdb::AppError, sparksee::gdb::UnsupportedOperationError)
 Get all the values from this double array. More...
 
void GetDouble (int32_t index, int32_t size, std::vector< sparksee::gdb::double64_t > &values) const throw (sparksee::gdb::WrongArgumentError, sparksee::gdb::UnsupportedOperationError, sparksee::gdb::AppError)
 Get a subset of the values from this double array. More...
 
void SetDouble (const std::vector< sparksee::gdb::double64_t > &values) throw (sparksee::gdb::UnsupportedOperationError, sparksee::gdb::AppError)
 Set all the values of this double array. More...
 
void SetDouble (int32_t index, const std::vector< sparksee::gdb::double64_t > &values) throw (sparksee::gdb::WrongArgumentError, sparksee::gdb::UnsupportedOperationError, sparksee::gdb::AppError)
 Set a subset of the values of this double array. More...
 
void GetInteger (std::vector< sparksee::gdb::int32_t > &values) const throw (sparksee::gdb::AppError, sparksee::gdb::UnsupportedOperationError)
 Get all the values from this int array. More...
 
void GetInteger (int32_t index, int32_t size, std::vector< sparksee::gdb::int32_t > &values) const throw (sparksee::gdb::WrongArgumentError, sparksee::gdb::UnsupportedOperationError, sparksee::gdb::AppError)
 Get a subset of the values from this int array. More...
 
void SetInteger (const std::vector< sparksee::gdb::int32_t > &values) throw (sparksee::gdb::UnsupportedOperationError, sparksee::gdb::AppError)
 Set all the values of this int array. More...
 
void SetInteger (int32_t index, const std::vector< sparksee::gdb::int32_t > &values) throw (sparksee::gdb::WrongArgumentError, sparksee::gdb::UnsupportedOperationError, sparksee::gdb::AppError)
 Set a subset of the values of this int array. More...
 
void GetLong (std::vector< sparksee::gdb::int64_t > &values) const throw (sparksee::gdb::AppError, sparksee::gdb::UnsupportedOperationError)
 Get all the values from this long array. More...
 
void GetLong (int32_t index, int32_t size, std::vector< sparksee::gdb::int64_t > &values) const throw (sparksee::gdb::WrongArgumentError, sparksee::gdb::UnsupportedOperationError, sparksee::gdb::AppError)
 Get a subset of the values from this long array. More...
 
void SetLong (const std::vector< sparksee::gdb::int64_t > &values) throw (sparksee::gdb::UnsupportedOperationError, sparksee::gdb::AppError)
 Set all the values of this long array. More...
 
void SetLong (int32_t index, const std::vector< sparksee::gdb::int64_t > &values) throw (sparksee::gdb::WrongArgumentError, sparksee::gdb::UnsupportedOperationError, sparksee::gdb::AppError)
 Set a subset of the values of this long array. More...
 
void GetBoolean (std::vector< sparksee::gdb::bool_t > &values) const throw (sparksee::gdb::AppError, sparksee::gdb::UnsupportedOperationError)
 Get all the values from this bool array. More...
 
void GetBoolean (int32_t index, int32_t size, std::vector< sparksee::gdb::bool_t > &values) const throw (sparksee::gdb::WrongArgumentError, sparksee::gdb::UnsupportedOperationError, sparksee::gdb::AppError)
 Get a subset of the values from this bool array. More...
 
void SetBoolean (const std::vector< sparksee::gdb::bool_t > &values) throw (sparksee::gdb::UnsupportedOperationError, sparksee::gdb::AppError)
 Set all the values of this bool array. More...
 
void SetBoolean (int32_t index, const std::vector< sparksee::gdb::bool_t > &values) throw (sparksee::gdb::WrongArgumentError, sparksee::gdb::UnsupportedOperationError, sparksee::gdb::AppError)
 Set a subset of the values of this bool array. More...
 
void GetTimestamp (std::vector< sparksee::gdb::int64_t > &values) const throw (sparksee::gdb::AppError, sparksee::gdb::UnsupportedOperationError)
 Get all the values from this timestamp array. More...
 
void GetTimestamp (int32_t index, int32_t size, std::vector< sparksee::gdb::int64_t > &values) const throw (sparksee::gdb::WrongArgumentError, sparksee::gdb::UnsupportedOperationError, sparksee::gdb::AppError)
 Get a subset of the values from this timestamp array. More...
 
void SetTimestamp (const std::vector< sparksee::gdb::int64_t > &values) throw (sparksee::gdb::UnsupportedOperationError, sparksee::gdb::AppError)
 Set all the values of this timestamp array. More...
 
void SetTimestamp (int32_t index, const std::vector< sparksee::gdb::int64_t > &values) throw (sparksee::gdb::WrongArgumentError, sparksee::gdb::UnsupportedOperationError, sparksee::gdb::AppError)
 Set a subset of the values of this timestamp array. More...
 
void GetOID (std::vector< sparksee::gdb::oid_t > &values) const throw (sparksee::gdb::AppError, sparksee::gdb::UnsupportedOperationError)
 Get all the values from this oid array. More...
 
void GetOID (int32_t index, int32_t size, std::vector< sparksee::gdb::oid_t > &values) const throw (sparksee::gdb::WrongArgumentError, sparksee::gdb::UnsupportedOperationError, sparksee::gdb::AppError)
 Get a subset of the values from this oid array. More...
 
void SetOID (const std::vector< sparksee::gdb::oid_t > &values) throw (sparksee::gdb::UnsupportedOperationError, sparksee::gdb::AppError)
 Set all the values of this oid array. More...
 
void SetOID (int32_t index, const std::vector< sparksee::gdb::oid_t > &values) throw (sparksee::gdb::WrongArgumentError, sparksee::gdb::UnsupportedOperationError, sparksee::gdb::AppError)
 Set a subset of the values of this oid array. More...
 

Private Member Functions

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

Friends

class Graph
 

Detailed Description

ValueArray class.

It allows for getting and setting ValueArray attribute values.

It is very important to close the ValueArray once no more get or set operations will be performed.

Creation of a new ValueArray: (i) Set all the ValueArray elements using Graph::SetAttributeArray (ii) perform as many get/set operations as you need to the ValueArray instance. Lastly, (iii) Close the ValueArray

Use of an existing ValueArray: (i) Get a ValueArray instance using Graph::GetAttributeArray (ii) perform as many get/set operations as you need to the ValueArray instance. Lastly, (iii) Close the ValueArray

Check out the 'Attributes and values' section in the SPARKSEE User Manual for more details on this.

Author
Sparsity Technologies http://www.sparsity-technologies.com

Member Function Documentation

void ValueArray::Get ( int32_t  index,
Value value 
) const
throw (sparksee::gdb::WrongArgumentError,
sparksee::gdb::AppError
)

Get a Value from the array.

Parameters
index[in] Position of the element to get [0..N-1]
value[out] Value to get the array element
Exceptions
WrongArgumentErrorIf the index is out of range or the Value not valid
AppErrorIf the ValueArray is not available
void ValueArray::GetBoolean ( std::vector< sparksee::gdb::bool_t > &  values) const
throw (sparksee::gdb::AppError,
sparksee::gdb::UnsupportedOperationError
)

Get all the values from this bool array.

Parameters
values[out] All the values will be returned here
Exceptions
AppErrorIf the ValueArray is not available
UnsupportedOperationErrorIf array DataType is not bool

Referenced by Value::SetNull().

void ValueArray::GetBoolean ( int32_t  index,
int32_t  size,
std::vector< sparksee::gdb::bool_t > &  values 
) const
throw (sparksee::gdb::WrongArgumentError,
sparksee::gdb::UnsupportedOperationError,
sparksee::gdb::AppError
)

Get a subset of the values from this bool array.

Parameters
index[in] Position of the first element to get [0..N-1]
size[in] Number of elements to get [1..N]
values[out] All the requested values will be returned here
Exceptions
WrongArgumentErrorIf the index or size is out of range
UnsupportedOperationErrorIf array DataType is not bool
AppErrorIf the ValueArray is not available
void ValueArray::GetDouble ( std::vector< sparksee::gdb::double64_t > &  values) const
throw (sparksee::gdb::AppError,
sparksee::gdb::UnsupportedOperationError
)

Get all the values from this double array.

Parameters
values[out] All the values will be returned here
Exceptions
AppErrorIf the ValueArray is not available
UnsupportedOperationErrorIf array DataType is not Double

Referenced by Value::SetNull().

void ValueArray::GetDouble ( int32_t  index,
int32_t  size,
std::vector< sparksee::gdb::double64_t > &  values 
) const
throw (sparksee::gdb::WrongArgumentError,
sparksee::gdb::UnsupportedOperationError,
sparksee::gdb::AppError
)

Get a subset of the values from this double array.

Parameters
index[in] Position of the first element to get [0..N-1]
size[in] Number of elements to get [1..N]
values[out] All the requested values will be returned here
Exceptions
WrongArgumentErrorIf the index or size is out of range
UnsupportedOperationErrorIf array DataType is not Double
AppErrorIf the ValueArray is not available
void ValueArray::GetInteger ( std::vector< sparksee::gdb::int32_t > &  values) const
throw (sparksee::gdb::AppError,
sparksee::gdb::UnsupportedOperationError
)

Get all the values from this int array.

Parameters
values[out] All the values will be returned here
Exceptions
AppErrorIf the ValueArray is not available
UnsupportedOperationErrorIf array DataType is not int

Referenced by Value::SetNull().

void ValueArray::GetInteger ( int32_t  index,
int32_t  size,
std::vector< sparksee::gdb::int32_t > &  values 
) const
throw (sparksee::gdb::WrongArgumentError,
sparksee::gdb::UnsupportedOperationError,
sparksee::gdb::AppError
)

Get a subset of the values from this int array.

Parameters
index[in] Position of the first element to get [0..N-1]
size[in] Number of elements to get [1..N]
values[out] All the requested values will be returned here
Exceptions
WrongArgumentErrorIf the index or size is out of range
UnsupportedOperationErrorIf array DataType is not int
AppErrorIf the ValueArray is not available
void ValueArray::GetLong ( std::vector< sparksee::gdb::int64_t > &  values) const
throw (sparksee::gdb::AppError,
sparksee::gdb::UnsupportedOperationError
)

Get all the values from this long array.

Parameters
values[out] All the values will be returned here
Exceptions
AppErrorIf the ValueArray is not available
UnsupportedOperationErrorIf array DataType is not long

Referenced by Value::SetNull().

void ValueArray::GetLong ( int32_t  index,
int32_t  size,
std::vector< sparksee::gdb::int64_t > &  values 
) const
throw (sparksee::gdb::WrongArgumentError,
sparksee::gdb::UnsupportedOperationError,
sparksee::gdb::AppError
)

Get a subset of the values from this long array.

Parameters
index[in] Position of the first element to get [0..N-1]
size[in] Number of elements to get [1..N]
values[out] All the requested values will be returned here
Exceptions
WrongArgumentErrorIf the index or size is out of range
UnsupportedOperationErrorIf array DataType is not long
AppErrorIf the ValueArray is not available
void ValueArray::GetOID ( std::vector< sparksee::gdb::oid_t > &  values) const
throw (sparksee::gdb::AppError,
sparksee::gdb::UnsupportedOperationError
)

Get all the values from this oid array.

Parameters
values[out] All the values will be returned here
Exceptions
AppErrorIf the ValueArray is not available
UnsupportedOperationErrorIf array DataType is not oid

Referenced by Value::SetNull().

void ValueArray::GetOID ( int32_t  index,
int32_t  size,
std::vector< sparksee::gdb::oid_t > &  values 
) const
throw (sparksee::gdb::WrongArgumentError,
sparksee::gdb::UnsupportedOperationError,
sparksee::gdb::AppError
)

Get a subset of the values from this oid array.

Parameters
index[in] Position of the first element to get [0..N-1]
size[in] Number of elements to get [1..N]
values[out] All the requested values will be returned here
Exceptions
WrongArgumentErrorIf the index or size is out of range
UnsupportedOperationErrorIf array DataType is not oid
AppErrorIf the ValueArray is not available
void ValueArray::GetTimestamp ( std::vector< sparksee::gdb::int64_t > &  values) const
throw (sparksee::gdb::AppError,
sparksee::gdb::UnsupportedOperationError
)

Get all the values from this timestamp array.

Parameters
values[out] All the values will be returned here
Exceptions
AppErrorIf the ValueArray is not available
UnsupportedOperationErrorIf array DataType is not timestamp

Referenced by Value::SetNull().

void ValueArray::GetTimestamp ( int32_t  index,
int32_t  size,
std::vector< sparksee::gdb::int64_t > &  values 
) const
throw (sparksee::gdb::WrongArgumentError,
sparksee::gdb::UnsupportedOperationError,
sparksee::gdb::AppError
)

Get a subset of the values from this timestamp array.

Parameters
index[in] Position of the first element to get [0..N-1]
size[in] Number of elements to get [1..N]
values[out] All the requested values will be returned here
Exceptions
WrongArgumentErrorIf the index or size is out of range
UnsupportedOperationErrorIf array DataType is not timestamp
AppErrorIf the ValueArray is not available
void ValueArray::MakeNull ( )
throw (sparksee::gdb::AppError
)

Sets the attribute array to Null.

The ValueArray can not be used after this call.

void ValueArray::Set ( int32_t  index,
const Value value 
)
throw (sparksee::gdb::WrongArgumentError,
sparksee::gdb::AppError
)

Set a Value to a specific array position.

Parameters
index[in] Position of the element to set [0..N-1]
value[in] Value to set in the array element
Exceptions
WrongArgumentErrorIf the index is out of range or the Value not valid
AppErrorIf the ValueArray is not available
void ValueArray::Set ( const Value value)
throw (sparksee::gdb::WrongArgumentError,
sparksee::gdb::AppError
)

Set a Value to the whole array.

Parameters
value[in] Value to set in all the array elements
Exceptions
WrongArgumentErrorIf the Value is not valid
AppErrorIf the ValueArray is not available
void ValueArray::SetBoolean ( const std::vector< sparksee::gdb::bool_t > &  values)
throw (sparksee::gdb::UnsupportedOperationError,
sparksee::gdb::AppError
)

Set all the values of this bool array.

Parameters
values[in] All the values to set
Exceptions
AppErrorIf the ValueArray is not available
UnsupportedOperationErrorIf array DataType is not bool
void ValueArray::SetBoolean ( int32_t  index,
const std::vector< sparksee::gdb::bool_t > &  values 
)
throw (sparksee::gdb::WrongArgumentError,
sparksee::gdb::UnsupportedOperationError,
sparksee::gdb::AppError
)

Set a subset of the values of this bool array.

Parameters
index[in] Position of the first element to set [0..N-1]
values[in] All the values to set
Exceptions
WrongArgumentErrorIf the index or size is out of range
UnsupportedOperationErrorIf array DataType is not bool
AppErrorIf the ValueArray is not available
void ValueArray::SetDouble ( const std::vector< sparksee::gdb::double64_t > &  values)
throw (sparksee::gdb::UnsupportedOperationError,
sparksee::gdb::AppError
)

Set all the values of this double array.

Parameters
values[in] All the values to set
Exceptions
AppErrorIf the ValueArray is not available
UnsupportedOperationErrorIf array DataType is not Double
void ValueArray::SetDouble ( int32_t  index,
const std::vector< sparksee::gdb::double64_t > &  values 
)
throw (sparksee::gdb::WrongArgumentError,
sparksee::gdb::UnsupportedOperationError,
sparksee::gdb::AppError
)

Set a subset of the values of this double array.

Parameters
index[in] Position of the first element to set [0..N-1]
values[in] All the values to set
Exceptions
WrongArgumentErrorIf the index or size is out of range
UnsupportedOperationErrorIf array DataType is not Double
AppErrorIf the ValueArray is not available
void ValueArray::SetInteger ( const std::vector< sparksee::gdb::int32_t > &  values)
throw (sparksee::gdb::UnsupportedOperationError,
sparksee::gdb::AppError
)

Set all the values of this int array.

Parameters
values[in] All the values to set
Exceptions
AppErrorIf the ValueArray is not available
UnsupportedOperationErrorIf array DataType is not int
void ValueArray::SetInteger ( int32_t  index,
const std::vector< sparksee::gdb::int32_t > &  values 
)
throw (sparksee::gdb::WrongArgumentError,
sparksee::gdb::UnsupportedOperationError,
sparksee::gdb::AppError
)

Set a subset of the values of this int array.

Parameters
index[in] Position of the first element to set [0..N-1]
values[in] All the values to set
Exceptions
WrongArgumentErrorIf the index or size is out of range
UnsupportedOperationErrorIf array DataType is not int
AppErrorIf the ValueArray is not available
void ValueArray::SetLong ( const std::vector< sparksee::gdb::int64_t > &  values)
throw (sparksee::gdb::UnsupportedOperationError,
sparksee::gdb::AppError
)

Set all the values of this long array.

Parameters
values[in] All the values to set
Exceptions
AppErrorIf the ValueArray is not available
UnsupportedOperationErrorIf array DataType is not long
void ValueArray::SetLong ( int32_t  index,
const std::vector< sparksee::gdb::int64_t > &  values 
)
throw (sparksee::gdb::WrongArgumentError,
sparksee::gdb::UnsupportedOperationError,
sparksee::gdb::AppError
)

Set a subset of the values of this long array.

Parameters
index[in] Position of the first element to set [0..N-1]
values[in] All the values to set
Exceptions
WrongArgumentErrorIf the index or size is out of range
UnsupportedOperationErrorIf array DataType is not long
AppErrorIf the ValueArray is not available
void ValueArray::SetOID ( const std::vector< sparksee::gdb::oid_t > &  values)
throw (sparksee::gdb::UnsupportedOperationError,
sparksee::gdb::AppError
)

Set all the values of this oid array.

Parameters
values[in] All the values to set
Exceptions
AppErrorIf the ValueArray is not available
UnsupportedOperationErrorIf array DataType is not oid
void ValueArray::SetOID ( int32_t  index,
const std::vector< sparksee::gdb::oid_t > &  values 
)
throw (sparksee::gdb::WrongArgumentError,
sparksee::gdb::UnsupportedOperationError,
sparksee::gdb::AppError
)

Set a subset of the values of this oid array.

Parameters
index[in] Position of the first element to set [0..N-1]
values[in] All the values to set
Exceptions
WrongArgumentErrorIf the index or size is out of range
UnsupportedOperationErrorIf array DataType is not oid
AppErrorIf the ValueArray is not available
void ValueArray::SetTimestamp ( const std::vector< sparksee::gdb::int64_t > &  values)
throw (sparksee::gdb::UnsupportedOperationError,
sparksee::gdb::AppError
)

Set all the values of this timestamp array.

Parameters
values[in] All the values to set
Exceptions
AppErrorIf the ValueArray is not available
UnsupportedOperationErrorIf array DataType is not timestamp
void ValueArray::SetTimestamp ( int32_t  index,
const std::vector< sparksee::gdb::int64_t > &  values 
)
throw (sparksee::gdb::WrongArgumentError,
sparksee::gdb::UnsupportedOperationError,
sparksee::gdb::AppError
)

Set a subset of the values of this timestamp array.

Parameters
index[in] Position of the first element to set [0..N-1]
values[in] All the values to set
Exceptions
WrongArgumentErrorIf the index or size is out of range
UnsupportedOperationErrorIf array DataType is not timestamp
AppErrorIf the ValueArray is not available

The documentation for this class was generated from the following file: