本文整理汇总了C++中iecore::ConstObjectPtr::isNotEqualTo方法的典型用法代码示例。如果您正苦于以下问题:C++ ConstObjectPtr::isNotEqualTo方法的具体用法?C++ ConstObjectPtr::isNotEqualTo怎么用?C++ ConstObjectPtr::isNotEqualTo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类iecore::ConstObjectPtr
的用法示例。
在下文中一共展示了ConstObjectPtr::isNotEqualTo方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setObjectValue
void ValuePlug::setObjectValue( IECore::ConstObjectPtr value )
{
bool haveInput = getInput<Plug>();
if( direction()==In && !haveInput )
{
// input plug with no input connection. there can only ever be a single value,
// which we store directly on the plug. when setting this we need to take care
// of undo, and also of triggering the plugValueSet signal and propagating the
// plugDirtiedSignal.
if( getFlags( ReadOnly ) )
{
// We don't allow static values to be set on read only plugs, so we throw.
// Note that it is perfectly acceptable to call setValue() on a read only
// plug during a computation because the result is not written onto the
// plug itself, so we don't make the check in the case that we call
// receiveResult() below. This allows plugs which have inputs to be made
// read only after having their input set.
throw IECore::Exception( boost::str( boost::format( "Cannot set value for read only plug \"%s\"" ) % fullName() ) );
}
if( value->isNotEqualTo( m_staticValue.get() ) )
{
Action::enact( new SetValueAction( this, value ) );
}
return;
}
// An input plug with an input connection or an output plug. We must be currently in a computation
// triggered by getObjectValue() for a setObjectValue() call to be valid (receiveResult will check this).
// We never trigger plugValueSet or plugDirtiedSignals during computation.
ComputeProcess::receiveResult( this, value );
}