MCPcopy Create free account
hub / github.com/VCVRack/Rack / getAncestorOfType

Method getAncestorOfType

include/widget/Widget.hpp:91–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected