| 89 | |
| 90 | template <class T> |
| 91 | T* getAncestorOfType() { |
| 92 | if (!parent) |
| 93 | return NULL; |
| 94 | T* p = dynamic_cast<T*>(parent); |
| 95 | if (p) |
| 96 | return p; |
| 97 | return parent->getAncestorOfType<T>(); |
| 98 | } |
| 99 | |
| 100 | template <class T> |
| 101 | T* getFirstDescendantOfType() { |
nothing calls this directly
no outgoing calls
no test coverage detected