|
Clingo
|
Class to provide access to theory atoms. More...
#include <base.hh>
Public Member Functions | |
| TheoryAtom (clingo_theory_base_t const &base, size_t index) | |
| Constructor from C representation. | |
| auto | name () const -> TheoryTerm |
| Get the name of the theory atom. | |
| auto | elements () const -> TheoryElementVector |
| Get the elements of the theory atom. | |
| auto | literal () const -> ProgramLiteral |
| Get the literal of the theory atom. | |
| auto | guard () const -> std::optional< std::pair< std::string_view, TheoryTerm > > |
| Get the guard of the theory atom. | |
| auto | to_string () const -> std::string |
| Convert the theory atom to a string representation. | |
| auto | hash () const noexcept -> size_t |
| Get the hash of the theory atom. | |
Friends | |
| auto | operator== (TheoryAtom const &a, TheoryAtom const &b) noexcept -> bool |
| Compare two theory atoms for equality. | |
| auto | operator<=> (TheoryAtom const &a, TheoryAtom const &b) noexcept -> std::strong_ordering |
| Compare two theory atoms. | |
Class to provide access to theory atoms.
|
inlineexplicit |
Constructor from C representation.
| base | the C theory base |
| index | the index of the atom |
|
inline |
Get the elements of the theory atom.
TheoryElement
|
inline |
Get the guard of the theory atom.
|
inlinenoexcept |
Get the hash of the theory atom.
The hash enables usage in hash tables. There is also an associtaed specialization of std::hash for this class.
|
inline |
Get the literal of the theory atom.
|
inline |
Get the name of the theory atom.
|
inline |
Convert the theory atom to a string representation.
|
friend |
Compare two theory atoms.
| a | the first atom |
| b | the second atom |
|
friend |
Compare two theory atoms for equality.
| a | the first atom |
| b | the second atom |