|
Clingo
|
A base for conditional literals. More...
#include <condlit.hh>
Public Member Functions | |
| BaseCondLit (MapAtomCondLit &atoms) | |
| Construct the base. | |
| void | add (MapAtomCondLit::iterator it) |
| Add a propagated atom to the base. | |
| auto | index (Key const &key) const -> size_t |
| Map a key to its index in the base. | |
| auto | size () const -> size_t |
| Get the number of atoms in the base. | |
| auto | nth (size_t i) const -> MapAtomCondLit::const_iterator |
| Get the n-th atom in the base. | |
| auto | nth (size_t i) -> MapAtomCondLit::iterator |
| Get the n-th atom in the base. | |
Public Member Functions inherited from CppClingo::Ground::BaseImpl< Symbol const *, BaseCondLit > | |
| auto | begin (MatcherType type) const -> size_t |
| Get the index of the first atom in the given generation. | |
| auto | end (MatcherType type) const -> size_t |
| Get the index plus one of the last atom in the given generation. | |
| auto | contains (Key const &sym, MatcherType type) const -> std::optional< size_t > |
| Check if the base contains the given atom with in the given generation. | |
| void | update (size_t generation) |
| Update the generation counts. | |
| void | ensure (size_t generation) |
| Ensure that atoms are added to the given generation. | |
| auto | context () -> T & |
| Get the context of the base with the desired type. | |
| void | clear_context () |
| Clear the current context. | |
| auto | has_update () const -> bool |
| Check if the base has an update. | |
Additional Inherited Members | |
Public Types inherited from CppClingo::Ground::BaseImpl< Symbol const *, BaseCondLit > | |
| using | Key = Symbol const * |
| The key identifies an atom and is usually associated with further state. | |
A base for conditional literals.
|
inline |
Construct the base.
The given atoms form the base. They are managed externally and the base just provides a view on them. Atoms must be explicitly added to the view using the add method.