MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/OpenColorIO / Get

Method Get

src/OpenColorIO/SystemMonitor.cpp:56–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54{
55
56ConstSystemMonitorsRcPtr SystemMonitors::Get() noexcept
57{
58 static ConstSystemMonitorsRcPtr monitors;
59 static Mutex mutex;
60
61 AutoMutex guard(mutex);
62
63 if (!monitors)
64 {
65 SystemMonitorsRcPtr m = std::make_shared<SystemMonitorsImpl>();
66 try
67 {
68 DynamicPtrCast<SystemMonitorsImpl>(m)->getAllMonitors();
69 }
70 catch (const std::exception & ex)
71 {
72 LogDebug(ex.what());
73 }
74 monitors = m;
75 }
76
77 return monitors;
78}
79
80bool SystemMonitorsImpl::isSupported() const noexcept
81{

Callers

nothing calls this directly

Calls 2

LogDebugFunction · 0.85
getAllMonitorsMethod · 0.45

Tested by

no test coverage detected