本文整理汇总了C++中NodeGroup::UnlinkNodeFromTree方法的典型用法代码示例。如果您正苦于以下问题:C++ NodeGroup::UnlinkNodeFromTree方法的具体用法?C++ NodeGroup::UnlinkNodeFromTree怎么用?C++ NodeGroup::UnlinkNodeFromTree使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NodeGroup
的用法示例。
在下文中一共展示了NodeGroup::UnlinkNodeFromTree方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: EndImportCustomPrintMark
void PrintMarksComponent::EndImportCustomPrintMark(CamelotRecordHandler *pHandler)
{
PORTNOTETRACE("print","PrintMarksComponent::EndImportCustomPrintMark - do nothing");
#ifndef EXCLUDE_FROM_XARALX
ERROR3IF(CustomCurrentContext == NULL || pNewMark == NULL, "EndImportCustomPrintMark - StartImportCustomMark not called/failed");
// Find the Print mark manager and it's PrintMark cache
PrintMarksMan* pMarksMan = GetApplication()->GetMarksManager();
if (pMarksMan == NULL)
return;
// Restore the previous import context node
pHandler->SetInsertContextNode(CustomPreviousContext);
// Complete the mark and add it to the PMM cache
NodeGroup *Glyph = (NodeGroup *)CustomCurrentContext->FindFirstChild();
ERROR3IF(Glyph == NULL, "Import of custom mark subtree must have failed");
if (Glyph != NULL)
{
ERROR3IF(!Glyph->IsKindOf(CC_RUNTIME_CLASS(NodeGroup)), "Imported print mark doesn't start with a group");
Glyph->UnlinkNodeFromTree(NULL);
UINT32 MarkHandle = pMarksMan->PMMCache.AddNewMark(pNewMark, Glyph);
// Add a reference to the mark to ourself, so the mark is enabled
AddMark(MarkHandle);
}
else
{
// Try not to leak too much!
delete pNewMark;
}
// Tidy up
pNewMark = NULL;
CustomPreviousContext = NULL;
delete CustomCurrentContext;
CustomCurrentContext = NULL;
#endif
}