MCPcopy Create free account
hub / github.com/GameTechDev/PresentMon / Root

Method Root

IntelPresentMon/PresentMonAPIWrapperCommon/Introspection.cpp:482–508  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

480
481
482 Root::Root(const PM_INTROSPECTION_ROOT* pRoot_, std::function<void(const PM_INTROSPECTION_ROOT*)> deleter_)
483 :
484 pRoot{ pRoot_ },
485 deleter{ std::move(deleter_) }
486 {
487 assert(pRoot);
488 assert(deleter);
489 // building lookup tables for enum/key
490 for (auto e : GetEnums()) {
491 for (auto k : e.GetKeys()) {
492 enumKeyMap[MakeEnumKeyMapKey_(e.GetId(), k.GetId())] = k.GetBasePtr();
493 }
494 enumMap[e.GetId()] = e.GetBasePtr();
495 }
496 // building lookup table for devices
497 for (auto d : GetDevices()) {
498 deviceMap[d.GetId()] = d.GetBasePtr();
499 }
500 // building lookup table for metrics
501 for (auto m : GetMetrics()) {
502 metricMap[m.GetId()] = m.GetBasePtr();
503 }
504 // building lookup table for units
505 for (auto u : GetUnits()) {
506 unitMap[u.GetId()] = u.GetBasePtr();
507 }
508 }
509
510 Root::~Root()
511 {

Callers

nothing calls this directly

Calls 3

GetKeysMethod · 0.80
GetBasePtrMethod · 0.80
GetIdMethod · 0.45

Tested by

no test coverage detected