#include <namedcontext.h>
Inheritance diagram for NamedContext:
Public Types | |
typedef set< string > | SmartyVariableList |
List of smart varriables. | |
Public Member Functions | |
NamedContext (const string &iname, RuleList &irules, NameSpace &inameSpace) | |
Constructor. | |
virtual void | generateVariableNames (const Node::VariableList &vlist, Node::Assignment &phpAssign, Node::Assignment &tplAssign) |
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 | leaveContext (List *phpOut, List *tplOut) |
Run at the end of RuleContext::execute. | |
virtual void | processTemplate (Node *tpl) const |
Processes template after refactoring. | |
Data Fields | |
const string | name |
context name | |
RuleContext * | superContext |
super context | |
int | usedNames |
Stores the number of assigned variale names. | |
SmartyVariableList | smartyVariableList |
Stores registered smaryt variables. |
Definition at line 7 of file namedcontext.h.
|
List of smart varriables.
Definition at line 19 of file namedcontext.h. |
|
Constructor.
Definition at line 3 of file namedcontext.cpp. |
|
Generates one variable name.
Implements RuleContext. Definition at line 32 of file namedcontext.cpp. References getVariableNamePrefix(), registerSmartyVariable(), and usedNames. Referenced by generateVariableNames(). |
|
Calls for every variable generateVaraibleName and stores the result in phpAssign and . Implements RuleContext. Definition at line 11 of file namedcontext.cpp. References generateVariableName(). |
|
Returns a sufix for of a varaible name.
Implements RuleContext. Definition at line 22 of file namedcontext.cpp. References name. Referenced by generateVariableName(). |
|
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 27 of file namedcontext.cpp. |
|
Run at the end of RuleContext::execute. When living the context all registerd smarty variables are exported. Reimplemented from RuleContext. Definition at line 51 of file namedcontext.cpp. References List::push_back(), and smartyVariableList. |
|
Processes one SmartyAssign.
Implements RuleContext. Definition at line 44 of file namedcontext.cpp. References SmartyAssign::getAssignment(), SmartyAssign::getVariable(), and SmartyAssign::setPHPOut(). |
|
Processes template after refactoring.
Implements RuleContext. Definition at line 62 of file namedcontext.cpp. |
|
Registers smarty varaible in the context.
Implements RuleContext. Definition at line 40 of file namedcontext.cpp. References smartyVariableList. Referenced by generateVariableName(). |
|
context name
Definition at line 10 of file namedcontext.h. Referenced by getVariableNamePrefix(). |
|
Stores registered smaryt variables.
Definition at line 22 of file namedcontext.h. Referenced by leaveContext(), and registerSmartyVariable(). |
|
super context
Definition at line 13 of file namedcontext.h. |
|
Stores the number of assigned variale names.
Definition at line 16 of file namedcontext.h. Referenced by generateVariableName(). |