00001 #ifndef _NAMEDCONTEXT_H_ 00002 #define _NAMEDCONTEXT_H_ 00003 #include "rulecontext.h" 00004 00005 00007 class NamedContext : public RuleContext{ 00008 public: 00010 const string name; 00011 00013 RuleContext* superContext; 00014 00016 int usedNames; 00017 00019 typedef set<string> SmartyVariableList; 00020 00022 SmartyVariableList smartyVariableList; 00023 00024 public: 00026 NamedContext(const string &iname, RuleList &irules, NameSpace &inameSpace); 00027 00028 virtual void generateVariableNames(const Node::VariableList &vlist, Node::Assignment &phpAssign, Node::Assignment &tplAssign); 00029 00030 virtual const string getVariableNamePrefix(); 00031 00032 virtual const string getVariableNameSufix(const bool stripControlVariableDollar); 00033 00034 virtual const string generateVariableName() ; 00035 00036 virtual void registerSmartyVariable(const string &variable); 00037 00038 virtual void processSmartyAssign(SmartyAssign *smartyAssign); 00039 00040 virtual void leaveContext(List *phpOut, List *tplOut); 00041 00042 virtual void processTemplate(Node* tpl) const; 00043 }; 00044 00045 #endif