| 332 | } |
| 333 | |
| 334 | KnobPagePtr |
| 335 | KnobI::getTopLevelPage() const |
| 336 | { |
| 337 | KnobIPtr parentKnob = getParentKnob(); |
| 338 | KnobIPtr parentKnobTmp = parentKnob; |
| 339 | |
| 340 | while (parentKnobTmp) { |
| 341 | KnobIPtr parent = parentKnobTmp->getParentKnob(); |
| 342 | if (!parent) { |
| 343 | break; |
| 344 | } else { |
| 345 | parentKnobTmp = parent; |
| 346 | } |
| 347 | } |
| 348 | |
| 349 | ////find in which page the knob should be |
| 350 | KnobPagePtr isTopLevelParentAPage = std::dynamic_pointer_cast<KnobPage>(parentKnobTmp); |
| 351 | |
| 352 | return isTopLevelParentAPage; |
| 353 | } |
| 354 | |
| 355 | /***********************************KNOB HELPER******************************************/ |
| 356 |
no test coverage detected