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

Method addParameter

src/IECore/CompoundParameter.cpp:280–288  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

278}
279
280void CompoundParameter::addParameter( ParameterPtr parameter )
281{
282 if( m_namesToParameters.find( parameter->internedName() )!=m_namesToParameters.end() )
283 {
284 throw Exception( boost::str( boost::format( "Child parameter named \"%s\" already exists." ) % parameter->name() ) );
285 }
286 m_namesToParameters.insert( ParameterMap::value_type( parameter->internedName(), parameter ) );
287 m_parameters.push_back( parameter );
288}
289
290void CompoundParameter::insertParameter( ParameterPtr parameter, ConstParameterPtr other )
291{

Calls 5

insertMethod · 0.80
strFunction · 0.50
findMethod · 0.45
endMethod · 0.45
nameMethod · 0.45

Tested by 15

testSerialiseAndParseMethod · 0.76
testUseAsKeyMethod · 0.76
testSmartSetValueMethod · 0.76
testParameterPathBugMethod · 0.76
testDerivingInPythonMethod · 0.76
testSerialiseAndParseMethod · 0.76
addInvalidMethod · 0.36