Clingo
Loading...
Searching...
No Matches
CppClingo::Ground::BaseCondLitEmpty Class Reference

A base for not yet propagated conditional literals. More...

#include <condlit.hh>

Inheritance diagram for CppClingo::Ground::BaseCondLitEmpty:
CppClingo::Ground::BaseImpl< Symbol const *, BaseCondLitEmpty >

Public Member Functions

 BaseCondLitEmpty (MapAtomCondLit &atoms)
 Construct 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 *, BaseCondLitEmpty >
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 *, BaseCondLitEmpty >
using Key = Symbol const *
 The key identifies an atom and is usually associated with further state.
 

Detailed Description

A base for not yet propagated conditional literals.

Constructor & Destructor Documentation

◆ BaseCondLitEmpty()

CppClingo::Ground::BaseCondLitEmpty::BaseCondLitEmpty ( MapAtomCondLit atoms)
inline

Construct the base.

The given atoms form the base. They are managed externally and the base just provides a view on them.


The documentation for this class was generated from the following file: