cpiElementCompletePrevious
This function gets the value of the 'previous child complete' flag from the target syntax element. This attribute indicates whether the element tree is complete.
Syntax
CciBool cpiElementCompletePrevious(
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
- targetElement
- Specifies the address of the target syntax element object (input).
Return values
The value of the attribute is returned. If an error occurs, returnCode indicates the reason for the error.
Sample
This example is based on code taken from the sample parser file BipSampPluginParser.c. In the sample file, the code uses cpiElementCompleteNext.
if ((!cpiElementCompletePrevious(&rc, element)) &&
(cpiElementType(&rc, element) == CCI_ELEMENT_TYPE_NAME)) {
while ((!cpiElementCompletePrevious(&rc, element)) &&
(!cpiFirstChild(&rc, element)) &&
(pc->iCurrentElement))
{
pc->iCurrentElement = parsePreviousItem(parser, context, pc->iCurrentElement);
}