本文整理汇总了C++中SoNode::removeAuditor方法的典型用法代码示例。如果您正苦于以下问题:C++ SoNode::removeAuditor方法的具体用法?C++ SoNode::removeAuditor怎么用?C++ SoNode::removeAuditor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SoNode
的用法示例。
在下文中一共展示了SoNode::removeAuditor方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: assert
// Store the \a newval node pointer in this field. If \a newval is not
// \c NULL, will add 1 to the reference count of the node.
void
SoSFNode::setValue(SoNode * newval)
{
// Don't use getValue() to find oldptr, since this might trigger a
// recursive evaluation call if the field is connected.
SoNode * oldptr = this->value;
if (oldptr == newval) return;
if (oldptr) {
#ifdef COIN_INTERNAL_SOSFPATH
SoNode * h = oldptr->getHead();
// The path should be audited by us at all times. So don't use
// SoSFPath to wrap SoTempPath or SoLightPath, for instance.
assert(h==this->head && "Path head changed without notification!");
if (h) {
h->removeAuditor(this, SoNotRec::FIELD);
h->unref();
}
#endif // COIN_INTERNAL_SOSFPATH
oldptr->removeAuditor(this, SoNotRec::FIELD);
oldptr->unref();
}
if (newval) {
newval->addAuditor(this, SoNotRec::FIELD);
newval->ref();
#ifdef COIN_INTERNAL_SOSFPATH
this->head = newval->getHead();
if (this->head) {
this->head->addAuditor(this, SoNotRec::FIELD);
this->head->ref();
}
#endif // COIN_INTERNAL_SOSFPATH
}
this->value = newval;
this->valueChanged();
}