MCPcopy Create free account
hub / github.com/MicrosoftEdge/WebView2Samples / GetComponent

Method GetComponent

SampleApps/WebView2APISample/AppWindow.h:339–349  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

337}
338
339template <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
351template <class ComponentType> ComponentType* AppWindow::GetOrCreateComponent()
352{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected