本文整理汇总了C++中CDrawingObject::LoadXML方法的典型用法代码示例。如果您正苦于以下问题:C++ CDrawingObject::LoadXML方法的具体用法?C++ CDrawingObject::LoadXML怎么用?C++ CDrawingObject::LoadXML使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CDrawingObject
的用法示例。
在下文中一共展示了CDrawingObject::LoadXML方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ReadFileXML
////// Load a design from a file, loaded design will be selected //////
BOOL CTinyCadDoc::ReadFileXML(CXMLReader &xml, BOOL Details, drawingCollection &drawing, BOOL AlreadyStarted)
{
try
{
// Read in the first item...
CString name;
bool sheets = false;
if (!AlreadyStarted)
{
xml.nextTag( name );
if (name == "TinyCADSheets")
{
xml.intoTag();
sheets = true;
// We must search for the first TinyCAD section
while (xml.nextTag( name ) && name != GetXMLTag())
{
}
}
// Check we are at the right point
if (name != GetXMLTag())
{
Message(IDS_ABORTVERSION,MB_ICONEXCLAMATION);
return FALSE;
}
}
BOOL ResetMerge = TRUE;
xml.intoTag();
while ( xml.nextTag( name ) )
{
// Save the old layer setting
CDrawingObject *obj = NULL;
if (name == "DETAILS" )
{
if (Details)
{
GetDetails().ReadXML( xml, m_snap );
}
}
else if (name == "NAME")
{
if (Details)
{
xml.getChildData( m_sheet_name );
}
}
else if (name == "GRID")
{
if (Details)
{
m_snap.LoadXML( xml );
}
}
else if (name == "FONT")
{
if (ResetMerge)
{
theOptions.ResetMerge();
ResetMerge = FALSE;
}
theOptions.LoadFontXML(xml);
}
else if (name == "STYLE")
{
if (ResetMerge)
{
theOptions.ResetMerge();
ResetMerge = FALSE;
}
theOptions.LoadStyleXML(xml);
}
else if (name == "FILL")
{
if (ResetMerge)
{
theOptions.ResetMerge();
ResetMerge = FALSE;
}
theOptions.LoadFillStyleXML(xml);
}
else if (name == "META" || name == "IMAGE")
{
if (ResetMerge)
{
theOptions.ResetMerge();
ResetMerge = FALSE;
}
theOptions.LoadMetaFileXML(xml);
}
else if (name == "SYMBOLDEF")
{
if (ResetMerge)
{
//.........这里部分代码省略.........