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

Function AddView

src/OpenColorIO/Display.cpp:51–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51void AddView(ViewVec & views, const char * name, const char * viewTransform,
52 const char * displayColorSpace, const char * looks,
53 const char * rule, const char * description)
54{
55 if (displayColorSpace && 0 == Platform::Strcasecmp(displayColorSpace, OCIO_VIEW_USE_DISPLAY_NAME))
56 {
57 displayColorSpace = OCIO_VIEW_USE_DISPLAY_NAME;
58 }
59 auto view = FindView(views, name);
60 if (view == views.end())
61 {
62 views.push_back(View(name, viewTransform, displayColorSpace, looks, rule, description));
63 }
64 else
65 {
66 (*view).m_viewTransform = viewTransform ? viewTransform : "";
67 (*view).m_colorspace = displayColorSpace ? displayColorSpace : "";
68 (*view).m_looks = looks ? looks : "";
69 (*view).m_rule = rule ? rule : "";
70 (*view).m_description = description ? description : "";
71 }
72}
73
74void ComputeDisplays(StringUtils::StringVec & displayCache,
75 const DisplayMap & displays,

Callers 2

addSharedViewMethod · 0.85
addDisplayViewMethod · 0.85

Calls 5

StrcasecmpFunction · 0.85
FindViewFunction · 0.85
ViewClass · 0.70
endMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected