AddChild
新しい DataRow を指定された親子関係に追加します。 指定された関係が存在する場合、与えられた DataRow は既存の DataRow コレクションに追加されます。 存在しない場合、与えられた DataRow を唯一の要素として新しいコレクションが作成されます。
構文
void addChild(DataRow* dataRow, const char* childName, DataRow* childDataRow)
void addChild(DataRow* dataRow, const UChar* childName, DataRow* childDataRow)
パラメータ
- 親子関係の名前 ("Flood Plain Data"、"References"、"Used By" など)。
- 関係に追加する DataRow。
例
DataRow* dataRow = createDataRow();
DataRow* child1DataRow1 = createDataRow();
setByName(child1DataRow1, "City", "Austin");
setByName(child1DataRow1, "State", "Texas");
addChild( dataRow, "child1", child1DataRow1);
UChar* convertcharToUChar( char* name, UChar* value)
{
int lenName= strlen(name);
u_charsToUChars(name, value, lenName );
value[ lenName]=0;
return value;
} >
DataRow* dataRow = createDataRow();
DataRow* child1DataRow1 = createDataRow();
UChar name[128];
UChar columnValue[128];
setByName(child1DataRow1, convertcharToUChar("City", name),
convertcharToUChar("Austin", columnValue));
setByName(child1DataRow1, convertcharToUChar("State", name),
convertcharToUChar("Texas", columnValue));
addChild( dataRow, "child1", child1DataRow1);