If serialization is not required, for example when the output is based on an input bit stream, and the tree has not been modified, this implementation function will not be invoked by the broker.
If this implementation function is provided in the CPI_VFT structure, neither cpiWriteBuffer() nor cpiWriteBufferEncoded() can be specified, because the cpiDefineParserClass() function will fail with a return code of CCI_INVALID_IMPL_FUNCTION.
Defined In | Type | Member |
CPI_VFT | Conditional | iFpWriteBufferFormatted |
int cpiWriteBufferFormatted( CciParser* parser, CciContext* context, int encoding, int ccsid, CciChar* set, CciChar* type, CciChar* format);
The size in bytes of the data appended to the bit stream in the buffer.
int cpiWriteBufferFormatted( CciParser* parser, CciContext* context, int encoding, int ccsid CciChar* set, CciChar* type, CciChar* format ){ PARSER_CONTEXT_ST* pc = (PARSER_CONTEXT_ST *)context ; int initialSize = 0; int rc = 0; const void* a; CciByte b; initialSize = cpiBufferSize(&rc, parser); a = cpiBufferPointer(&rc, parser); b = cpiBufferByte(&rc, parser, 0); cpiAppendToBuffer(&rc, parser, (char *)"Some test data", 14); return cpiBufferSize(0, parser) - initialSize; }
Notices |
Trademarks |
Downloads |
Library |
Support |
Feedback
![]() ![]() |
as08230_ |