cpiElementType

cpiElementType C API コマンド

目的

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

構文

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

パラメーター

returnCode
関数からの戻りコードを受け取ります (出力)。
考えられる戻りコードは以下のとおりです。
  • CCI_SUCCESS
  • CCI_EXCEPTION
  • CCI_INV_ELEMENT_OBJECT
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
C パーサー・ユーティリティー関数
特記事項 | 商標 | ダウンロード | ライブラリー | サポート | フィードバック
Copyright IBM Corporation 1999, 2006 最終更新: 08/21/2006
as08440_