cpiNextParserEncoding

目的

チェーンにある次のパーサー・クラス (もしあれば) によって所有されるデータのエンコードを戻すオプションの関数。

定義されている場所 タイプ メンバー
CPI_VFT オプション iFpNextParserEncoding

構文

int cpiNextParserEncoding(
  CciParser*     parser,
  CciContext*  context);

パラメーター

parser
パーサー・オブジェクトのアドレス (入力)。
context
パーサー・オブジェクトが所有するコンテキストのアドレス (入力)。

戻り値

データのエンコードが戻されます。 これが不明の場合には、ゼロが戻され、デフォルトのエンコードが適用されます。

サンプル

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

int cpiNextParserEncoding(
  CciParser*     parser,
  CciContext* context
){
  PARSER_CONTEXT_ST* pc = (PARSER_CONTEXT_ST *)context ;
  int                encoding = 0;

  if (pc->trace) {
    fprintf(pc->tracefile, "PLUGIN: -> cpiNextParserEncoding() parser=0x%x context=0x%x¥n",
            parser, context);
    fflush(pc->tracefile);
  }

  if (pc->trace) {
    fprintf(pc->tracefile, "PLUGIN: <- cpiNextParserEncoding()¥n");
    fflush(pc->tracefile);
  }

  return encoding;
}
関連概念
ユーザー定義のパーサー
ユーザー定義拡張機能
関連タスク
C でのパーサーの作成
関連資料
cpiNextParserClassName
cpiNextParserCodedCharSetId
C パーサー・インプリメンテーション関数
特記事項 | 商標 | ダウンロード | ライブラリー | サポート | フィードバック
Copyright IBM Corporation 1999, 2006 最終更新: 08/21/2006
as08140_