Sparksee 6.1.0
ValueArray Class Reference

ValueArray class. More...

#include <ValueArray.h>

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.
void Set (int32_t index, const Value &value) throw (sparksee::gdb::WrongArgumentError, sparksee::gdb::AppError)
 Set a Value to a specific array position.
void Set (const Value &value) throw (sparksee::gdb::WrongArgumentError, sparksee::gdb::AppError)
 Set a Value to the whole array.
void MakeNull () throw (sparksee::gdb::AppError)
 Sets the attribute array to Null.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.

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

◆ Get()

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

◆ GetBoolean() [1/2]

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

References GetBoolean().

◆ GetBoolean() [2/2]

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

References GetBoolean().

Referenced by GetBoolean(), and GetBoolean().

◆ GetDouble() [1/2]

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

References GetDouble().

◆ GetDouble() [2/2]

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

References GetDouble().

Referenced by GetDouble(), and GetDouble().

◆ GetInteger() [1/2]

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

References GetInteger().

◆ GetInteger() [2/2]

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

References GetInteger().

Referenced by GetInteger(), and GetInteger().

◆ GetLong() [1/2]

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

References GetLong().

◆ GetLong() [2/2]

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

References GetLong().

Referenced by GetLong(), and GetLong().

◆ GetOID() [1/2]

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

References GetOID().

◆ GetOID() [2/2]

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

References GetOID().

Referenced by GetOID(), and GetOID().

◆ GetTimestamp() [1/2]

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

References GetTimestamp().

◆ GetTimestamp() [2/2]

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

References GetTimestamp().

Referenced by GetTimestamp(), and GetTimestamp().

◆ MakeNull()

void ValueArray::MakeNull ( )
throw (sparksee::gdb::AppError )

Sets the attribute array to Null.

The ValueArray can not be used after this call.

◆ Set() [1/2]

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

◆ Set() [2/2]

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

◆ SetBoolean() [1/2]

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

References SetBoolean().

Referenced by SetBoolean(), and SetBoolean().

◆ SetBoolean() [2/2]

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

References SetBoolean().

◆ SetDouble() [1/2]

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

References SetDouble().

Referenced by SetDouble(), and SetDouble().

◆ SetDouble() [2/2]

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

References SetDouble().

◆ SetInteger() [1/2]

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

References SetInteger().

Referenced by SetInteger(), and SetInteger().

◆ SetInteger() [2/2]

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

References SetInteger().

◆ SetLong() [1/2]

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

References SetLong().

Referenced by SetLong(), and SetLong().

◆ SetLong() [2/2]

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

References SetLong().

◆ SetOID() [1/2]

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

References SetOID().

Referenced by SetOID(), and SetOID().

◆ SetOID() [2/2]

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

References END_SPARKSEE_GDB_NAMESPACE, and SetOID().

◆ SetTimestamp() [1/2]

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

References SetTimestamp().

Referenced by SetTimestamp(), and SetTimestamp().

◆ SetTimestamp() [2/2]

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

References SetTimestamp().

◆ Size()

int32_t ValueArray::Size ( ) const

Returns the array size.

Returns
The number of elements in the array.

References Size().

Referenced by Size().


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