Skip to content

Commit

Permalink
Make enable()/disable() virtual so they can be overridden
Browse files Browse the repository at this point in the history
Subclasses might want to also see when rules are enabled/disabled.

Signed-off-by: Mark Stemm <[email protected]>
  • Loading branch information
mstemm authored and poiana committed Oct 16, 2024
1 parent c19b637 commit e99b11e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions userspace/engine/indexable_ruleset.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit e99b11e

Please sign in to comment.