コード例 #1
0
ファイル: XmlElement.cpp プロジェクト: ByeDream/pixellight
XmlAttribute *XmlElement::XmlAttributeSet::FindOrCreate(const String &sName)
{
	XmlAttribute *pAttribute = Find(sName);
	if (!pAttribute) {
		pAttribute = new XmlAttribute();
		Add(*pAttribute);
		pAttribute->SetName(sName);
	}
	return pAttribute;
}
コード例 #2
0
ファイル: tinyxml.cpp プロジェクト: oksangman/Ant
XmlAttribute* XmlAttributeSet::FindOrCreate( const char* _name )
{
	XmlAttribute* attrib = Find( _name );
	if ( !attrib ) {
		attrib = new XmlAttribute();
		Add( attrib );
		attrib->SetName( _name );
	}
	return attrib;
}