| 394 | } |
| 395 | |
| 396 | bool 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 | } |