Skip to content
Snippets Groups Projects
Commit 45e923f3 authored by ilor's avatar ilor
Browse files

Add namespace Matching { to match-related operators (but not to the Match type itself)

parent 6810c379
Branches
No related tags found
No related merge requests found
Showing
with 40 additions and 0 deletions
......@@ -5,6 +5,7 @@
namespace Wccl {
namespace Matching {
void MarkMatch::execute(const ActionExecContext& context) const
{
......@@ -81,4 +82,5 @@ std::ostream& MarkMatch::write_to(std::ostream& os) const
return os;
}
} /* end ns Matching */
} /* end ns Wccl */
......@@ -5,6 +5,7 @@
#include <libwccl/ops/function.h>
namespace Wccl {
namespace Matching {
class MarkMatch : public MatchAction
{
......@@ -82,6 +83,7 @@ private:
const std::string chan_name_;
};
} /* end ns Matching */
} /* end ns Wccl */
#endif // LIBWCCL_OPS_MATCH_ACTIONS_MARKMATCH_H
......@@ -5,6 +5,7 @@
#include <sstream>
namespace Wccl {
namespace Matching {
void UnmarkMatch::execute(const ActionExecContext& context) const
{
......@@ -50,4 +51,5 @@ std::ostream& UnmarkMatch::write_to(std::ostream& os) const
return os << name() << "(" << *match_ << ", \"" << chan_name_ << "\")";
}
} /* end ns Matching */
} /* end ns Wccl */
......@@ -5,6 +5,7 @@
#include <libwccl/ops/function.h>
namespace Wccl {
namespace Matching {
/**
* Action to unmark (delete) an annotation passing through a first
......@@ -53,6 +54,7 @@ private:
const std::string chan_name_;
};
} /* end ns Matching */
} /* end ns Wccl */
#endif // LIBWCCL_OPS_MATCH_ACTIONS_UNMARKMATCH_H
......@@ -5,6 +5,7 @@
#include <libpwrutils/foreach.h>
namespace Wccl {
namespace Matching {
ApplyOperator::ApplyOperator(
const VariableAccessor<Match>& matches,
......@@ -103,4 +104,5 @@ std::ostream& ApplyOperator::write_to(std::ostream &ostream) const
return ostream;
}
} /* end ns Matching */
} /* end ns Wccl */
......@@ -4,6 +4,7 @@
#include <libwccl/ops/functions/bool/predicates/logicalpredicate.h>
namespace Wccl {
namespace Matching {
class ConjConditions;
class MatchAction;
......@@ -62,6 +63,7 @@ private:
const boost::shared_ptr<const std::vector<boost::shared_ptr<Function<Bool> > > > apply_conditions_;
};
} /* end ns Matching */
} /* end ns Wccl */
#endif // LIBWCCL_OPS_MATCH_APPLYOPERATOR_H
......@@ -4,6 +4,7 @@
#include <sstream>
namespace Wccl {
namespace Matching {
ConjConditions::ConjConditions(const std::vector< boost::shared_ptr<const MatchCondition> >& conditions)
: _conditions(conditions)
......@@ -55,4 +56,5 @@ std::ostream& ConjConditions::write_to(std::ostream &ostream) const
return ostream;
}
} /* end ns Matching */
} /* end ns Wccl */
......@@ -4,6 +4,7 @@
#include <libwccl/ops/match/matchcondition.h>
namespace Wccl {
namespace Matching {
/**
* Class that wraps a vector of match conditions to act as
......@@ -44,6 +45,7 @@ private:
const std::vector<boost::shared_ptr<const MatchCondition> > _conditions;
};
} /* end ns Matching */
} /* end ns Wccl */
#endif // LIBWCCL_OPS_MATCH_CONDITIONS_CONJCONDITIONS_H
......@@ -2,6 +2,7 @@
#include <sstream>
namespace Wccl {
namespace Matching {
MatchResult IsAnnotatedAs::apply(const ActionExecContext& context) const
{
......@@ -55,4 +56,5 @@ std::ostream& IsAnnotatedAs::write_to(std::ostream& os) const
return os << name() << "(\"" << chan_name_ << "\")";
}
} /* end ns Matching */
} /* end ns Wccl */
......@@ -5,6 +5,7 @@
#include <libwccl/ops/function.h>
namespace Wccl {
namespace Matching {
/**
* is() match condition - matches an annotation
......@@ -46,6 +47,7 @@ private:
const std::string chan_name_;
};
} /* end ns Matching */
} /* end ns Wccl */
#endif // LIBWCCL_OPS_MATCH_CONDITIONS_ISANNOTATEDAS_H
......@@ -4,6 +4,7 @@
#include <libpwrutils/foreach.h>
namespace Wccl {
namespace Matching {
Longest::Longest(const boost::shared_ptr<std::vector<boost::shared_ptr<ConjConditions> > >& variants)
: _variants(variants)
......@@ -58,4 +59,5 @@ std::ostream& Longest::write_to(std::ostream& ostream) const
return ostream << ")";
}
} /* end ns Matching */
} /* end ns Wccl */
......@@ -4,6 +4,7 @@
#include <libwccl/ops/match/conditions/conjconditions.h>
namespace Wccl {
namespace Matching {
/**
* Class for "longest" condition of match
......@@ -47,6 +48,7 @@ protected:
private:
const boost::shared_ptr<std::vector<boost::shared_ptr<ConjConditions> > > _variants;
};
} /* end ns Matching */
} /* end ns Wccl */
#endif // LIBWCCL_OPS_MATCH_CONDITIONS_LONGEST_H
......@@ -4,6 +4,7 @@
namespace Wccl {
namespace Matching {
MatchResult MatchText::apply(const ActionExecContext& context) const
{
......@@ -46,4 +47,5 @@ std::ostream& MatchText::write_to(std::ostream& os) const
return os << name() << "(\"" << PwrNlp::to_utf8(text_) << "\")";
}
} /* end ns Matching */
} /* end ns Wccl */
......@@ -6,6 +6,7 @@
#include <unicode/unistr.h>
namespace Wccl {
namespace Matching {
/**
* text() match condition - matches a text
*/
......@@ -46,6 +47,7 @@ private:
const UnicodeString text_;
};
} /* end ns Matching */
} /* end ns Wccl */
#endif // LIBWCCL_OPS_MATCH_CONDITIONS_MATCHTEXT_H
......@@ -4,6 +4,7 @@
#include <libpwrutils/foreach.h>
namespace Wccl {
namespace Matching {
OneOf::OneOf(const boost::shared_ptr<std::vector<boost::shared_ptr<ConjConditions> > >& variants)
: _variants(variants)
......@@ -51,4 +52,5 @@ std::ostream& OneOf::write_to(std::ostream& ostream) const
return ostream << ")";
}
} /* end ns Matching */
} /* end ns Wccl */
......@@ -4,6 +4,7 @@
#include <libwccl/ops/match/conditions/conjconditions.h>
namespace Wccl {
namespace Matching {
/**
* Class for "oneof" condition of match
......@@ -46,6 +47,7 @@ protected:
private:
const boost::shared_ptr<std::vector<boost::shared_ptr<ConjConditions> > > _variants;
};
} /* end ns Matching */
} /* end ns Wccl */
#endif // LIBWCCL_OPS_MATCH_CONDITIONS_ONEOF_H
......@@ -3,6 +3,7 @@
#include <sstream>
namespace Wccl {
namespace Matching {
OptionalMatch::OptionalMatch(const boost::shared_ptr<ConjConditions>& conditions)
: _conditions(conditions)
......@@ -33,4 +34,5 @@ std::ostream& OptionalMatch::write_to(std::ostream& ostream) const
return ostream << name() << *_conditions;
}
} /* end ns Matching */
} /* end ns Wccl */
......@@ -4,6 +4,7 @@
#include <libwccl/ops/match/conditions/conjconditions.h>
namespace Wccl {
namespace Matching {
/**
* Class for "optional" condition of match
......@@ -47,6 +48,7 @@ protected:
private:
const boost::shared_ptr<ConjConditions> _conditions;
};
} /* end ns Matching */
} /* end ns Wccl */
#endif // LIBWCCL_OPS_MATCH_CONDITIONS_OPTIONALMATCH_H
......@@ -3,6 +3,7 @@
#include <sstream>
namespace Wccl {
namespace Matching {
RepeatedMatch::RepeatedMatch(const boost::shared_ptr<ConjConditions>& conditions)
: _conditions(conditions)
......@@ -40,4 +41,5 @@ std::ostream& RepeatedMatch::write_to(std::ostream& ostream) const
return ostream << name() << *_conditions;
}
} /* end ns Matching */
} /* end ns Wccl */
......@@ -4,6 +4,7 @@
#include <libwccl/ops/match/conditions/conjconditions.h>
namespace Wccl {
namespace Matching {
/**
* Class for "repeat" condition of match
......@@ -49,6 +50,7 @@ private:
const boost::shared_ptr<ConjConditions> _conditions;
};
} /* end ns Matching */
} /* end ns Wccl */
#endif // LIBWCCL_OPS_MATCH_CONDITIONS_REPEATEDMATCH_H
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment