本文整理汇总了C++中SoNode::assertAlive方法的典型用法代码示例。如果您正苦于以下问题:C++ SoNode::assertAlive方法的具体用法?C++ SoNode::assertAlive怎么用?C++ SoNode::assertAlive使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SoNode
的用法示例。
在下文中一共展示了SoNode::assertAlive方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: defined
// Override from parent to update our node pointer
// reference. This is necessary so we do the Right Thing with regard
// to the copyconnections flag.
//
// Note that we have to unplug auditing and the reference counter
// addition we made during the copy process.
//
// For reference for future debugging sessions, copying of this field
// goes like this:
//
// - copyFrom() is called (typically from SoFieldData::overlay())
// - copyFrom() calls operator=()
// - operator=() calls setValue()
// - we have a local copy (ie not from SoSubField.h) of setValue()
// that sets up auditing and references the item
//
// <[email protected]>
void
SoSFNode::fixCopy(SbBool copyconnections)
{
SoNode * n = this->getValue();
if (!n) return;
#if COIN_DEBUG
n->assertAlive();
#endif // COIN_DEBUG
// The setValue() call below will automatically de-audit and un-ref
// the old pointer-value reference we have, *before* re-inserting a
// copy.
#if defined(COIN_INTERNAL_SOSFNODE) || defined(COIN_INTERNAL_SOSFENGINE)
SoFieldContainer * fc = SoFieldContainer::findCopy(n, copyconnections);
#if COIN_DEBUG
if (fc) fc->assertAlive();
#endif // COIN_DEBUG
if (fc) this->setValue(coin_assert_cast<SoNode *>(fc));
#endif // COIN_INTERNAL_SOSFNODE || COIN_INTERNAL_SOSFENGINE
#ifdef COIN_INTERNAL_SOSFPATH
this->setValue(n->copy());
#endif // COIN_INTERNAL_SOSFPATH
}