指定した構文エレメントの値を設定します。
void cpiSetElementValueValue( int* returnCode, CciElement* targetElement, CciElementValue* value);
なし。 エラーが発生した場合、returnCode がエラーの理由を示します。
この例は、サンプル・パーサー・ファイル BipSampPluginParser.c から取られています (675 行から 698 行)。
void cpiSetElementValue( CciParser* parser, CciElement* element, CciElementValue* value ){ CciElement* newElement; int rc; if ((cpiElementType(&rc, element) == CCI_ELEMENT_TYPE_VALUE) || (cpiElementType(&rc, element) == CCI_ELEMENT_TYPE_NAME_VALUE)) { cpiSetElementValueValue(&rc, element, value); } else if (cpiElementType(&rc, element) == CCI_ELEMENT_TYPE_NAME) { /* Create a new value element, add as a first child, and set the value */ newElement = cpiCreateElement(&rc, parser); cpiSetElementType(&rc, newElement, CCI_ELEMENT_TYPE_VALUE); cpiSetElementValueValue(&rc, newElement, value); cpiAddAsFirstChild(&rc, element, newElement); } else { } return; }
関連概念
ユーザー定義のパーサー
ユーザー定義拡張機能
関連タスク
C でのパーサーの作成
関連資料
cpiSetElementName
cpiSetElementType
cpiSetElementValue グループ
パーサー・ユーティリティー関数
注意 |
商標 |
ダウンロード |
ライブラリー |
技術サポート |
フィードバック
![]() ![]() |
as08530_ |