dlvhex
2.5.0
|
#include <include/dlvhex2/ComfortPluginInterface.h>
Public Member Functions | |
void | insert (const ComfortAtom &a) |
Insert atom. | |
void | insert (const ComfortInterpretation &i) |
Insert all atoms from other interpretation. | |
void | remove (const std::set< std::string > &predicates) |
Remove atoms whose predicate matches a string in the given set. | |
void | keep (const std::set< std::string > &predicates) |
Remove atoms whose predicate does not match any string in the given set. | |
void | matchPredicate (const std::string &predicate, ComfortInterpretation &destination) const |
Copy all atoms that match the specified predicate into destination interpretation. | |
void | matchAtom (const ComfortAtom &atom, ComfortInterpretation &destination) const |
Copy all atoms that unify with the specified atom into destination interpretation. | |
ComfortInterpretation | difference (const ComfortInterpretation &subtractThis) const |
Return set difference *this \ subtractThis. | |
std::ostream & | print (std::ostream &o) const |
Print interpretation (using ostream_printable<T>). | |
bool | operator== (const ComfortInterpretation &c2) const |
Check inequality. |
Definition at line 445 of file ComfortPluginInterface.h.
ComfortInterpretation ComfortInterpretation::difference | ( | const ComfortInterpretation & | subtractThis | ) | const |
Return set difference *this \ subtractThis.
subtractThis | Interpretation to remove from this one. |
Definition at line 279 of file ComfortPluginInterface.cpp.
Referenced by operator==().
void ComfortInterpretation::insert | ( | const ComfortAtom & | a | ) |
Insert atom.
a | Atom to insert. |
Definition at line 167 of file ComfortPluginInterface.cpp.
Referenced by insert(), matchAtom(), matchPredicate(), and ComfortPluginAtom::retrieve().
void ComfortInterpretation::insert | ( | const ComfortInterpretation & | i | ) |
Insert all atoms from other interpretation.
i | Interpretation to insert. |
Definition at line 174 of file ComfortPluginInterface.cpp.
References insert().
void ComfortInterpretation::keep | ( | const std::set< std::string > & | predicates | ) |
Remove atoms whose predicate does not match any string in the given set.
predicates | Predicates to search for. |
Definition at line 224 of file ComfortPluginInterface.cpp.
References ComfortTerm::createConstant().
void ComfortInterpretation::matchAtom | ( | const ComfortAtom & | atom, |
ComfortInterpretation & | destination | ||
) | const |
Copy all atoms that unify with the specified atom into destination interpretation.
atom | Atom to search for. |
destination | Target ComfortInterpretation to receive the result. |
Definition at line 265 of file ComfortPluginInterface.cpp.
References insert().
void ComfortInterpretation::matchPredicate | ( | const std::string & | predicate, |
ComfortInterpretation & | destination | ||
) | const |
Copy all atoms that match the specified predicate into destination interpretation.
predicates | Predicates to search for. |
destination | Target ComfortInterpretation to receive the result. |
Definition at line 249 of file ComfortPluginInterface.cpp.
References ComfortTerm::createConstant(), and insert().
Referenced by TestCAtom::retrieve(), and TestSetMinusAtom::retrieve().
bool ComfortInterpretation::operator== | ( | const ComfortInterpretation & | c2 | ) | const |
Check inequality.
c2 | Interpretation to compare to. |
c2
and false otherwise. Definition at line 297 of file ComfortPluginInterface.cpp.
References difference().
std::ostream & ComfortInterpretation::print | ( | std::ostream & | o | ) | const |
Print interpretation (using ostream_printable<T>).
Non-virtual on purpose. (see Printhelpers.h)
o | Stream to print to. |
o
. Definition at line 291 of file ComfortPluginInterface.cpp.
References printrange().
void ComfortInterpretation::remove | ( | const std::set< std::string > & | predicates | ) |
Remove atoms whose predicate matches a string in the given set.
predicates | Predicates to search for. |
Definition at line 199 of file ComfortPluginInterface.cpp.
References ComfortTerm::createConstant().