Clingo
Loading...
Searching...
No Matches
CppClingo::Ground::IsBase Concept Reference

Concept for atom bases. More...

#include <matcher.hh>

Concept definition

template<class Base>
concept CppClingo::Ground::IsBase = requires(Base &b) {
b.begin(std::declval<MatcherType>());
b.end(std::declval<MatcherType>());
b.contains(std::declval<typename Base::Key>(), std::declval<MatcherType>());
{ b.nth(std::declval<size_t>()).key() } -> std::same_as<typename Base::Key const &>;
b.update(size_t{0});
{ b.template context<int>() } -> std::same_as<int &>;
} && requires(Base const &b) {
{ b.nth(std::declval<size_t>()).key() } -> std::same_as<typename Base::Key const &>;
}
Concept for atom bases.
Definition matcher.hh:28
Base
The base of a number.
Definition number.hh:17

Detailed Description

Concept for atom bases.

An atom base must support the following:

  • begin and end functions returning offsets for the given generation,
  • a contains function to check if it contains a (ground) atom identified by its key,
  • an n-th function that returns a pair where the first value is the key,
  • and update function to update the current generation,
  • a context function to add arbitrary contexts.