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
パーサー・インプリメンテーション関数