Generated on Wed Nov 5 2014 05:18:40 for Gecode by doxygen 1.7.6.1
Gecode::FlatZinc::AST::Node Class Reference

A node in a FlatZinc abstract syntax tree. More...

#include <ast.hh>

List of all members.

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.
CallgetCall (void)
 Return function call.
bool hasCall (const std::string &id)
 Test if node is function call or array containing function call id.
CallgetCall (const std::string &id)
 Return function call id.
ArraygetArray (void)
 Cast this node to an array node.
AtomgetAtom (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.
SetLitgetSet (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 71 of file ast.hh.


Constructor & Destructor Documentation

Gecode::FlatZinc::AST::Node::~Node ( void  ) [inline, virtual]

Destructor.

Definition at line 313 of file ast.hh.


Member Function Documentation

void Gecode::FlatZinc::AST::Node::append ( Node n) [inline]

Append n to an array node.

Definition at line 316 of file ast.hh.

bool Gecode::FlatZinc::AST::Node::hasAtom ( const std::string &  id) [inline]

Test if node has atom with id.

Definition at line 324 of file ast.hh.

bool Gecode::FlatZinc::AST::Node::isInt ( int &  i) [inline]

Test if node is int, if yes set i to the value.

Definition at line 367 of file ast.hh.

bool Gecode::FlatZinc::AST::Node::isFloat ( double &  i) [inline]

Test if node is float, if yes set d to the value.

Definition at line 376 of file ast.hh.

bool Gecode::FlatZinc::AST::Node::isCall ( const std::string &  id) [inline]

Test if node is function call with id.

Definition at line 337 of file ast.hh.

Return function call.

Definition at line 346 of file ast.hh.

bool Gecode::FlatZinc::AST::Node::hasCall ( const std::string &  id) [inline]

Test if node is function call or array containing function call id.

Definition at line 353 of file ast.hh.

Call * Gecode::FlatZinc::AST::Node::getCall ( const std::string &  id) [inline]

Return function call id.

Definition at line 385 of file ast.hh.

Cast this node to an array node.

Definition at line 399 of file ast.hh.

Cast this node to an Atom node.

Definition at line 406 of file ast.hh.

std::string Gecode::FlatZinc::AST::Node::getVarName ( void  ) [inline]

Return name of variable represented by this node.

Definition at line 413 of file ast.hh.

int Gecode::FlatZinc::AST::Node::getIntVar ( void  ) [inline]

Cast this node to an integer variable node.

Definition at line 419 of file ast.hh.

int Gecode::FlatZinc::AST::Node::getBoolVar ( void  ) [inline]

Cast this node to a Boolean variable node.

Definition at line 425 of file ast.hh.

Cast this node to a Float variable node.

Definition at line 431 of file ast.hh.

int Gecode::FlatZinc::AST::Node::getSetVar ( void  ) [inline]

Cast this node to a set variable node.

Definition at line 437 of file ast.hh.

int Gecode::FlatZinc::AST::Node::getInt ( void  ) [inline]

Cast this node to an integer node.

Definition at line 443 of file ast.hh.

bool Gecode::FlatZinc::AST::Node::getBool ( void  ) [inline]

Cast this node to a Boolean node.

Definition at line 449 of file ast.hh.

double Gecode::FlatZinc::AST::Node::getFloat ( void  ) [inline]

Cast this node to a Float node.

Definition at line 455 of file ast.hh.

Cast this node to a set literal node.

Definition at line 461 of file ast.hh.

std::string Gecode::FlatZinc::AST::Node::getString ( void  ) [inline]

Cast this node to a string node.

Definition at line 467 of file ast.hh.

bool Gecode::FlatZinc::AST::Node::isIntVar ( void  ) [inline]

Test if node is an integer variable node.

Definition at line 473 of file ast.hh.

bool Gecode::FlatZinc::AST::Node::isBoolVar ( void  ) [inline]

Test if node is a Boolean variable node.

Definition at line 477 of file ast.hh.

bool Gecode::FlatZinc::AST::Node::isSetVar ( void  ) [inline]

Test if node is a set variable node.

Definition at line 481 of file ast.hh.

bool Gecode::FlatZinc::AST::Node::isFloatVar ( void  ) [inline]

Test if node is a float variable node.

Definition at line 485 of file ast.hh.

bool Gecode::FlatZinc::AST::Node::isInt ( void  ) [inline]

Test if node is an integer node.

Definition at line 489 of file ast.hh.

bool Gecode::FlatZinc::AST::Node::isFloat ( void  ) [inline]

Test if node is a float node.

Definition at line 497 of file ast.hh.

bool Gecode::FlatZinc::AST::Node::isBool ( void  ) [inline]

Test if node is a Boolean node.

Definition at line 493 of file ast.hh.

bool Gecode::FlatZinc::AST::Node::isString ( void  ) [inline]

Test if node is a string node.

Definition at line 505 of file ast.hh.

bool Gecode::FlatZinc::AST::Node::isArray ( void  ) [inline]

Test if node is an array node.

Definition at line 509 of file ast.hh.

bool Gecode::FlatZinc::AST::Node::isSet ( void  ) [inline]

Test if node is a set literal node.

Definition at line 501 of file ast.hh.

bool Gecode::FlatZinc::AST::Node::isAtom ( void  ) [inline]

Test if node is an atom node.

Definition at line 513 of file ast.hh.


The documentation for this class was generated from the following file: