本文整理汇总了C++中CBaseObject::BaseGetPointerTos方法的典型用法代码示例。如果您正苦于以下问题:C++ CBaseObject::BaseGetPointerTos方法的具体用法?C++ CBaseObject::BaseGetPointerTos怎么用?C++ CBaseObject::BaseGetPointerTos使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CBaseObject
的用法示例。
在下文中一共展示了CBaseObject::BaseGetPointerTos方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: RecurseDumpGraph
void CObjects::RecurseDumpGraph(CChars* psz, CEmbeddedObject* pcIncoming, int iLevel, BOOL bEmbedded)
{
CObject* pcObject;
CArrayTemplateEmbeddedObjectPtr apcTos;
int i;
CEmbeddedObject* pcToObject;
CBaseObject* pcEmbeddedObject;
CBaseObject* pcBaseObject;
if (!pcIncoming->IsBaseObject())
{
return;
}
pcBaseObject = (CBaseObject*)pcIncoming;
psz->Append(' ', iLevel * 3);
if ((pcBaseObject->miFlags & OBJECT_FLAGS_DUMPED) || (pcBaseObject->miDistToRoot < iLevel))
{
psz->Append('*');
pcBaseObject->PrintObject(psz, bEmbedded);
psz->AppendNewLine();
return;
}
else
{
psz->Append(' ');
pcBaseObject->PrintObject(psz, bEmbedded);
psz->AppendNewLine();
}
pcBaseObject->miFlags |= OBJECT_FLAGS_DUMPED;
apcTos.Init(1);
pcBaseObject->BaseGetPointerTos(&apcTos);
for (i = 0; i < apcTos.NumElements(); i++)
{
pcToObject = *apcTos.Get(i);
RecurseDumpGraph(psz, pcToObject, iLevel+1, FALSE);
}
if (pcBaseObject->IsObject())
{
pcObject = (CObject*)pcBaseObject;
for (i = 0; i < pcObject->mapEmbedded.NumElements(); i++)
{
pcEmbeddedObject = *pcObject->mapEmbedded.Get(i);
RecurseDumpGraph(psz, pcEmbeddedObject, iLevel, TRUE);
}
}
apcTos.Kill();
}