#include <streelist.h>
Inheritance diagram for List:
Public Member Functions | |
virtual SType | getType () const |
Returns type of the node. | |
virtual string | getName () const |
Returs string representing node type or name for List. | |
virtual int | getLength () const |
Returns the length of the list. | |
List (string iname) | |
Creates a list with a given name. | |
List (string iname, Node *statement) | |
Creates a list with a given name containing one elemnet. | |
virtual List * | push_back (Node *statement) |
Pushes an element to the end of the list. | |
virtual List * | push_front (Node *statement) |
Pushes an element to the front of the list. | |
List * | append (List *toappend) |
Append toappend to the 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. | |
List * | copyList () const |
Copies the list. | |
virtual | ~List () |
Destroys the list. | |
virtual void | getVariables (VariableList &vlist) const |
Returns list of variables used in the node. | |
virtual Node * | transform (const Transformer *transformer) |
Applies Transformer to every node in the tree. | |
virtual bool | forall (const Tester *tester, const NameSpace &nameSpace) const |
Returns true is for all nodes in the. | |
virtual bool | exists (const Tester *tester, const NameSpace &nameSpace) const |
Applies Transformer to every node in the tree. | |
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). | |
Protected Member Functions | |
List * | copyContent (List *newList) const |
Copies content of the list to newList nad returns pointer to newList. | |
Protected Attributes | |
string | name |
Name of the list. |
Definition at line 10 of file streelist.h.
|
Creates a list with a given name.
Definition at line 13 of file streelist.cpp. Referenced by copy(). |
|
Creates a list with a given name containing one elemnet.
Definition at line 15 of file streelist.cpp. References push_back(). |
|
Destroys the list.
Definition at line 127 of file streelist.cpp. |
|
Append toappend to the list.
Definition at line 29 of file streelist.cpp. Referenced by SubstitutionRule::execute(), and NamedContextRule::execute(). |
|
Comares node p to the node.
Implements Node. Definition at line 91 of file streelist.cpp. References getLength(), getName(), Node::getType(), and SList. |
|
Copies the node.
Implements Node. Reimplemented in StatementList, InlineHTMLList, TemplateList, ExpressionList, ArrayPairList, DeclareList, CaseList, EncapsList, AssignmentList, PHP, EchoPHP, CurlyBraces, SmartyBraces, DoubleQuote, If, For, While, Do, Switch, Break, Continue, Return, Global, Static, Echo, Template, SmartyAssign, InlineHTML, Expression, Unset, Use, Foreach, Declare, EmptyStatement, Function, Class, Const, Case, Parameter, ClassVariable, UnaryOperator, PostUnaryOperator, BinaryOperator, AList, EncapsExpr, AskOperator, Exit, Print, Array, FunctionCall, ArrayPair, ObjectOperator, ArrayOperator, MapOperator, Isset, ConstantEncapsedString, ConstantString, PHPVariable, Nullary, Unary, Binary, Ternary, and Quadary. Definition at line 119 of file streelist.cpp. References copyContent(), getName(), and List(). Referenced by copyList(), SubstitutionRule::execute(), NamedContextRule::execute(), and Variable::matchToBegining(). |
|
Copies content of the list to newList nad returns pointer to newList.
Definition at line 3 of file streelist.cpp. References push_back(). Referenced by copy(), AssignmentList::copy(), EncapsList::copy(), CaseList::copy(), DeclareList::copy(), ArrayPairList::copy(), ExpressionList::copy(), TemplateList::copy(), InlineHTMLList::copy(), and StatementList::copy(). |
|
Copies the list.
Definition at line 123 of file streelist.cpp. References copy(). Referenced by SubstitutionRule::copy(), SingleContextRule::copy(), MultiContextRule::copy(), and ActionRule::copy(). |
|
Computes the value of the expression (only basic atihmetic and string operations).
Implements Node. Reimplemented in EncapsList, DoubleQuote, UnaryOperator, PostUnaryOperator, BinaryOperator, EncapsExpr, AskOperator, ConstantEncapsedString, and ConstantString. Definition at line 185 of file streelist.cpp. |
|
Applies Transformer to every node in the tree.
Reimplemented from Node. Definition at line 172 of file streelist.cpp. |
|
Returns true is for all nodes in the.
Reimplemented from Node. Definition at line 159 of file streelist.cpp. |
|
Returns the length of the list.
Reimplemented from Node. Definition at line 25 of file streelist.h. Referenced by compare(), SubstitutionRule::execute(), NamedContextRule::execute(), ActionRule::execute(), RuleContext::executeOnPHPList(), match(), matchToBegining(), and NamedContextRule::runRules(). |
|
Returs string representing node type or name for List.
Implements Node. Definition at line 22 of file streelist.h. References name. Referenced by compare(), Quadary::copy(), Ternary::copy(), Binary::copy(), Unary::copy(), Nullary::copy(), copy(), match(), Quadary::php(), Ternary::php(), Binary::php(), Unary::php(), and Nullary::php(). |
|
Returns type of the node.
Implements Node. Definition at line 21 of file streelist.h. |
|
Returns list of variables used in the node.
Implements Node. Definition at line 136 of file streelist.cpp. Referenced by RuleContext::assignVariableNames(). |
|
Matches node p to the node. If node matches sets the assignment.
Implements Node. Definition at line 55 of file streelist.cpp. References getLength(), getName(), Node::getType(), and SList. |
|
Matches the list to the begining of p.
Implements Node. Definition at line 74 of file streelist.cpp. References getLength(). Referenced by SubstitutionRule::execute(), NamedContextRule::execute(), and ActionRule::execute(). |
|
Writes node to the stream as php.
Implements Node. Reimplemented in StatementList, InlineHTMLList, TemplateList, ExpressionList, ArrayPairList, DeclareList, CaseList, EncapsList, AssignmentList, PHP, EchoPHP, CurlyBraces, SmartyBraces, DoubleQuote, If, For, While, Do, Switch, Break, Continue, Return, Global, Static, Echo, Template, SmartyAssign, InlineHTML, Expression, Unset, Use, Foreach, Declare, EmptyStatement, Function, Class, Const, Case, Parameter, ClassVariable, UnaryOperator, PostUnaryOperator, BinaryOperator, AList, EncapsExpr, AskOperator, Exit, Print, Array, FunctionCall, ArrayPair, ObjectOperator, ArrayOperator, MapOperator, Isset, ConstantEncapsedString, ConstantString, PHPVariable, Nullary, Unary, Binary, Ternary, and Quadary. Definition at line 50 of file streelist.cpp. |
|
Writes node to the stream.
Implements Node. Definition at line 38 of file streelist.cpp. References name. Referenced by IncludeRule::execute(), RuleContext::executeOnPHP(), php(), SubstitutionRule::print(), SingleContextRule::print(), NamedContextRule::print(), MultiContextRule::print(), and ActionRule::print(). |
|
Pushes an element to the end of the list.
Reimplemented from Node. Definition at line 19 of file streelist.cpp. Referenced by Binary::Binary(), copyContent(), ContextRule::execute(), ActionRule::execute(), NamedContext::leaveContext(), List(), NamedList::NamedList(), PHPFiles::phpFooter(), Quadary::Quadary(), Ternary::Ternary(), EchoNormalizer::transform(), and Unary::Unary(). |
|
Pushes an element to the front of the list.
Definition at line 24 of file streelist.cpp. Referenced by PHPFiles::phpHeader(). |
|
Substitutes variables in the node accordingly to the given assignment.
Implements Node. Definition at line 109 of file streelist.cpp. References Node::substituteNode. Referenced by RuleContext::assignVariableNames(), SubstitutionRule::execute(), NamedContextRule::execute(), ContextRule::execute(), SubstitutionRule::substitute(), ContextRule::substitute(), and ActionRule::substitute(). |
|
Applies Transformer to every node in the tree.
Reimplemented from Node. Definition at line 145 of file streelist.cpp. References Node::transform(). |
|
Name of the list.
Definition at line 14 of file streelist.h. |