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

RuleWithActionRule Class Reference

When the given rule is succesfully executes this rule performs some action. More...

#include <rtreeactionrule.h>

Inheritance diagram for RuleWithActionRule:

Rule

Public Member Functions

 RuleWithActionRule (Rule *irule, ActionList *iactions)
 Constructor.

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

virtual Rulecopy ()
 Copies the rule.

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

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


Private Attributes

Rulerule
 php in pattern

ActionListactions
 action list


Detailed Description

When the given rule is succesfully executes this rule performs some action.

Definition at line 85 of file rtreeactionrule.h.


Constructor & Destructor Documentation

RuleWithActionRule::RuleWithActionRule Rule irule,
ActionList iactions
 

Constructor.

Definition at line 134 of file rtreeactionrule.cpp.

Referenced by copy().

RuleWithActionRule::~RuleWithActionRule  )  [virtual]
 

Definition at line 137 of file rtreeactionrule.cpp.

References actions, and rule.


Member Function Documentation

Rule * RuleWithActionRule::copy  )  [virtual]
 

Copies the rule.

Implements Rule.

Definition at line 152 of file rtreeactionrule.cpp.

References actions, ActionList::copy(), Rule::copy(), rule, and RuleWithActionRule().

bool RuleWithActionRule::execute RuleContext context,
List phpIn,
List phpOut,
List tplOut,
Node::Assignment assign
const [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.

Implements Rule.

Definition at line 142 of file rtreeactionrule.cpp.

References actions, ActionList::copy(), ActionList::execute(), Rule::execute(), RuleContext::getNameSpace(), rule, and ActionList::substitute().

ostream & RuleWithActionRule::print ostream &  os  )  const [virtual]
 

Writes the rule to the stream.

Implements Rule.

Definition at line 162 of file rtreeactionrule.cpp.

References rule.

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

Substitutes variables used in the rule.

Implements Rule.

Definition at line 156 of file rtreeactionrule.cpp.

References actions, rule, ActionList::substitute(), and Rule::substitute().


Field Documentation

ActionList* RuleWithActionRule::actions [private]
 

action list

Definition at line 89 of file rtreeactionrule.h.

Referenced by copy(), execute(), substitute(), and ~RuleWithActionRule().

Rule* RuleWithActionRule::rule [private]
 

php in pattern

Definition at line 87 of file rtreeactionrule.h.

Referenced by copy(), execute(), print(), substitute(), and ~RuleWithActionRule().


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