Make enable()/disable() virtual so they can be overridden

Subclasses might want to also see when rules are enabled/disabled.

Signed-off-by: Mark Stemm <mark.stemm@gmail.com>
This commit is contained in:
Mark Stemm
2024-10-09 08:53:28 -07:00
committed by poiana
parent c19b637e36
commit e99b11e793

View File

@@ -85,11 +85,15 @@ public:
return m_rulesets[ruleset_id]->event_codes();
}
void enable(const std::string &pattern, match_type match, uint16_t ruleset_id) override {
virtual void enable(const std::string &pattern,
match_type match,
uint16_t ruleset_id) override {
enable_disable(pattern, match, true, ruleset_id);
}
void disable(const std::string &pattern, match_type match, uint16_t ruleset_id) override {
virtual void disable(const std::string &pattern,
match_type match,
uint16_t ruleset_id) override {
enable_disable(pattern, match, false, ruleset_id);
}