00001 #include "rtreesinglecontextrule.h" 00002 #include "singlecontext.h" 00003 00004 SingleContextRule::SingleContextRule(List* iphpInPattern, List* itplOutPattern, List* iphpOutPattern) : 00005 ContextRule(iphpInPattern,itplOutPattern,iphpOutPattern) {}; 00006 00007 Rule* SingleContextRule::copy(){ 00008 return new SingleContextRule(phpInPattern->copyList(), 00009 tplOutPattern->copyList(), 00010 phpOutPattern->copyList()); 00011 00012 }; 00013 00014 RuleContext* SingleContextRule::generateSubcontext(RuleContext *context, const Node::Assignment &assign) const { 00015 return new SingleContext(context); 00016 }; 00017 00018 ostream& SingleContextRule::print (ostream& os) const{ 00019 os << "SingleContextRule - "; 00020 phpInPattern->print(os); 00021 return os; 00022 }; 00023