本文整理汇总了C++中ConstCompoundDataPtr::hash方法的典型用法代码示例。如果您正苦于以下问题:C++ ConstCompoundDataPtr::hash方法的具体用法?C++ ConstCompoundDataPtr::hash怎么用?C++ ConstCompoundDataPtr::hash使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ConstCompoundDataPtr
的用法示例。
在下文中一共展示了ConstCompoundDataPtr::hash方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: hashProcessedAttributes
void SetVisualiser::hashProcessedAttributes( const ScenePath &path, const Gaffer::Context *context, MurmurHash &h ) const
{
ConstCompoundDataPtr outSetsData = outSetsPlug()->getValue();
outSetsData->hash( h );
includeInheritedPlug()->hash( h );
// We also need to consider each of our candidate sets membership
// definition (which we didn't need to when computing outSets).
// outSetsData is map of names -> colors.
ConstInternedStringVectorDataPtr setNames = outSetsData->member<InternedStringVectorData>( "names" );
for( auto &setName : setNames->readable() )
{
h.append( inPlug()->setHash( setName ) );
}
h.append( path.data(), path.size() );
stripeWidthPlug()->hash( h );
}
示例2: hashGlobals
void BranchCreator::hashGlobals( const Gaffer::Context *context, const ScenePlug *parent, IECore::MurmurHash &h ) const
{
ConstCompoundDataPtr mapping = boost::static_pointer_cast<const CompoundData>( mappingPlug()->getValue() );
if( !mapping->readable().size() )
{
h = inPlug()->globalsPlug()->hash();
return;
}
MurmurHash branchGlobalsHash;
hashBranchGlobals( mapping->member<InternedStringVectorData>( g_parentKey )->readable(), context, branchGlobalsHash );
if( branchGlobalsHash == MurmurHash() )
{
h = inPlug()->globalsPlug()->hash();
return;
}
SceneProcessor::hashGlobals( context, parent, h );
inPlug()->globalsPlug()->hash( h );
mapping->hash( h );
h.append( branchGlobalsHash );
}