This optional function returns the name of the next parser class in the chain.
It is called during finalize processing, and returns to the caller a string that contains the name of the next parser class in the chain. Using this information, a user-defined parser can, during the finalize phase, modify the syntax element tree before the phase that causes serialization of the bit stream.
If you specify the name of a parser supplied with IBM® Integration Bus, you must use the correct class name of the parser.
Defined In | Type | Member |
---|---|---|
CPI_VFT | Optional | iFpSetNextParserClassName |
void cpiSetNextParserClassName(
CciParser* parser,
CciContext* context,
CciChar* name,
CciBool parserType);
None.
This example is taken from the sample parser file BipSampPluginParser.c:
void cpiSetNextParserClassName(
CciParser* parser,
CciContext* context,
CciChar* name,
CciBool isHeaderParser
){
PARSER_CONTEXT_ST* pc = (PARSER_CONTEXT_ST *)context ;
int rc = 0;
/* Save the name in my context */
CciCharNCpy(pc->iNextParserClassName, name, CciCharLen(name));
if (pc->trace) {
fprintf(pc->tracefile, "PLUGIN: <- cpiSetNextParserClassName()\n");
fflush(pc->tracefile);
}
return;
}