#include <singlecontext.h>
Inheritance diagram for SingleContext:
Public Member Functions | |
SingleContext (RuleContext *isuperContext) | |
Constructor. | |
SingleContext (RuleList &iruleList, RuleContext *isuperContext) | |
Constructor. | |
virtual void | generateVariableNames (const Node::VariableList &vlist, Node::Assignment &phpAssign, Node::Assignment &tplAssign) |
Generates appropriate names to variables and stores them in assignments. | |
virtual const string | getVariableNamePrefix () |
Returns a sufix for of a varaible name. | |
virtual const string | getVariableNameSufix (const bool stripControlVariableDollar) |
Returns a sufix for of a varaible name. | |
virtual const string | generateVariableName () |
Generates one variable name. | |
virtual void | registerSmartyVariable (const string &variable) |
Registers smarty varaible in the context. | |
virtual void | processSmartyAssign (SmartyAssign *smartyAssign) |
Processes one SmartyAssign. | |
virtual void | processTemplate (Node *tpl) const |
Processes template after refactoring. | |
Private Attributes | |
RuleContext * | superContext |
A pointer to super context. |
In this context the names for variables can be taken from the super context.
Definition at line 9 of file singlecontext.h.
|
Constructor.
Definition at line 3 of file singlecontext.cpp. |
|
Constructor.
Definition at line 5 of file singlecontext.cpp. |
|
Generates one variable name.
Implements RuleContext. Definition at line 20 of file singlecontext.cpp. References RuleContext::generateVariableName(), and superContext. |
|
Generates appropriate names to variables and stores them in assignments.
Implements RuleContext. Definition at line 8 of file singlecontext.cpp. References RuleContext::generateVariableNames(), and superContext. |
|
Returns a sufix for of a varaible name.
Implements RuleContext. Definition at line 12 of file singlecontext.cpp. References RuleContext::getVariableNamePrefix(), and superContext. |
|
Returns a sufix for of a varaible name. In case of control variables e.g. in for statement, a leading dollar may be skiped, when exporting control variable to template. Implements RuleContext. Definition at line 16 of file singlecontext.cpp. References RuleContext::getVariableNameSufix(), and superContext. |
|
Processes one SmartyAssign.
Implements RuleContext. Definition at line 28 of file singlecontext.cpp. References RuleContext::processSmartyAssign(), and superContext. |
|
Processes template after refactoring.
Implements RuleContext. Definition at line 32 of file singlecontext.cpp. References RuleContext::processTemplate(), and superContext. |
|
Registers smarty varaible in the context.
Implements RuleContext. Definition at line 24 of file singlecontext.cpp. References RuleContext::registerSmartyVariable(), and superContext. |
|
A pointer to super context.
Definition at line 11 of file singlecontext.h. Referenced by generateVariableName(), generateVariableNames(), getVariableNamePrefix(), getVariableNameSufix(), processSmartyAssign(), processTemplate(), and registerSmartyVariable(). |