cpiBufferPointer

目的

指定したパーサー・オブジェクトについて、 入力メッセージのビット・ストリーム表現が含まれるバッファーへのポインターを取得します。

構文

const CciByte* cpiBufferPointer(
  int*        returnCode,
  CciParser*  parser);

パラメーター

returnCode
関数からの戻りコードを受け取ります (出力)。
parser
パーサー・オブジェクトのアドレスを指定します (入力)。

戻り値

成功した場合、バッファーのアドレスが戻されます。 正常に実行されない場合は、ゼロの値 (CCI_NULL_ADDR) が戻され、 returnCode がエラーの理由を示します。

サンプル

この例は、サンプル・パーサー・ファイル BipSampPluginParser.c から取られています (428 行から 445 行)。

int cpiParseBufferEncoded(
  CciParser*  parser,
  CciContext* context,
  int         encoding,
  int         ccsid
){
  PARSER_CONTEXT_ST* pc = (PARSER_CONTEXT_ST *)context ;
  int                rc;

  /* Get a pointer to the message buffer and set the offset */
  pc->iBuffer = (void *)cpiBufferPointer(&rc;, parser);
  pc->iIndex = 0;

関連概念
ユーザー定義のパーサー
ユーザー定義拡張機能

関連タスク
C でのパーサーの作成

関連資料
cpiAppendToBuffer
cpiBufferByte
cpiBufferSize
パーサー・ユーティリティー関数