WebSphere Message Brokers
File: as08200_
Writer: Lorraine Waitt

Reference topic

This build: July 31, 2007 21:37:59

cpiSetNextParserClassName

Purpose

Optional function to advise a parser of the next parser in the chain. It is called during finalize processing, and returns to the user-defined parser a string containing the name of the next parser class in the chain. It allows a parser to take action during the finalize phase to 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 WebSphere Message Broker, 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 that the Format field of the preceding header in the chain will contain the name of the parser class that follows. Non-standard parsers expect that the Domain field will contain the parser class name.

Return values

None.

Sample

This example is taken from the sample parser file BipSampPluginParser.c (lines 763 to 787):

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;
}
Related concepts
User-defined parsers
User-defined extensions overview
Related tasks
Creating a parser in C
Related reference
C parser implementation functions
Notices | Trademarks | Downloads | Library | Support | Feedback

Copyright IBM Corporation 1999, 2007Copyright IBM Corporation 1999, 2007. All Rights Reserved.
This build: July 31, 2007 21:37:59

as08200_ This topic's URL is: