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

ActionRule Class Reference

When the imput is mathced the rule performs some action. More...

#include <rtreeactionrule.h>

Inheritance diagram for ActionRule:

Rule

Public Member Functions

 ActionRule (List *iphpInPattern, ActionList *iactions)
 Constructor.

virtual ~ActionRule ()
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

ListphpInPattern
 php in pattern

ActionListactions
 action list


Detailed Description

When the imput is mathced the rule performs some action.

Definition at line 64 of file rtreeactionrule.h.


Constructor & Destructor Documentation

ActionRule::ActionRule List iphpInPattern,
ActionList iactions
 

Constructor.

Definition at line 94 of file rtreeactionrule.cpp.

Referenced by copy().

ActionRule::~ActionRule  )  [virtual]
 

Definition at line 97 of file rtreeactionrule.cpp.

References actions, and phpInPattern.


Member Function Documentation

Rule * ActionRule::copy  )  [virtual]
 

Copies the rule.

Implements Rule.

Definition at line 116 of file rtreeactionrule.cpp.

References ActionRule(), actions, ActionList::copy(), List::copyList(), and phpInPattern.

bool ActionRule::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 102 of file rtreeactionrule.cpp.

References actions, ActionList::copy(), ActionList::execute(), List::getLength(), RuleContext::getNameSpace(), List::matchToBegining(), phpInPattern, List::push_back(), and ActionList::substitute().

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

Writes the rule to the stream.

Implements Rule.

Definition at line 126 of file rtreeactionrule.cpp.

References phpInPattern, and List::print().

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

Substitutes variables used in the rule.

Implements Rule.

Definition at line 120 of file rtreeactionrule.cpp.

References actions, phpInPattern, ActionList::substitute(), and List::substitute().


Field Documentation

ActionList* ActionRule::actions [private]
 

action list

Definition at line 68 of file rtreeactionrule.h.

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

List* ActionRule::phpInPattern [private]
 

php in pattern

Definition at line 66 of file rtreeactionrule.h.

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


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