diff --git a/libwccl/ops/match/matchresult.h b/libwccl/ops/match/matchresult.h new file mode 100644 index 0000000000000000000000000000000000000000..5b3040d52a638f9f21515a93ddbb40f50072e911 --- /dev/null +++ b/libwccl/ops/match/matchresult.h @@ -0,0 +1,50 @@ +#ifndef LIBWCCL_OPS_MATCH_MATCHRESULT_H +#define LIBWCCL_OPS_MATCH_MATCHRESULT_H + +#include <libwccl/values/bool.h> +#include <libwccl/values/match.h> + +namespace Wccl { + +/** + * Class that represents a result of MatchCondition + */ +class MatchResult +{ +public: + MatchResult(bool matched, const boost::shared_ptr<Match>& match); + MatchResult(); + boost::shared_ptr<Match> get_match() const; + bool matched() const; +private: + bool _matched; + boost::shared_ptr<Match> _match; + +}; + + +// --- Implementation details --- + +inline +MatchResult::MatchResult() : _matched(false), _match() { +} + +inline +MatchResult::MatchResult(bool matched, const boost::shared_ptr<Match>& match) + : _matched(matched), + _match(match) { +} + +inline +bool MatchResult::matched() const { + return _matched; +} + +inline +boost::shared_ptr<Match> MatchResult::get_match() const { + return _match; +} + +} /* end ns Wccl */ + +#endif // LIBWCCL_OPS_MATCH_MATCHRESULT_H