00001 #ifndef _MULTICONTEXT_H_ 00002 #define _MULTICONTEXT_H_ 00003 #include "rulecontext.h" 00004 00006 00011 class MultiContext : public RuleContext{ 00013 RuleContext* superContext; 00015 int usedNames; 00017 const string namePrefix; 00019 const string controlVariableName; 00021 const int controlVariableId; 00022 00023 public: 00025 MultiContext(RuleContext* isuperContext, const int icontrolVariableId, const string icontrolVariableName); 00026 00028 MultiContext(RuleContext* isuperContext, const int icontrolVariableId); 00029 00030 virtual const string getVariableNameSufix(const bool stripControlVariableDollar); 00031 00032 virtual const string getVariableNamePrefix(); 00033 00034 00035 virtual void generateVariableNames(const Node::VariableList &vlist, Node::Assignment &phpAssign, Node::Assignment &tplAssign); 00036 00037 virtual void enterContext(List *phpOut, List *tplOut) ; 00038 00039 virtual const string generateVariableName(); 00040 00041 virtual void registerSmartyVariable(const string &variable); 00042 00043 virtual void processSmartyAssign(SmartyAssign *smartyAssign); 00044 00045 virtual void processTemplate(Node* tpl) const; 00046 }; 00047 00048 #endif