#include <streeconstant.h>
Inheritance diagram for Constant:

Public Member Functions | |
| Constant (const string &ivalue, const string &icomment="", const int ilineno=0) | |
| Creates Constant from a string. | |
| virtual SType | getType () const |
| Returns type of the node. | |
| string | getValue () const |
| Returns the value of the constatnt. | |
| virtual string | getName () const |
| Returs string representing node type or name for List. | |
| virtual ostream & | print (ostream &os) const |
| Writes node to the stream. | |
| virtual ostream & | php (ostream &os) const |
| Writes node to the stream as php. | |
| virtual bool | match (const Node *p, Assignment &assign, const NameSpace &nameSpace) const |
| Matches node p to the node. If node matches sets the assignment. | |
| virtual bool | matchToBegining (const List *p, Assignment &assign, const NameSpace &nameSpace) const |
| Matches the list to the begining of p. | |
| virtual bool | compare (const Node *p) const |
| Comares node p to the node. | |
| virtual Node * | copy () const |
| Copies the node. | |
| virtual void | getVariables (VariableList &vlist) const |
| Returns list of variables used in the node. | |
| int | toInt () const |
| Tries to convert the value to number. | |
| virtual Node * | substitute (const Assignment &assign) |
| Substitutes variables in the node accordingly to the given assignment. | |
| virtual string | evaluate (const NameSpace &nameSpace) const |
| Computes the value of the expression (only basic atihmetic and string operations). | |
Private Attributes | |
| string | value |
| The value of the constant. | |
Used for representing following php elements:
Definition at line 17 of file streeconstant.h.
|
||||||||||||||||
|
Creates Constant from a string.
Definition at line 24 of file streeconstant.h. References value. Referenced by copy(). |
|
|
Comares node p to the node.
Implements Node. Definition at line 20 of file streeconstant.cpp. References Node::getType(), getValue(), and SConstant. |
|
|
Copies the node.
Implements Node. Definition at line 29 of file streeconstant.cpp. References Constant(), and getValue(). |
|
|
Computes the value of the expression (only basic atihmetic and string operations).
Implements Node. Definition at line 42 of file streeconstant.cpp. References getValue(). |
|
|
Returs string representing node type or name for List.
Implements Node. Definition at line 31 of file streeconstant.h. References value. |
|
|
Returns type of the node.
Implements Node. Definition at line 26 of file streeconstant.h. |
|
|
Returns the value of the constatnt.
Definition at line 29 of file streeconstant.h. References value. Referenced by compare(), copy(), evaluate(), toInt(), and TPLConstantNormalizer::transform(). |
|
|
Returns list of variables used in the node.
Implements Node. Definition at line 33 of file streeconstant.cpp. |
|
||||||||||||||||
|
Matches node p to the node. If node matches sets the assignment.
Implements Node. Definition at line 11 of file streeconstant.cpp. References SConstant. |
|
||||||||||||||||
|
Matches the list to the begining of p.
Implements Node. Definition at line 16 of file streeconstant.cpp. |
|
|
Writes node to the stream as php.
Implements Node. Definition at line 7 of file streeconstant.cpp. References value. |
|
|
Writes node to the stream.
Implements Node. Definition at line 3 of file streeconstant.cpp. References value. |
|
|
Substitutes variables in the node accordingly to the given assignment.
Implements Node. Definition at line 25 of file streeconstant.cpp. |
|
|
Tries to convert the value to number.
Definition at line 35 of file streeconstant.cpp. References getValue(). |
|
|
The value of the constant.
Definition at line 20 of file streeconstant.h. Referenced by Constant(), getName(), getValue(), php(), and print(). |
1.3.3