本文整理汇总了C++中CDrawingObject::SaveXML方法的典型用法代码示例。如果您正苦于以下问题:C++ CDrawingObject::SaveXML方法的具体用法?C++ CDrawingObject::SaveXML怎么用?C++ CDrawingObject::SaveXML使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CDrawingObject
的用法示例。
在下文中一共展示了CDrawingObject::SaveXML方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SaveXML
//-------------------------------------------------------------------------
void CTinyCadDoc::SaveXML(CXMLWriter &xml, drawingCollection &drawing, BOOL Details, BOOL SaveSelect, BOOL SaveResources )
{
// Write the objects to the file
try
{
xml.addTag(GetXMLTag());
// If necessary write the header stamp
if (Details)
{
xml.addTag(_T("NAME"));
xml.addChildData( m_sheet_name );
xml.closeTag();
xml.addTag(_T("DETAILS"));
m_oDetails.WriteXML( xml );
m_snap.SaveXML( xml );
xml.closeTag();
}
if (SaveResources)
{
// Find out which resources are in use
for( drawingIterator i = drawing.begin(); i != drawing.end(); i++ )
{
(*i)->TagResources();
}
// Save the resource details details
theOptions.SaveFontsXML(xml);
theOptions.SaveStylesXML(xml);
theOptions.SaveFillStylesXML(xml);
theOptions.SaveMetaFilesXML(xml);
}
// Only save the symbols if we are not saving
// to a library or the header...
if (Details)
{
theOptions.SaveSymbolsXML(xml);
}
if (Details)
{
theOptions.WriteXML( xml) ;
}
for( drawingIterator i = drawing.begin(); i != drawing.end(); i++ )
{
CDrawingObject* obj = *i;
if (obj->GetType() != xError
&& (Details || !obj->IsConstruction())
&& (!SaveSelect || IsSelected( obj )) )
{
// Now save the actual object data
obj->SaveXML(xml);
}
}
xml.closeTag();
}
catch ( CException *e)
{
// Could not save the file properly
e->ReportError();
e->Delete();
}
}