Generated on Sat Feb 7 2015 02:01:42 for Gecode by doxygen 1.8.9.1
Gecode::FlatZinc::AST::Node Class Referenceabstract

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

#include <ast.hh>

Public Member Functions

virtual ~Node (void)
 Destructor. More...
 
void append (Node *n)
 Append n to an array node. More...
 
bool hasAtom (const std::string &id)
 Test if node has atom with id. More...
 
bool isInt (int &i)
 Test if node is int, if yes set i to the value. More...
 
bool isFloat (double &i)
 Test if node is float, if yes set d to the value. More...
 
bool isCall (const std::string &id)
 Test if node is function call with id. More...
 
CallgetCall (void)
 Return function call. More...
 
bool hasCall (const std::string &id)
 Test if node is function call or array containing function call id. More...
 
CallgetCall (const std::string &id)
 Return function call id. More...
 
ArraygetArray (void)
 Cast this node to an array node. More...
 
AtomgetAtom (void)
 Cast this node to an Atom node. More...
 
std::string getVarName (void)
 Return name of variable represented by this node. More...
 
int getIntVar (void)
 Cast this node to an integer variable node. More...
 
int getBoolVar (void)
 Cast this node to a Boolean variable node. More...
 
int getFloatVar (void)
 Cast this node to a Float variable node. More...
 
int getSetVar (void)
 Cast this node to a set variable node. More...
 
int getInt (void)
 Cast this node to an integer node. More...
 
bool getBool (void)
 Cast this node to a Boolean node. More...
 
double getFloat (void)
 Cast this node to a Float node. More...
 
SetLitgetSet (void)
 Cast this node to a set literal node. More...
 
std::string getString (void)
 Cast this node to a string node. More...
 
bool isIntVar (void)
 Test if node is an integer variable node. More...
 
bool isBoolVar (void)
 Test if node is a Boolean variable node. More...
 
bool isSetVar (void)
 Test if node is a set variable node. More...
 
bool isFloatVar (void)
 Test if node is a float variable node. More...
 
bool isInt (void)
 Test if node is an integer node. More...
 
bool isFloat (void)
 Test if node is a float node. More...
 
bool isBool (void)
 Test if node is a Boolean node. More...
 
bool isString (void)
 Test if node is a string node. More...
 
bool isArray (void)
 Test if node is an array node. More...
 
bool isSet (void)
 Test if node is a set literal node. More...
 
bool isAtom (void)
 Test if node is an atom node. More...
 
virtual void print (std::ostream &)=0
 Output string representation. More...
 

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  )
inlinevirtual

Destructor.

Definition at line 314 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 317 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 325 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 368 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 377 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 338 of file ast.hh.

Call * Gecode::FlatZinc::AST::Node::getCall ( void  )
inline

Return function call.

Definition at line 347 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 354 of file ast.hh.

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

Return function call id.

Definition at line 386 of file ast.hh.

Array * Gecode::FlatZinc::AST::Node::getArray ( void  )
inline

Cast this node to an array node.

Definition at line 400 of file ast.hh.

Atom * Gecode::FlatZinc::AST::Node::getAtom ( void  )
inline

Cast this node to an Atom node.

Definition at line 407 of file ast.hh.

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

Return name of variable represented by this node.

Definition at line 414 of file ast.hh.

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

Cast this node to an integer variable node.

Definition at line 420 of file ast.hh.

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

Cast this node to a Boolean variable node.

Definition at line 426 of file ast.hh.

int Gecode::FlatZinc::AST::Node::getFloatVar ( void  )
inline

Cast this node to a Float variable node.

Definition at line 432 of file ast.hh.

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

Cast this node to a set variable node.

Definition at line 438 of file ast.hh.

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

Cast this node to an integer node.

Definition at line 444 of file ast.hh.

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

Cast this node to a Boolean node.

Definition at line 450 of file ast.hh.

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

Cast this node to a Float node.

Definition at line 456 of file ast.hh.

SetLit * Gecode::FlatZinc::AST::Node::getSet ( void  )
inline

Cast this node to a set literal node.

Definition at line 462 of file ast.hh.

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

Cast this node to a string node.

Definition at line 468 of file ast.hh.

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

Test if node is an integer variable node.

Definition at line 474 of file ast.hh.

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

Test if node is a Boolean variable node.

Definition at line 478 of file ast.hh.

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

Test if node is a set variable node.

Definition at line 482 of file ast.hh.

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

Test if node is a float variable node.

Definition at line 486 of file ast.hh.

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

Test if node is an integer node.

Definition at line 490 of file ast.hh.

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

Test if node is a float node.

Definition at line 498 of file ast.hh.

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

Test if node is a Boolean node.

Definition at line 494 of file ast.hh.

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

Test if node is a string node.

Definition at line 506 of file ast.hh.

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

Test if node is an array node.

Definition at line 510 of file ast.hh.

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

Test if node is a set literal node.

Definition at line 502 of file ast.hh.

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

Test if node is an atom node.

Definition at line 514 of file ast.hh.


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