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

Method getIndexForRule

src/OpenColorIO/FileRules.cpp:692–706  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

690}
691
692size_t FileRules::getIndexForRule(const char * ruleName) const
693{
694 const size_t numRules = m_impl->m_rules.size();
695 for (size_t idx = 0; idx < numRules; ++idx)
696 {
697 if (0==Platform::Strcasecmp(ruleName, m_impl->m_rules[idx]->getName()))
698 {
699 return idx;
700 }
701 }
702
703 std::ostringstream oss;
704 oss << "File rules: rule name '" << ruleName << "' not found.";
705 throw Exception(oss.str().c_str());
706}
707
708const char * FileRules::getName(size_t ruleIndex) const
709{

Callers 14

_set_valueMethod · 0.45
add_presetMethod · 0.45
move_item_upMethod · 0.45
move_item_downMethod · 0.45
_set_valueMethod · 0.45
addRulesIfNotPresentMethod · 0.45
addRulesAndOverwriteMethod · 0.45
handleRemoveMethod · 0.45
addUniqueViewingRulesFunction · 0.45
processViewingRulesMethod · 0.45
test_insert_removeMethod · 0.45

Calls 3

StrcasecmpFunction · 0.85
sizeMethod · 0.45
getNameMethod · 0.45

Tested by 3

test_insert_removeMethod · 0.36
OCIO_ADD_TESTFunction · 0.36
OCIO_ADD_TESTFunction · 0.36