View can be part of the list of views of a display or the list of shared views of a config.
| 21 | |
| 22 | // View can be part of the list of views of a display or the list of shared views of a config. |
| 23 | struct View |
| 24 | { |
| 25 | std::string m_name; |
| 26 | std::string m_viewTransform; // Might be empty. |
| 27 | std::string m_colorspace; |
| 28 | std::string m_looks; // Might be empty. |
| 29 | std::string m_rule; // Might be empty. |
| 30 | std::string m_description; // Might be empty. |
| 31 | |
| 32 | View() = default; |
| 33 | |
| 34 | View(const char * name, |
| 35 | const char * viewTransform, |
| 36 | const char * colorspace, |
| 37 | const char * looks, |
| 38 | const char * rule, |
| 39 | const char * description) |
| 40 | : m_name(name ? name : "") |
| 41 | , m_viewTransform(viewTransform ? viewTransform : "") |
| 42 | , m_colorspace(colorspace ? colorspace : "") |
| 43 | , m_looks(looks ? looks : "") |
| 44 | , m_rule(rule ? rule : "") |
| 45 | , m_description(description ? description : "") |
| 46 | { } |
| 47 | |
| 48 | // Make sure that csname is not null. |
| 49 | static bool UseDisplayName(const char * csname) |
| 50 | { |
| 51 | return csname && 0 == Platform::Strcasecmp(csname, OCIO_VIEW_USE_DISPLAY_NAME); |
| 52 | } |
| 53 | bool useDisplayNameForColorspace() const |
| 54 | { |
| 55 | return UseDisplayName(m_colorspace.c_str()); |
| 56 | } |
| 57 | }; |
| 58 | |
| 59 | typedef std::vector<View> ViewVec; |
| 60 |
no outgoing calls
no test coverage detected