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

Method getInterchangeAttribute

src/OpenColorIO/Look.cpp:141–162  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

139}
140
141const char * Look::getInterchangeAttribute(const char* attrName) const
142{
143 std::string name = attrName ? attrName : "";
144
145 for (auto& key : knownInterchangeNames)
146 {
147 // do case-insensitive comparison.
148 if (StringUtils::Compare(key, name))
149 {
150 auto it = m_impl->m_interchangeAttribs.find(key);
151 if (it != m_impl->m_interchangeAttribs.end())
152 {
153 return it->second.c_str();
154 }
155 return "";
156 }
157 }
158
159 std::ostringstream oss;
160 oss << "Unknown attribute name '" << name << "'.";
161 throw Exception(oss.str().c_str());
162}
163
164void Look::setInterchangeAttribute(const char* attrName, const char* value)
165{

Callers 8

test_copyMethod · 0.45
test_copyMethod · 0.45
test_copyMethod · 0.45
OCIO_ADD_TESTFunction · 0.45
OCIO_ADD_TESTFunction · 0.45
OCIO_ADD_TESTFunction · 0.45

Calls 2

CompareFunction · 0.85
endMethod · 0.45

Tested by 8

test_copyMethod · 0.36
test_copyMethod · 0.36
test_copyMethod · 0.36
OCIO_ADD_TESTFunction · 0.36
OCIO_ADD_TESTFunction · 0.36
OCIO_ADD_TESTFunction · 0.36