Ejemplo n.º 1
0
TiXmlNode* TiXmlElement::Clone() const
{
	TiXmlElement* clone = new TiXmlElement( Value() );

	if ( !clone )
		return 0;
	
	CopyToClone( clone );

	// Clone the attributes, then clone the children.
	TiXmlAttribute* attribute = 0;
	for(	attribute = attributeSet.First(); 
			attribute; 
			attribute = attribute->Next() )
	{
		clone->SetAttribute( attribute->Name(), attribute->Value() );
	}
	
	TiXmlNode* node = 0;
	for ( node = firstChild; node; node = node->NextSibling() )
	{
		clone->LinkEndChild( node->Clone() );
	}
	return clone;
}
Ejemplo n.º 2
0
TiXmlNode* TiXmlComment::Clone() const
{
	TiXmlComment* clone = new TiXmlComment();

	if ( !clone )
		return 0;

	CopyToClone( clone );
	return clone;
}
Ejemplo n.º 3
0
TiXmlNode* TiXmlUnknown::Clone() const
{
	TiXmlUnknown* clone = new TiXmlUnknown();

	if ( !clone )
		return 0;

	CopyToClone( clone );
	return clone;
}
Ejemplo n.º 4
0
TiXmlNodeA* TiXmlCommentA::Clone() const
{
	TiXmlCommentA* clone = new TiXmlCommentA();

	if ( !clone )
		return 0;

	CopyToClone( clone );
	return clone;
}
Ejemplo n.º 5
0
TiXmlNodeA* TiXmlUnknownA::Clone() const
{
	TiXmlUnknownA* clone = new TiXmlUnknownA();

	if ( !clone )
		return 0;

	CopyToClone( clone );
	return clone;
}
Ejemplo n.º 6
0
TiXmlNodeA* TiXmlTextA::Clone() const
{
	TiXmlTextA* clone = new TiXmlTextA( "" );

	if ( !clone )
		return 0;

	CopyToClone( clone );
	return clone;
}
Ejemplo n.º 7
0
TiXmlNode* TiXmlText::Clone() const
{	
	TiXmlText* clone = 0;
	clone = new TiXmlText( TEXT("") );

	if ( !clone )
		return 0;

	CopyToClone( clone );
	return clone;
}
Ejemplo n.º 8
0
vsxTiXmlNode* vsxTiXmlText::Clone() const
{	
  vsxTiXmlText* clone = 0;
  clone = new vsxTiXmlText( "" );

	if ( !clone )
		return 0;

	CopyToClone( clone );
	return clone;
}
Ejemplo n.º 9
0
TiXmlNode* TiXmlDeclaration::Clone() const
{	
	TiXmlDeclaration* clone = new TiXmlDeclaration();

	if ( !clone )
		return 0;

	CopyToClone( clone );
	clone->version = version;
	clone->encoding = encoding;
	clone->standalone = standalone;
	return clone;
}
Ejemplo n.º 10
0
TiXmlNodeA* TiXmlDocumentA::Clone() const
{
	TiXmlDocumentA* clone = new TiXmlDocumentA();
	if ( !clone )
		return 0;

	CopyToClone( clone );
	clone->error = error;
	clone->errorDesc = errorDesc.c_str ();

	for ( TiXmlNodeA* node = firstChild; node; node = node->NextSibling() )
	{
		clone->LinkEndChild( node->Clone() );
	}
	return clone;
}
Ejemplo n.º 11
0
TiXmlNode* TiXmlDocument::Clone() const
{
	TiXmlDocument* clone = new TiXmlDocument();
	if ( !clone )
		return 0;

	CopyToClone( clone );
	clone->error = error;
	clone->errorDesc = errorDesc;

	TiXmlNode* node = 0;
	for ( node = firstChild; node; node = node->NextSibling() )
	{
		clone->LinkEndChild( node->Clone() );
	}
	return clone;
}