Gets the value object from the specified syntax element. This value object is opaque in that it cannot be interrogated. It can be used to set or derive the value of one element from another, without knowing its type, by using the cpiSetElementValueValue function. This can be used by parsers that override behavior by invoking the implementation functions cpiElementValue and cpiSetElementValue.
const CciElementValue* cpiElementValueValue( int* returnCode, CciElement* targetElement);
The address of the CciElementValue object stored in the specified target syntax element is returned. If an error occurs, zero (CCI_NULL_ADDR) is returned and returnCode indicates the reason for the error.
This example is taken from the sample parser file BipSampPluginParser.c (lines 705 to 725):
const CciElementValue* cpiElementValue( CciParser* parser, CciElement* element ){ CciElement* firstChild; const CciElementValue* value; int rc; if ((cpiElementType(&rc, element) == CCI_ELEMENT_TYPE_VALUE) || (cpiElementType(&rc, element) == CCI_ELEMENT_TYPE_NAME_VALUE)) { value = cpiElementValueValue(&rc, element); } else if (cpiElementType(&rc, element) == CCI_ELEMENT_TYPE_NAME) { firstChild = cniFirstChild(&rc, element); value = cpiElementValueValue(&rc, firstChild); } else { } return(value); }
Related concepts
User-defined parsers
User-defined extensions
Related tasks
Creating a parser in C
Related reference
cpiElementName
cpiElementType
cpiElementValue group
Parser utility functions
Notices |
Trademarks |
Downloads |
Library |
Support |
Feedback
![]() ![]() |
as08460_ |