|
pl_search_cpp 1.4
|
Represents a Prolog atom. More...
#include <patom.hpp>


Public Member Functions | |
| PAtom (const std::string &name) | |
| Constructs a PAtom with the given name. | |
| std::string | getName () const |
| Returns the name of the atom. | |
| std::string | repr () const override |
| Returns a string representation of the atom. | |
| bool | isEqualTo (Term &t) const override |
| Checks if the term is equal to another term. | |
| bool | isLessThan (Term &t) const override |
| < operator for a PAtom and a Term | |
Public Member Functions inherited from pl_search::Term | |
| virtual TermPtr | dereference () |
| Dereferences the term. The default is to return a shared pointer to term itself. | |
| virtual bool | unifyWith (Engine *engine, TermPtr t) |
| A hook for unification of user-defined classes. Only override this method if you want to unify user-defined classes. | |
| virtual bool | is_var () |
| Checks if the term is a variable. | |
| Term () | |
| Default constructor. | |
| virtual | ~Term () |
| Virtual destructor for proper cleanup. | |
Protected Attributes | |
| std::string | name |
| The name of the atom. | |
Additional Inherited Members | |
Protected Member Functions inherited from pl_search::Term | |
| virtual Term * | deref_term () |
| Similar to dereference but returning the "raw" pointer. | |
Represents a Prolog atom.
PAtom objects approximate Prolog atoms. Atoms are immutable and cannot be bound to other terms.
|
inline |
Constructs a PAtom with the given name.
| name | The name of the atom. |
|
inline |
Returns the name of the atom.
|
inlineoverridevirtual |
Checks if the term is equal to another term.
| t | The term to compare to. |
Implements pl_search::Term.
|
overridevirtual |
< operator for a PAtom and a Term
| other | The term being compared |
Implements pl_search::Term.
|
inlineoverridevirtual |
Returns a string representation of the atom.
Reimplemented from pl_search::Term.
|
protected |
The name of the atom.