#include <basic.h>
Public Member Functions | |
Atom (const string &atom="") | |
Constructor. | |
Mode * | findMode (const vector< Mode * > &modes) const |
Get predicate mode. | |
size_t | getArity () const |
Get predicate arity. | |
string | getInputModes (Mode *m) const |
Get input modes for variables. | |
string | getModes (const Type &tp) const |
Get modes for variables by typing as the passed type argument. | |
string | getOutputModes (Mode *m) const |
Get output modes for variables. | |
const string & | getPredicate () const |
Get predicate name. | |
void | set (const string &atom) |
Set moded atom. | |
string | to_string () const |
Get string representation. | |
virtual | ~Atom () |
Destructor. | |
Private Attributes | |
size_t | predarity |
Predicate arity. | |
string | predname |
Predicate name. | |
string * | vars |
Array of variables. | |
Friends | |
ostream & | operator<< (ostream &o, const Atom &m) |
Output to a stream. |
syn::Atom::Atom | ( | const string & | atom = "" |
) | [inline] |
Constructor.
virtual syn::Atom::~Atom | ( | ) | [inline, virtual] |
Destructor.
size_t syn::Atom::getArity | ( | ) | const [inline] |
Get predicate arity.
string syn::Atom::getInputModes | ( | Mode * | m | ) | const [inline] |
Get input modes for variables.
string syn::Atom::getModes | ( | const Type & | tp | ) | const [inline] |
Get modes for variables by typing as the passed type argument.
string syn::Atom::getOutputModes | ( | Mode * | m | ) | const [inline] |
Get output modes for variables.
const string& syn::Atom::getPredicate | ( | ) | const [inline] |
Get predicate name.
void syn::Atom::set | ( | const string & | atom | ) | [inline] |
Set moded atom.
string syn::Atom::to_string | ( | ) | const [inline] |
Get string representation.
ostream& operator<< | ( | ostream & | o, | |
const Atom & | m | |||
) | [friend] |
Output to a stream.
size_t syn::Atom::predarity [private] |
Predicate arity.
string syn::Atom::predname [private] |
Predicate name.
string* syn::Atom::vars [private] |
Array of variables.