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

Method addVirtualDisplayView

src/OpenColorIO/Config.cpp:3840–3874  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3838}
3839
3840void Config::addVirtualDisplayView(const char * view,
3841 const char * viewTransform,
3842 const char * colorSpace,
3843 const char * looks,
3844 const char * rule,
3845 const char * description)
3846{
3847 if (!view || !*view)
3848 {
3849 throw Exception("View could not be added to virtual_display in config: a non-empty view "
3850 "name is needed.");
3851 }
3852
3853 if (!colorSpace || !*colorSpace)
3854 {
3855 throw Exception("View could not be added to virtual_display in config: a non-empty color "
3856 "space name is needed.");
3857 }
3858
3859 ViewVec::const_iterator iter = FindView(getImpl()->m_virtualDisplay.m_views, view);
3860 if (iter != getImpl()->m_virtualDisplay.m_views.end())
3861 {
3862 std::ostringstream oss;
3863 oss << "View could not be added to virtual_display in config: View '"
3864 << view
3865 << "' already exists.";
3866 throw Exception(oss.str().c_str());
3867 }
3868
3869 getImpl()->m_virtualDisplay.m_views.push_back(
3870 View(view, viewTransform, colorSpace, looks, rule, description));
3871
3872 AutoMutex lock(getImpl()->m_cacheidMutex);
3873 getImpl()->resetCacheIDs();
3874}
3875
3876void Config::addVirtualDisplaySharedView(const char * sharedView)
3877{

Callers 7

loadFunction · 0.80
addUniqueVirtualViewsMethod · 0.80
processVirtualDisplayMethod · 0.80
handleRemoveMethod · 0.80
test_virtual_displayMethod · 0.80
OCIO_ADD_TESTFunction · 0.80

Calls 6

FindViewFunction · 0.85
resetCacheIDsMethod · 0.80
ViewClass · 0.70
getImplFunction · 0.50
endMethod · 0.45
push_backMethod · 0.45

Tested by 3

test_virtual_displayMethod · 0.64
OCIO_ADD_TESTFunction · 0.64