本文整理汇总了C++中NodeRef::notifyConnectionsDidChange方法的典型用法代码示例。如果您正苦于以下问题:C++ NodeRef::notifyConnectionsDidChange方法的具体用法?C++ NodeRef::notifyConnectionsDidChange怎么用?C++ NodeRef::notifyConnectionsDidChange使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NodeRef
的用法示例。
在下文中一共展示了NodeRef::notifyConnectionsDidChange方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: disconnect
void Node::disconnect( const NodeRef &output )
{
if( ! output )
return;
for( auto weakOutIt = mOutputs.begin(); weakOutIt != mOutputs.end(); ++weakOutIt ) {
if( weakOutIt->lock() == output ) {
mOutputs.erase( weakOutIt );
break;
}
}
output->disconnectInput( shared_from_this() );
output->notifyConnectionsDidChange();
}
示例2: connect
void Node::connect( const NodeRef &output )
{
// make a reference to ourselves so that we aren't deallocated in the case of the last owner
// disconnecting us, which we may need later anyway
NodeRef thisRef = shared_from_this();
if( ! output || ! output->canConnectToInput( thisRef ) )
return;
if( checkCycle( thisRef, output ) )
throw NodeCycleExc( thisRef, output );
mOutputs.push_back( output ); // set output first, so that it is visible in configureConnections()
output->connectInput( thisRef );
output->notifyConnectionsDidChange();
}