本文整理汇总了C++中PlugPtr::parentChangedSignal方法的典型用法代码示例。如果您正苦于以下问题:C++ PlugPtr::parentChangedSignal方法的具体用法?C++ PlugPtr::parentChangedSignal怎么用?C++ PlugPtr::parentChangedSignal使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PlugPtr
的用法示例。
在下文中一共展示了PlugPtr::parentChangedSignal方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: addError
void addError( PlugPtr plug, const std::string &error )
{
PlugEntry &entry = m_errors[plug];
entry.error = error;
if( !entry.parentChangedConnection.connected() )
{
entry.parentChangedConnection = plug->parentChangedSignal().connect( boost::bind( &ErrorGadget::parentChanged, this, ::_1 ) );
}
m_image->setVisible( true );
}
示例2: addError
void addError( PlugPtr plug, const std::string &error )
{
PlugEntry &entry = m_errors[plug];
if( entry.error.empty() || !boost::ends_with( error, "Previous attempt to get item failed." ) )
{
// Update the error message. Unfortunately the IECore::LRUCache at the
// heart of Gaffer's caching does not remember the details of exceptions that
// occurred when the cache entry is in error - instead it throws a different
// exception saying "Previous attempt to get item failed.". We ignore these less
// helpful messages in favour of a previous messages if one exists.
/// \todo Improve LRUCache behaviour and remove this workaround.
entry.error = error;
}
if( !entry.parentChangedConnection.connected() )
{
entry.parentChangedConnection = plug->parentChangedSignal().connect( boost::bind( &ErrorGadget::parentChanged, this, ::_1 ) );
}
m_image->setVisible( true );
}