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

Method Refresh

IntelPresentMon/PresentMonAPIWrapperCommon/EnumMap.cpp:20–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18 }
19
20 void EnumMap::Refresh(const pmapi::intro::Root& introRoot)
21 {
22 using ::pmon::util::str::ToWide;
23 auto& singleton = Get_();
24 std::lock_guard lk{ singleton.mtx_ };
25 for (auto e : introRoot.GetEnums()) {
26 auto pKeys = std::make_shared<KeyMap>(); auto& keys = *pKeys;
27 for (auto k : e.GetKeys()) {
28 keys[k.GetId()] = {
29 .narrowSymbol = k.GetSymbol(),
30 .wideSymbol = ToWide(k.GetSymbol()),
31 .narrowName = k.GetName(),
32 .wideName = ToWide(k.GetName()),
33 .narrowShortName = k.GetShortName(),
34 .wideShortName = ToWide(k.GetShortName()),
35 .narrowDescription = k.GetDescription(),
36 .wideDescription = ToWide(k.GetDescription()),
37 };
38 }
39 singleton.enumMap_[e.GetId()] = std::move(pKeys);
40 }
41 singleton.initialized_ = true;
42 }
43
44 bool EnumMap::Initialized()
45 {

Callers

nothing calls this directly

Calls 8

ToWideFunction · 0.85
GetEnumsMethod · 0.80
GetKeysMethod · 0.80
GetSymbolMethod · 0.80
GetShortNameMethod · 0.80
GetDescriptionMethod · 0.80
GetIdMethod · 0.45
GetNameMethod · 0.45

Tested by

no test coverage detected