Skip to content
Snippets Groups Projects
Commit 78575d6e authored by Adam Wardynski's avatar Adam Wardynski
Browse files

MatchCondition - ABC for conditions of match operator.

parent ce15b543
Branches
No related merge requests found
#ifndef LIBWCCL_OPS_MATCH_MATCHCONDITION_H
#define LIBWCCL_OPS_MATCH_MATCHCONDITION_H
#include <libwccl/ops/funexeccontext.h>
#include <libwccl/ops/expression.h>
#include <libwccl/ops/match/matchresult.h>
namespace Wccl {
/**
* Abstract base class for conditions of MatchOperator
*/
class MatchCondition : public Expression
{
public:
/**
* @returns Name of the condition.
*/
virtual std::string name() const = 0;
/**
* Applies the condition to the given execution context.
* If match is found, the current iter position "$_" is
* set to position right after the match.
*/
virtual MatchResult apply(boost::shared_ptr<Position> iter_pos, const FunExecContext& context) const = 0;
};
} /* end ns Wccl */
#endif // LIBWCCL_OPS_MATCH_MATCHCONDITION_H
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment