Clingo
|
A matcher that matches only provides one match. More...
#include <matcher.hh>
Public Member Functions | |
OnceMatcher ()=default | |
Construct the matcher. | |
![]() | |
virtual | ~Matcher ()=default |
Destroy the matcher. | |
void | init (InstantiationContext const &ctx, size_t gen) |
Notify that instantiation starts. | |
void | match (EvalContext const &ctx) |
Initialize matching. | |
auto | next (EvalContext const &ctx) -> bool |
Obtain the next match. | |
void | print (std::ostream &out) const |
Print the matcher to the given stream. | |
auto | type () const -> MatcherType |
Get the type of the matcher. | |
A matcher that matches only provides one match.
By default, it provides exactly one match. Its do_once method can be overridden to restrict matches further.