![]() |
Connect++ 0.4.0
A fast, readable connection prover for first-order logic.
|
Basic representation of functions. More...
#include <Function.hpp>
Public Member Functions | |
Function (const Function &)=delete | |
You want to inforce sharing, so don't allow copies to be made. | |
Function (const Function &&)=delete | |
Function & | operator= (const Function &)=delete |
Function & | operator= (const Function &&)=delete |
string | get_name () const |
Most basic access function. | |
Arity | get_arity () const |
Most basic access function. | |
string | to_string () const |
make a useable string representation. | |
string | make_LaTeX () const |
Make a useable LaTeX version. | |
Private Member Functions | |
Function () | |
Constructors are private as you only want the FunctionIndex to make these, and it's a friend. | |
Function (ID new_id) | |
Function (ID new_id, const string &new_name) | |
Function (ID new_id, const string &new_name, Arity new_arity) | |
Private Attributes | |
ID | id |
string | name |
Arity | arity |
Friends | |
class | FunctionIndex |
ostream & | operator<< (ostream &, const Function &) |
Really only for debugging. | |
Basic representation of functions.
As with Variables, these are ultimately wrapped in a Term. These are also ultimately looked after by a FunctionIndex (which is a friend), so there should not be any need to mess with them directly. (This is why the constructors are private.)
Note that this is somewhat simpler than Variable because you are not dealing with substitutions: you only need id, name and arity.
Definition at line 54 of file Function.hpp.
|
inlineprivate |
Constructors are private as you only want the FunctionIndex to make these, and it's a friend.
Definition at line 63 of file Function.hpp.
|
inlineprivate |
Definition at line 64 of file Function.hpp.
|
inlineprivate |
Definition at line 65 of file Function.hpp.
|
inlineprivate |
Definition at line 67 of file Function.hpp.
|
delete |
You want to inforce sharing, so don't allow copies to be made.
It should never be necessary to make copies, so this is to help the compiler to detect errors.
|
inline |
|
inline |
string Function::make_LaTeX | ( | ) | const |
Make a useable LaTeX version.
Assumes you are typesetting in Math Mode. Makes a limited attempt to deal with special characters in the function name, but if your name is too fancy it's likely to produce something either ugly or unacceptable to LaTeX.
Definition at line 33 of file Function.cpp.
string Function::to_string | ( | ) | const |
make a useable string representation.
Definition at line 28 of file Function.cpp.
|
friend |
Definition at line 70 of file Function.hpp.
|
friend |
Really only for debugging.
Use Function::to_string if you want something pretty.
Definition at line 45 of file Function.cpp.
|
private |
Definition at line 58 of file Function.hpp.
|
private |
Definition at line 56 of file Function.hpp.
|
private |
Definition at line 57 of file Function.hpp.