cpiElementType

cpiElementType C API コマンド

目的

ターゲット構文エレメントのタイプを取得します。 この構文エレメント・タイプは、cniSetElementType または cpiSetElementType を使用して事前に設定されています。

構文

CciElementType cpiElementType(
  int*         returnCode,
  CciElement*  targetElement);

パラメーター

returnCode
関数からの戻りコードを受け取ります (出力)。
targetElement
ターゲットの構文エレメント・オブジェクトのアドレスを指定します (入力)。

戻り値

エレメント・タイプの値が戻されます。 エラーが発生した場合、returnCode がエラーの理由を示します。

サンプル

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

if ((!cpiElementCompleteNext(&rc, element)) &&
      (cpiElementType(&rc, element) == CCI_ELEMENT_TYPE_NAME)) {

    while ((!cpiElementCompleteNext(&rc, element))     &&
           (!cpiFirstChild(&rc, element)) &&
           (pc->iCurrentElement))
    {
      pc->iCurrentElement = parseNextItem(parser, context, pc->iCurrentElement);
    }

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

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

関連資料
cpiElementName
cpiElementValue グループ
cpiElementValueValue
パーサー・ユーティリティー関数