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

TriggeredRule Class Reference

Inserts a rule into context, when other rule was successfully executed. More...

#include <rtreetriggeredrule.h>

Inheritance diagram for TriggeredRule:

Rule

Public Member Functions

 TriggeredRule (PriorityRulePair *iinRule, PriorityRulePair *ioutRule)
 Constructor.

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

PriorityRulePairinRulePair
 A rule to execute.

PriorityRulePairoutRulePair
 When the rule inRulePair is successfully executed this rule is inserted into the context.


Detailed Description

Inserts a rule into context, when other rule was successfully executed.

Definition at line 7 of file rtreetriggeredrule.h.


Constructor & Destructor Documentation

TriggeredRule::TriggeredRule PriorityRulePair iinRule,
PriorityRulePair ioutRule
 

Constructor.

Definition at line 3 of file rtreetriggeredrule.cpp.

Referenced by copy().

TriggeredRule::~TriggeredRule  )  [virtual]
 

Definition at line 6 of file rtreetriggeredrule.cpp.

References inRulePair, and outRulePair.


Member Function Documentation

Rule * TriggeredRule::copy  )  [virtual]
 

Copies the rule.

Implements Rule.

Definition at line 20 of file rtreetriggeredrule.cpp.

References inRulePair, outRulePair, PriorityRulePair, and TriggeredRule().

bool TriggeredRule::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 13 of file rtreetriggeredrule.cpp.

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

Writes the rule to the stream.

Implements Rule.

Definition at line 30 of file rtreetriggeredrule.cpp.

References inRulePair.

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

Substitutes variables used in the rule.

Implements Rule.

Definition at line 24 of file rtreetriggeredrule.cpp.

References inRulePair, and outRulePair.


Field Documentation

PriorityRulePair* TriggeredRule::inRulePair [private]
 

A rule to execute.

Definition at line 9 of file rtreetriggeredrule.h.

Referenced by copy(), print(), substitute(), and ~TriggeredRule().

PriorityRulePair* TriggeredRule::outRulePair [private]
 

When the rule inRulePair is successfully executed this rule is inserted into the context.

Definition at line 11 of file rtreetriggeredrule.h.

Referenced by copy(), substitute(), and ~TriggeredRule().


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