IBM Integration Bus, Version 10.0.0.0 Operating Systems: AIX, HP-Itanium, Linux, Solaris, Windows, z/OS


cpiSetNextParserClassName

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

Syntax

void cpiSetNextParserClassName(
  CciParser*   parser,
  CciContext*  context,
  CciChar*     name,
  CciBool      parserType);
 

Parameters

parser
The address of the parser object (input).
context
The address of the context owned by the parser object (input).
name
The name of the next parser as a string of CciChar characters.
parserType
Indicates whether the referenced parser is standard (parserType=0) or non-standard (parserType=non-zero) (input). A standard parser expects the Format field of the preceding header in the chain to contain the name of the parser class that follows. Non-standard parsers expects the Domain field to contain the parser class name.

Return values

None.

Sample

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;
}

as08200_.htm | Last updated 2015-03-27 19:27:21