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

Method setCustomKey

src/OpenColorIO/FileRules.cpp:803–817  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

801}
802
803void FileRules::setCustomKey(size_t ruleIndex, const char * key, const char * value)
804{
805 m_impl->validatePosition(ruleIndex, Impl::DEFAULT_ALLOWED);
806 try
807 {
808 m_impl->m_rules[ruleIndex]->m_customKeys.set(key, value);
809 }
810 catch (Exception & e)
811 {
812 std::ostringstream oss;
813 oss << "File rules: rule named '" << std::string(m_impl->m_rules[ruleIndex]->getName())
814 << "' error: " << e.what();
815 throw Exception(oss.str().c_str());
816 }
817}
818
819void FileRules::insertRule(size_t ruleIndex, const char * name, const char * colorSpace,
820 const char * pattern, const char * extension)

Callers 12

test_copyMethod · 0.95
test_custom_keysMethod · 0.95
_insert_ruleMethod · 0.45
_insert_ruleMethod · 0.45
loadFunction · 0.45
copyRuleFunction · 0.45
copyViewingRuleFunction · 0.45
test_copyMethod · 0.45
test_custom_keysMethod · 0.45
OCIO_ADD_TESTFunction · 0.45
OCIO_ADD_TESTFunction · 0.45
OCIO_ADD_TESTFunction · 0.45

Calls 3

setMethod · 0.80
validatePositionMethod · 0.45
getNameMethod · 0.45

Tested by 7

test_copyMethod · 0.76
test_custom_keysMethod · 0.76
test_copyMethod · 0.36
test_custom_keysMethod · 0.36
OCIO_ADD_TESTFunction · 0.36
OCIO_ADD_TESTFunction · 0.36
OCIO_ADD_TESTFunction · 0.36