Gecode::FlatZinc::AST::Node Class Reference
A node in a FlatZinc abstract syntax tree. More...
#include <ast.hh>
Public Member Functions | |
virtual | ~Node (void) |
Destructor. | |
void | append (Node *n) |
Append n to an array node. | |
bool | hasAtom (const std::string &id) |
Test if node has atom with id. | |
bool | isInt (int &i) |
Test if node is int, if yes set i to the value. | |
bool | isFloat (double &i) |
Test if node is float, if yes set d to the value. | |
bool | isCall (const std::string &id) |
Test if node is function call with id. | |
Call * | getCall (void) |
Return function call. | |
bool | hasCall (const std::string &id) |
Test if node is function call or array containing function call id. | |
Call * | getCall (const std::string &id) |
Return function call id. | |
Array * | getArray (void) |
Cast this node to an array node. | |
Atom * | getAtom (void) |
Cast this node to an Atom node. | |
std::string | getVarName (void) |
Return name of variable represented by this node. | |
int | getIntVar (void) |
Cast this node to an integer variable node. | |
int | getBoolVar (void) |
Cast this node to a Boolean variable node. | |
int | getFloatVar (void) |
Cast this node to a Float variable node. | |
int | getSetVar (void) |
Cast this node to a set variable node. | |
int | getInt (void) |
Cast this node to an integer node. | |
bool | getBool (void) |
Cast this node to a Boolean node. | |
double | getFloat (void) |
Cast this node to a Float node. | |
SetLit * | getSet (void) |
Cast this node to a set literal node. | |
std::string | getString (void) |
Cast this node to a string node. | |
bool | isIntVar (void) |
Test if node is an integer variable node. | |
bool | isBoolVar (void) |
Test if node is a Boolean variable node. | |
bool | isSetVar (void) |
Test if node is a set variable node. | |
bool | isFloatVar (void) |
Test if node is a float variable node. | |
bool | isInt (void) |
Test if node is an integer node. | |
bool | isFloat (void) |
Test if node is a float node. | |
bool | isBool (void) |
Test if node is a Boolean node. | |
bool | isString (void) |
Test if node is a string node. | |
bool | isArray (void) |
Test if node is an array node. | |
bool | isSet (void) |
Test if node is a set literal node. | |
bool | isAtom (void) |
Test if node is an atom node. | |
virtual void | print (std::ostream &)=0 |
Output string representation. |
Detailed Description
A node in a FlatZinc abstract syntax tree.
Definition at line 67 of file ast.hh.
Constructor & Destructor Documentation
Gecode::FlatZinc::AST::Node::~Node | ( | void | ) | [inline, virtual] |
Member Function Documentation
void Gecode::FlatZinc::AST::Node::append | ( | Node * | n | ) | [inline] |
bool Gecode::FlatZinc::AST::Node::hasAtom | ( | const std::string & | id | ) | [inline] |
bool Gecode::FlatZinc::AST::Node::isInt | ( | int & | i | ) | [inline] |
bool Gecode::FlatZinc::AST::Node::isFloat | ( | double & | i | ) | [inline] |
bool Gecode::FlatZinc::AST::Node::isCall | ( | const std::string & | id | ) | [inline] |
Call * Gecode::FlatZinc::AST::Node::getCall | ( | void | ) | [inline] |
bool Gecode::FlatZinc::AST::Node::hasCall | ( | const std::string & | id | ) | [inline] |
Call * Gecode::FlatZinc::AST::Node::getCall | ( | const std::string & | id | ) | [inline] |
Array * Gecode::FlatZinc::AST::Node::getArray | ( | void | ) | [inline] |
Atom * Gecode::FlatZinc::AST::Node::getAtom | ( | void | ) | [inline] |
std::string Gecode::FlatZinc::AST::Node::getVarName | ( | void | ) | [inline] |
int Gecode::FlatZinc::AST::Node::getIntVar | ( | void | ) | [inline] |
int Gecode::FlatZinc::AST::Node::getBoolVar | ( | void | ) | [inline] |
int Gecode::FlatZinc::AST::Node::getFloatVar | ( | void | ) | [inline] |
int Gecode::FlatZinc::AST::Node::getSetVar | ( | void | ) | [inline] |
int Gecode::FlatZinc::AST::Node::getInt | ( | void | ) | [inline] |
bool Gecode::FlatZinc::AST::Node::getBool | ( | void | ) | [inline] |
double Gecode::FlatZinc::AST::Node::getFloat | ( | void | ) | [inline] |
SetLit * Gecode::FlatZinc::AST::Node::getSet | ( | void | ) | [inline] |
std::string Gecode::FlatZinc::AST::Node::getString | ( | void | ) | [inline] |
bool Gecode::FlatZinc::AST::Node::isIntVar | ( | void | ) | [inline] |
bool Gecode::FlatZinc::AST::Node::isBoolVar | ( | void | ) | [inline] |
bool Gecode::FlatZinc::AST::Node::isSetVar | ( | void | ) | [inline] |
bool Gecode::FlatZinc::AST::Node::isFloatVar | ( | void | ) | [inline] |
bool Gecode::FlatZinc::AST::Node::isInt | ( | void | ) | [inline] |
bool Gecode::FlatZinc::AST::Node::isFloat | ( | void | ) | [inline] |
bool Gecode::FlatZinc::AST::Node::isBool | ( | void | ) | [inline] |
bool Gecode::FlatZinc::AST::Node::isString | ( | void | ) | [inline] |
bool Gecode::FlatZinc::AST::Node::isArray | ( | void | ) | [inline] |
bool Gecode::FlatZinc::AST::Node::isSet | ( | void | ) | [inline] |
bool Gecode::FlatZinc::AST::Node::isAtom | ( | void | ) | [inline] |
virtual void Gecode::FlatZinc::AST::Node::print | ( | std::ostream & | ) | [pure virtual] |
Output string representation.
Implemented in Gecode::FlatZinc::AST::BoolLit, Gecode::FlatZinc::AST::IntLit, Gecode::FlatZinc::AST::FloatLit, Gecode::FlatZinc::AST::SetLit, Gecode::FlatZinc::AST::BoolVar, Gecode::FlatZinc::AST::IntVar, Gecode::FlatZinc::AST::FloatVar, Gecode::FlatZinc::AST::SetVar, Gecode::FlatZinc::AST::Array, Gecode::FlatZinc::AST::Call, Gecode::FlatZinc::AST::ArrayAccess, Gecode::FlatZinc::AST::Atom, and Gecode::FlatZinc::AST::String.
The documentation for this class was generated from the following file:
- gecode/flatzinc/ast.hh