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

Method removeSharedView

src/OpenColorIO/Config.cpp:3386–3412  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3384}
3385
3386void Config::removeSharedView(const char * view)
3387{
3388 if (!view || !*view)
3389 {
3390 throw Exception("Shared view could not be removed from config, view name has to be "
3391 "a non-empty name.");
3392 }
3393 ViewVec & views = getImpl()->m_sharedViews;
3394 auto viewIt = FindView(views, view);
3395
3396 if (viewIt != views.end())
3397 {
3398 views.erase(viewIt);
3399
3400 getImpl()->m_displayCache.clear();
3401
3402 AutoMutex lock(getImpl()->m_cacheidMutex);
3403 getImpl()->resetCacheIDs();
3404 }
3405 else
3406 {
3407 std::ostringstream os;
3408 os << "Shared view could not be removed from config. A shared view named '"
3409 << view << "' could not be found.";
3410 throw Exception(os.str().c_str());
3411 }
3412}
3413
3414void Config::clearSharedViews()
3415{

Callers 3

_remove_itemMethod · 0.80
test_shared_viewsMethod · 0.80
OCIO_ADD_TESTFunction · 0.80

Calls 6

FindViewFunction · 0.85
eraseMethod · 0.80
resetCacheIDsMethod · 0.80
getImplFunction · 0.50
endMethod · 0.45
clearMethod · 0.45

Tested by 2

test_shared_viewsMethod · 0.64
OCIO_ADD_TESTFunction · 0.64