MCPcopy Create free account
hub / github.com/ImageEngine/cortex / parameterPath

Method parameterPath

src/IECore/CompoundParameter.cpp:396–419  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

394}
395
396bool CompoundParameter::parameterPath( const Parameter *child, std::vector<std::string> &path ) const
397{
398 for( ParameterVector::const_iterator it=m_parameters.begin(); it!=m_parameters.end(); it++ )
399 {
400 if( child==*it )
401 {
402 path.insert( path.begin(), child->name() );
403 return true;
404 }
405 else
406 {
407 const CompoundParameter *c = runTimeCast<const CompoundParameter>( it->get() );
408 if( c )
409 {
410 if( c->parameterPath( child, path ) )
411 {
412 path.insert( path.begin(), c->name() );
413 return true;
414 }
415 }
416 }
417 }
418 return false;
419}

Callers 5

testParameterPathMethod · 0.95
testParameterPathBugMethod · 0.95
testDerivingInPythonMethod · 0.95
operator()Method · 0.80
parameterPathFunction · 0.80

Calls 5

insertMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
nameMethod · 0.45
getMethod · 0.45

Tested by 4

testParameterPathMethod · 0.76
testParameterPathBugMethod · 0.76
testDerivingInPythonMethod · 0.76
operator()Method · 0.64