diff --git a/src/Rules.cpp b/src/Rules.cpp index b6b7fcb6..755e363e 100644 --- a/src/Rules.cpp +++ b/src/Rules.cpp @@ -163,6 +163,15 @@ std::vector Rules::all (const std::string& stem) const return items; } +//////////////////////////////////////////////////////////////////////////////// +bool Rules::isRuleType (const std::string& type) const +{ + if (std::find (_rule_types.begin (), _rule_types.end (), type) != _rule_types.end ()) + return true; + + return false; +} + //////////////////////////////////////////////////////////////////////////////// std::string Rules::dump () const { diff --git a/src/Rules.h b/src/Rules.h index 8a241360..26581d35 100644 --- a/src/Rules.h +++ b/src/Rules.h @@ -50,6 +50,7 @@ public: void set (const std::string&, const std::string&); std::vector all (const std::string& stem = "") const; + bool isRuleType (const std::string&) const; std::string dump () const; @@ -66,6 +67,7 @@ private: private: std::string _original_file {}; std::map _settings {}; + std::vector _rule_types {"tags", "reports", "theme", "holidays", "exclusions"}; }; #endif