#include <rtreenamedcontextrule.h>
Inheritance diagram for NamedContextRule:
Public Member Functions | |
NamedContextRule (Constant *iname, RunRuleList &irunRuleList, List *iphpInPattern, List *iphpOutPattern, Variable *inamePattern, Variable *iargumentsPattern, Variable *icontextPattern) | |
Constructor. | |
virtual | ~NamedContextRule () |
virtual bool | execute (RuleContext *context, List *phpIn, List *phpOut, List *tplOut, Node::Assignment &assign) const |
Executer the rule on php. | |
void | runRules (NameSpace &subNameSpace, Node *phpContextMatched, StatementList *phpContextOut, StatementList *tplContextOut, Node::Assignment &assign) const |
Executes rules on given statement list used in RuleSystem for main statement list. | |
virtual Rule * | copy () |
Copies the rule. | |
virtual Rule * | substitute (const Node::Assignment &assign) |
Substitutes variables used in the rule. | |
virtual ostream & | print (ostream &os) const |
Writes the rule to the stream. | |
Private Attributes | |
const string | name |
Name of rules to include. | |
RunRuleList & | runRuleList |
Reference to rule list in RuleSystem. | |
List * | phpInPattern |
Pattern to be matched. | |
List * | phpOutPattern |
Output pattern. | |
Variable * | namePattern |
The name of the context. | |
Variable * | argumentsPattern |
The list of arguments. | |
Variable * | contextPattern |
The statements of the context. |
Definition at line 8 of file rtreenamedcontextrule.h.
|
Constructor.
Definition at line 4 of file rtreenamedcontextrule.cpp. |
|
Definition at line 17 of file rtreenamedcontextrule.cpp. References argumentsPattern, contextPattern, namePattern, and phpInPattern. |
|
Copies the rule.
Implements Rule. Definition at line 80 of file rtreenamedcontextrule.cpp. |
|
Executer the rule on php.
Implements Rule. Definition at line 38 of file rtreenamedcontextrule.cpp. References List::append(), argumentsPattern, contextPattern, List::copy(), Variable::copy(), Variable::getId(), List::getLength(), RuleContext::getNameSpace(), NameSpace::importLocals(), List::matchToBegining(), namePattern, phpInPattern, phpOutPattern, NameSpace::processArguments(), runRules(), List::substitute(), substituteNode(), and Node::toString(). |
|
Writes the rule to the stream.
Implements Rule. Definition at line 73 of file rtreenamedcontextrule.cpp. References phpInPattern, and List::print(). |
|
Executes rules on given statement list used in RuleSystem for main statement list.
Definition at line 24 of file rtreenamedcontextrule.cpp. References RuleContext::execute(), List::getLength(), NameSpace::getRuleRunTime(), MAINCONTEXTNAME, name, and runRuleList. Referenced by RuleSystem::execute(), and execute(). |
|
Substitutes variables used in the rule.
Implements Rule. Definition at line 84 of file rtreenamedcontextrule.cpp. |
|
The list of arguments.
Definition at line 23 of file rtreenamedcontextrule.h. Referenced by execute(), and ~NamedContextRule(). |
|
The statements of the context.
Definition at line 25 of file rtreenamedcontextrule.h. Referenced by execute(), and ~NamedContextRule(). |
|
Name of rules to include.
Definition at line 12 of file rtreenamedcontextrule.h. Referenced by runRules(). |
|
The name of the context.
Definition at line 21 of file rtreenamedcontextrule.h. Referenced by execute(), and ~NamedContextRule(). |
|
Pattern to be matched.
Definition at line 17 of file rtreenamedcontextrule.h. Referenced by execute(), print(), and ~NamedContextRule(). |
|
Output pattern.
Definition at line 19 of file rtreenamedcontextrule.h. Referenced by execute(). |
|
Reference to rule list in RuleSystem.
Definition at line 14 of file rtreenamedcontextrule.h. Referenced by runRules(). |