From d2f021f8744921eda5a61a00cce43f8fe9d4c362 Mon Sep 17 00:00:00 2001 From: Adam Wardynski <award@.(B-4.4.46a)> Date: Fri, 11 Mar 2011 19:50:07 +0100 Subject: [PATCH] MatchAction - ABC for actions of match rules. --- libwccl/ops/match/matchaction.h | 24 ++++++++++++++++++++++++ libwccl/ops/tagaction.h | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 libwccl/ops/match/matchaction.h diff --git a/libwccl/ops/match/matchaction.h b/libwccl/ops/match/matchaction.h new file mode 100644 index 0000000..507499c --- /dev/null +++ b/libwccl/ops/match/matchaction.h @@ -0,0 +1,24 @@ +#ifndef LIBWCCL_OPS_MATCH_MATCHACTION_H +#define LIBWCCL_OPS_MATCH_MATCHACTION_H + +namespace Wccl { + +/** + * Abstract base class for actions in WCCL match rules + */ +class MatchAction : public Expression +{ +public: + /** + * @returns Name of the action. + */ + virtual std::string name() const = 0; + /** + * Executes the action for the given execution context. + */ + virtual void execute(const ActionExecContext& context) const = 0; +}; + +} /* end ns Wccl */ + +#endif // LIBWCCL_OPS_MATCH_MATCHACTION_H diff --git a/libwccl/ops/tagaction.h b/libwccl/ops/tagaction.h index c41ef95..f30428c 100644 --- a/libwccl/ops/tagaction.h +++ b/libwccl/ops/tagaction.h @@ -8,7 +8,7 @@ namespace Wccl { /** - * Abstract base class for actions in WCCL rules + * Abstract base class for actions in WCCL tagging rules */ class TagAction : public Expression { -- GitLab