cpiElementValue グループ

目的

指定した構文エレメントの値を取得するための関数。

構文

CciSize cpiElementBitArrayValue(
  int*            returnCode,
  CciElement*  targetElement,
  const struct CciBitArray* value);
CciBool cpiElementBooleanValue(
  int*            returnCode,
  CciElement*  targetElement);
CciSize cpiElementByteArrayValue(
  int*            returnCode,
  CciElement*  targetElement,
  const struct CciByteArray* value);
CciSize cpiElementCharacterValue(
  int*            returnCode,
  CciElement*  targetElement,
  const CciChar*  value,
  CciSize         length);
struct CciDate cpiElementDateValue(
  int*            returnCode,
  CciElement*  targetElement);
CciSize cpiElementDecimalValue(
  int*            returnCode,
  CciElement*  targetElement,
  const CciChar*  value,
  CciSize         length);
struct CciTimestamp cpiElementGmtTimestampValue(
  int*            returnCode,
  CciElement*  targetElement);
struct CciTime cpiElementGmtTimeValue(
  int*            returnCode,
  CciElement*  targetElement);
CciInt cpiElementIntegerValue(
  int*            returnCode,
  CciElement*  targetElement);
CciReal cpiElementRealValue(
  int*            returnCode,
  CciElement*  targetElement);
struct CciTimestamp cpiElementTimestampValue(
  int*            returnCode,
  CciElement*  targetElement);
struct CciTime cpiElementTimeValue(
  int*            returnCode,
  CciElement*  targetElement);

パラメーター

returnCode
関数からの戻りコードを受け取ります (出力)。
targetElement
ターゲットの構文エレメント・オブジェクトのアドレスを指定します (入力)。
value
構文エレメントの値が保管される出力バッファーのアドレス (入力)。 関係のある関数呼び出しにのみ使用されます。
length
value パラメーターで指定される、文字単位の出力バッファーの長さ (入力)。 関係のある関数呼び出しにのみ使用されます。

戻り値

エレメントの値が戻されます。

たとえば cpiElementCharacterValue または cpiElementDecimalValue などで、 バッファーの大きさが不十分でデータを受け取れない場合、 このデータがバッファーに書き込まれることはありません。 必要なバッファーのサイズが戻り値として渡され、returnCode は CCI_BUFFER_TOO_SMALL に設定されます。

エラーが発生した場合、returnCode がエラーの理由を示します。

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

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

関連資料
cpiElementName
cpiElementType
cpiElementValueValue
パーサー・ユーティリティー関数