當前位置: 首頁>>代碼示例>>C++>>正文


C++ CopyToClone函數代碼示例

本文整理匯總了C++中CopyToClone函數的典型用法代碼示例。如果您正苦於以下問題:C++ CopyToClone函數的具體用法?C++ CopyToClone怎麽用?C++ CopyToClone使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了CopyToClone函數的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。

示例1: TiXmlElement

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;
}
開發者ID:chikanamakalaka,項目名稱:pacman-sdl,代碼行數:25,代碼來源:tinyxml.cpp

示例2: TiXmlComment

TiXmlNode* TiXmlComment::Clone() const
{
	TiXmlComment* clone = new TiXmlComment();

	if ( !clone )
		return 0;

	CopyToClone( clone );
	return clone;
}
開發者ID:hhypgfadwr,項目名稱:nppPluginManager,代碼行數:10,代碼來源:tinyxml.cpp

示例3: TiXmlUnknown

TiXmlNode* TiXmlUnknown::Clone() const
{
	TiXmlUnknown* clone = new TiXmlUnknown();

	if ( !clone )
		return 0;

	CopyToClone( clone );
	return clone;
}
開發者ID:hhypgfadwr,項目名稱:nppPluginManager,代碼行數:10,代碼來源:tinyxml.cpp

示例4: TiXmlCommentA

TiXmlNodeA* TiXmlCommentA::Clone() const
{
	TiXmlCommentA* clone = new TiXmlCommentA();

	if ( !clone )
		return 0;

	CopyToClone( clone );
	return clone;
}
開發者ID:A-R-C-A,項目名稱:notepad-plus-plus,代碼行數:10,代碼來源:tinyxmlA.cpp

示例5: TiXmlUnknownA

TiXmlNodeA* TiXmlUnknownA::Clone() const
{
	TiXmlUnknownA* clone = new TiXmlUnknownA();

	if ( !clone )
		return 0;

	CopyToClone( clone );
	return clone;
}
開發者ID:A-R-C-A,項目名稱:notepad-plus-plus,代碼行數:10,代碼來源:tinyxmlA.cpp

示例6: TiXmlTextA

TiXmlNodeA* TiXmlTextA::Clone() const
{
	TiXmlTextA* clone = new TiXmlTextA( "" );

	if ( !clone )
		return 0;

	CopyToClone( clone );
	return clone;
}
開發者ID:bruderstein,項目名稱:npp-community,代碼行數:10,代碼來源:tinyxmlA.cpp

示例7: TiXmlText

TiXmlNode* TiXmlText::Clone() const
{	
	TiXmlText* clone = 0;
	clone = new TiXmlText( TEXT("") );

	if ( !clone )
		return 0;

	CopyToClone( clone );
	return clone;
}
開發者ID:hhypgfadwr,項目名稱:nppPluginManager,代碼行數:11,代碼來源:tinyxml.cpp

示例8: vsxTiXmlText

vsxTiXmlNode* vsxTiXmlText::Clone() const
{	
  vsxTiXmlText* clone = 0;
  clone = new vsxTiXmlText( "" );

	if ( !clone )
		return 0;

	CopyToClone( clone );
	return clone;
}
開發者ID:CJFocke,項目名稱:vsxu,代碼行數:11,代碼來源:tinyxml.cpp

示例9: TiXmlDeclaration

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;
}
開發者ID:hhypgfadwr,項目名稱:nppPluginManager,代碼行數:13,代碼來源:tinyxml.cpp

示例10: TiXmlDocumentA

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;
}
開發者ID:bruderstein,項目名稱:npp-community,代碼行數:16,代碼來源:tinyxmlA.cpp

示例11: TiXmlDocument

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;
}
開發者ID:chikanamakalaka,項目名稱:pacman-sdl,代碼行數:17,代碼來源:tinyxml.cpp


注:本文中的CopyToClone函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。