|
pl_search_cpp 1.4
|
Represents a Prolog float. More...
#include <pfloat.hpp>


Public Member Functions | |
| PFloat (double value) | |
| Constructs a PFloat with the given value. | |
| std::string | repr () const override |
| Returns a string representation of the float. | |
| bool | isEqualTo (Term &t) const override |
| Checks if the term is equal to another term. | |
| bool | isLessThan (Term &t) const override |
| < operator for a PFloat and a Term | |
| double | getValue () const |
| Returns the value of the float. | |
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 | |
| double | value |
| The value of the float. | |
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 float.
PFloat objects approximate Prolog floats. Floats are immutable and cannot be bound to other terms.
|
inline |
Constructs a PFloat with the given value.
| value | The value of the float. |
|
inline |
Returns the value of the float.
|
inlineoverridevirtual |
Checks if the term is equal to another term.
| t | The term to compare to. |
Implements pl_search::Term.
|
overridevirtual |
< operator for a PFloat and a Term
| other | The term being compared |
Implements pl_search::Term.
|
inlineoverridevirtual |
Returns a string representation of the float.
Reimplemented from pl_search::Term.
|
protected |
The value of the float.