| 337 | } |
| 338 | |
| 339 | template <class ComponentType> ComponentType* AppWindow::GetComponent() |
| 340 | { |
| 341 | for (auto& component : m_components) |
| 342 | { |
| 343 | if (auto wanted = dynamic_cast<ComponentType*>(component.get())) |
| 344 | { |
| 345 | return wanted; |
| 346 | } |
| 347 | } |
| 348 | return nullptr; |
| 349 | } |
| 350 | |
| 351 | template <class ComponentType> ComponentType* AppWindow::GetOrCreateComponent() |
| 352 | { |
nothing calls this directly
no outgoing calls
no test coverage detected