mv_tuple.h File Reference

API function definitions for manipulating tuples. More...

Functions

MVLibExport MVCode_t MV_Tuple_Init (size_t size, MVTuple_t *pTuple)
 Initializes a new tuple of a given size. More...
 
MVLibExport void MV_Tuple_Clear (MVTuple_t *pTuple)
 Destroys the tuple. More...
 
MVLibExport size_t MV_Tuple_GetSize (MVTuple_t tuple)
 Gets the size (i.e. number of elements) of a tuple. More...
 
MVLibExport MVCode_t MV_Tuple_Set (MVTuple_t tuple, size_t index, MVValue_t value)
 Copies a value (scalar or array) into the element of a tuple. More...
 
MVLibExport MVCode_t MV_Tuple_Get (MVTuple_t tuple, size_t index, MVValue_t *pValue)
 Initializes a new value with a copy of a tuple element. More...
 

Detailed Description

API function definitions for manipulating tuples.

Function Documentation

◆ MV_Tuple_Clear()

MVLibExport void MV_Tuple_Clear ( MVTuple_t pTuple)

Destroys the tuple.

Every initialization of a tuple by MV_Tuple_Init() must be balanced by a call to MV_Tuple_Clear().

Parameters
[in,out]pTuplepoints to the handle of the tuple that is destroyed.

◆ MV_Tuple_Get()

MVLibExport MVCode_t MV_Tuple_Get ( MVTuple_t  tuple,
size_t  index,
MVValue_t pValue 
)

Initializes a new value with a copy of a tuple element.

Parameters
[in]tupleis the handle of the tuple whose element is copied.
[in]indexis the index of the element that is copied.
[out]pValuepoints to the handle of the value that is initialized.
Returns

◆ MV_Tuple_GetSize()

MVLibExport size_t MV_Tuple_GetSize ( MVTuple_t  tuple)

Gets the size (i.e. number of elements) of a tuple.

Parameters
[in]tupleis the handle of the tuple that is queried.
Returns
The number of elements in the tuple.

◆ MV_Tuple_Init()

MVLibExport MVCode_t MV_Tuple_Init ( size_t  size,
MVTuple_t pTuple 
)

Initializes a new tuple of a given size.

Parameters
[in]sizeis the number of individual values which are held by the new tuple.
[out]pTuplepoints to the handle of the tuple that is initialized.
Returns

◆ MV_Tuple_Set()

MVLibExport MVCode_t MV_Tuple_Set ( MVTuple_t  tuple,
size_t  index,
MVValue_t  value 
)

Copies a value (scalar or array) into the element of a tuple.

Parameters
[in]tupleis the handle of the tuple whose element is to be set.
[in]indexis the index of the element that is set.
[in]valueis the handle to the value that is copied.
Returns