Main Page | Class Hierarchy | Alphabetical List | Data Structures | File List | Data Fields | Globals

Rule Class Reference

Rule for php refactoring. More...

#include <rtree.h>

Inheritance diagram for Rule:

ActionRule ContextRule IncludeRule NamedContextRule RuleWithActionRule SubstitutionRule TriggeredRule MultiContextRule SingleContextRule

Public Member Functions

virtual bool execute (RuleContext *context, List *phpIn, List *phpOut, List *tplOut, Node::Assignment &assign) const=0
 Executer the rule on php.

virtual Rulecopy ()=0
 Copies the rule.

virtual Rulesubstitute (const Node::Assignment &assign)=0
 Substitutes variables used in the rule.

virtual ostream & print (ostream &os) const=0
 Writes the rule to the stream.


Friends

ostream & operator<< (ostream &os, const Rule *rule)
 Writes the rule to the stream.


Detailed Description

Rule for php refactoring.

Definition at line 11 of file rtree.h.


Member Function Documentation

virtual Rule* Rule::copy  )  [pure virtual]
 

Copies the rule.

Implemented in ActionRule, RuleWithActionRule, IncludeRule, MultiContextRule, NamedContextRule, SingleContextRule, SubstitutionRule, and TriggeredRule.

Referenced by RuleWithActionRule::copy().

virtual bool Rule::execute RuleContext context,
List phpIn,
List phpOut,
List tplOut,
Node::Assignment assign
const [pure virtual]
 

Executer the rule on php.

Parameters:
context context in which rule is executed
phpIn input php
phpOut output php
tplOut output smarty template
assign the assignment used to match the rule
Returns:
true is rule was succefully executed
If rule was succefully executed refactored php is deleted from the begining of phpIn list.

Implemented in ActionRule, RuleWithActionRule, ContextRule, IncludeRule, NamedContextRule, SubstitutionRule, and TriggeredRule.

Referenced by RuleWithActionRule::execute().

virtual ostream& Rule::print ostream &  os  )  const [pure virtual]
 

Writes the rule to the stream.

Implemented in ActionRule, RuleWithActionRule, IncludeRule, MultiContextRule, NamedContextRule, SingleContextRule, SubstitutionRule, and TriggeredRule.

virtual Rule* Rule::substitute const Node::Assignment assign  )  [pure virtual]
 

Substitutes variables used in the rule.

Implemented in ActionRule, RuleWithActionRule, ContextRule, IncludeRule, NamedContextRule, SubstitutionRule, and TriggeredRule.

Referenced by RuleWithActionRule::substitute().


Friends And Related Function Documentation

ostream& operator<< ostream &  os,
const Rule rule
[friend]
 

Writes the rule to the stream.

Definition at line 35 of file rtree.h.


The documentation for this class was generated from the following file:
Generated on Fri Nov 21 17:54:09 2003 for PHPX by doxygen 1.3.3