Clingo
|
Class to provide access to symbolic atoms. More...
#include <base.hh>
Public Member Functions | |
Atom (clingo_atom_base_t const *base, size_t index) | |
Construct an atom from its C representation. | |
auto | literal () const -> ProgramLiteral |
Get the program literal of the atom. | |
auto | symbol () const -> Symbol |
Get the atom's symbol. | |
auto | hash () const noexcept -> size_t |
Get the header of the atom. | |
Friends | |
auto | operator== (Atom const &a, Atom const &b) noexcept -> bool |
Compare two atoms for equality. | |
auto | operator<=> (Atom const &a, Atom const &b) noexcept -> std::strong_ordering |
Compare two atoms. | |
Class to provide access to symbolic atoms.
|
inlineexplicit |
Construct an atom from its C representation.
For internal use.
base | the associated base |
index | the index of the atom |
Get the header of the atom.
The hash enables usage in hash tables. There is also an associtaed specialization of std::hash
for this class.
|
inline |
Get the program literal of the atom.
Get the atom's symbol.
Compare two atoms.
a | the first atom |
b | the second atom |
Compare two atoms for equality.
a | the first atom |
b | the second atom |