cpiElementValue group
This group of functions retrieve the value of the specified syntax element.
Specify the appropriate function from this group that matches the type of data to be retrieved:
- cpiElementBitArrayValue
- cpiElementBooleanValue
- cpiElementByteArrayValue
- cpiElementCharacterValue
- cpiElementDateValue
- cpiElementDecimalValue
- cpiElementGmtTimestampValue
- cpiElementGmtTimeValue
- cpiElementIntegerValue
- cpiElementRealValue
- cpiElementTimestampValue
- cpiElementTimeValue
Syntax
CciSize cpiElementBitArrayValue(
int* returnCode,
CciElement* targetElement,
const struct CciBitArray* value);
CciBool cpiElementBooleanValue(
int* returnCode,
CciElement* targetElement);
CciSize cpiElementByteArrayValue(
int* returnCode,
CciElement* targetElement,
const struct CciByteArray* value);
CciSize cpiElementCharacterValue(
int* returnCode,
CciElement* targetElement,
const CciChar* value,
CciSize length);
struct CciDate cpiElementDateValue(
int* returnCode,
CciElement* targetElement);
CciSize cpiElementDecimalValue(
int* returnCode,
CciElement* targetElement,
const CciChar* value,
CciSize length);
struct CciTimestamp cpiElementGmtTimestampValue(
int* returnCode,
CciElement* targetElement);
struct CciTime cpiElementGmtTimeValue(
int* returnCode,
CciElement* targetElement);
CciInt cpiElementIntegerValue(
int* returnCode,
CciElement* targetElement);
CciReal cpiElementRealValue(
int* returnCode,
CciElement* targetElement);
struct CciTimestamp cpiElementTimestampValue(
int* returnCode,
CciElement* targetElement);
struct CciTime cpiElementTimeValue(
int* returnCode,
CciElement* targetElement);
Parameters
- returnCode
- Receives the return code from the function (output). Possible return codes are:
- CCI_SUCCESS
- CCI_EXCEPTION
- CCI_INV_ELEMENT_OBJECT
- CCI_INV_DATA_POINTER
- CCI_INV_DATA_BUFLEN
- CCI_INV_BUFFER_TOO_SMALL
- targetElement
- Specifies the address of the target syntax element object (input).
- value
- The address of an output buffer into which the value of the syntax element is stored (input). Used on relevant function calls only.
- length
- The length of the output buffer, in characters, specified by the value parameter (input). Used on relevant function calls only.
Return values
The value of the element is returned.
In some cases, if the buffer is not large enough to receive the data, the data is not written into the buffer. The size of the required buffer is passed as the return value, and returnCode is set to CCI_BUFFER_TOO_SMALL. For example, cpiElementCharacterValue or cpiElementDecimalValue use this technique.
If an error occurs, returnCode indicates the reason for the error.