From 77a0e6ee033c498866fbe57a6f4c3d87e9dca64a Mon Sep 17 00:00:00 2001 From: Mark Stemm Date: Wed, 9 Oct 2024 08:53:28 -0700 Subject: [PATCH] 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 --- userspace/engine/indexable_ruleset.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/userspace/engine/indexable_ruleset.h b/userspace/engine/indexable_ruleset.h index fbf6164b360..81d253f7446 100644 --- a/userspace/engine/indexable_ruleset.h +++ b/userspace/engine/indexable_ruleset.h @@ -85,11 +85,15 @@ class indexable_ruleset : public filter_ruleset { 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); }