|
| CList (std::list< TermPtr > &elems) |
| Constructs a CList with the given elements.
|
|
std::string | repr () const override |
| Returns a string representation of the list.
|
|
bool | isEqualTo (Term &other) const override |
| Checks if the term is equal to another term.
|
|
bool | isLessThan (Term &other) const override |
| < operator for a CList and a Term
|
|
void | addElement (TermPtr element) |
| Adds an element to the list.
|
|
const std::list< TermPtr > & | getElements () const |
| Returns the elements of the list.
|
|
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.
|
|
Represents a list of terms.
CList objects replace Prolog lists for efficiency. The internal list is mutable, so care must be taken when using CList objects. For example, it might be necessary to copy the list before passing it to a function that might modify it or when binding a variable to a CList object.