本文整理汇总了C++中CDesignType::MergeType方法的典型用法代码示例。如果您正苦于以下问题:C++ CDesignType::MergeType方法的具体用法?C++ CDesignType::MergeType怎么用?C++ CDesignType::MergeType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CDesignType
的用法示例。
在下文中一共展示了CDesignType::MergeType方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ResolveOverrides
ALERROR CDesignCollection::ResolveOverrides (SDesignLoadCtx &Ctx)
// ResolveOverrides
//
// Resolve all overrides
{
int i;
// Apply all overrides
for (i = 0; i < m_OverrideTypes.GetCount(); i++)
{
CDesignType *pOverride = m_OverrideTypes.GetEntry(i);
// Find the type that we are trying to override. If we can't find it
// then just continue without error (it means we're trying to override
// a type that doesn't currently exist).
CDesignType *pType = m_AllTypes.FindByUNID(pOverride->GetUNID());
if (pType == NULL)
continue;
// If this type is not already a clone then we need to clone it first
// (Because we never modify the original loaded type).
if (!pType->IsClone())
{
CDesignType *pClone;
pType->CreateClone(&pClone);
m_CreatedTypes.AddEntry(pClone);
pType = pClone;
}
// Now modify the type with the override
pType->MergeType(pOverride);
// Replace the original
m_AllTypes.AddOrReplaceEntry(pType);
}
// Done
return NOERROR;
}