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

RuleSystem Class Reference

Refactoring system. More...

#include <rulesystem.h>


Public Types

typedef map< string, RunRuleListNamedRunRuleList
 A run rule list for every context name.


Public Member Functions

 RuleSystem (int debug=0)
 Constructor.

void execute (const string &phpFileName, StatementList *phpIn, StatementList *phpOut, StatementList *tplOut)
 Executes system on a given program.

 ~RuleSystem ()
 Destructor.

RunRuleListgetRunRuleList (const string &contextName)
 Return rule list for a given context.

bool stepTime ()
 Steps to the next run time.

int getRuleRunTime () const
 Returns the cournent run time.


Private Attributes

NamedRunRuleList runRules
 Rules of the system.

NameSpace mainNameSpace
 The main name space -- for globals.

set< int > ruleRunTimes
 All run times -- used internally.

set< int >::iterator courrentRunTime
 Courent run time.


Detailed Description

Refactoring system.

Definition at line 12 of file rulesystem.h.


Member Typedef Documentation

typedef map<string, RunRuleList> RuleSystem::NamedRunRuleList
 

A run rule list for every context name.

Definition at line 15 of file rulesystem.h.


Constructor & Destructor Documentation

RuleSystem::RuleSystem int  debug = 0  ) 
 

Constructor.

Definition at line 29 of file rulesystem.cpp.

References courrentRunTime, MYRULES, NamedRuleList::name, ruleRunTimes, NamedRuleList::rules, runRules, and NamedRuleList::runTime.

RuleSystem::~RuleSystem  ) 
 

Destructor.

Definition at line 59 of file rulesystem.cpp.


Member Function Documentation

void RuleSystem::execute const string &  phpFileName,
StatementList phpIn,
StatementList phpOut,
StatementList tplOut
 

Executes system on a given program.

Parameters:
phpIn -- tree of a file
tplName -- name of the generated template to be put in php code
phpOut -- refactored php codd
tplOut -- generated template

Definition at line 19 of file rulesystem.cpp.

References NameSpace::importLocals(), MAINCONTEXTNAME, mainNameSpace, NamedContextRule::runRules(), and runRules.

Referenced by PHPFiles::executeRuleSystemAtTime().

int RuleSystem::getRuleRunTime  )  const [inline]
 

Returns the cournent run time.

Definition at line 44 of file rulesystem.h.

References courrentRunTime.

Referenced by PHPFiles::executeRuleSystemAtTime().

RunRuleList& RuleSystem::getRunRuleList const string &  contextName  )  [inline]
 

Return rule list for a given context.

Definition at line 39 of file rulesystem.h.

References runRules.

bool RuleSystem::stepTime  ) 
 

Steps to the next run time.

Definition at line 50 of file rulesystem.cpp.

References courrentRunTime, mainNameSpace, ruleRunTimes, and NameSpace::setRuleRunTime().

Referenced by PHPFiles::executeRuleSystem().


Field Documentation

set<int>::iterator RuleSystem::courrentRunTime [private]
 

Courent run time.

Definition at line 26 of file rulesystem.h.

Referenced by getRuleRunTime(), RuleSystem(), and stepTime().

NameSpace RuleSystem::mainNameSpace [private]
 

The main name space -- for globals.

Definition at line 22 of file rulesystem.h.

Referenced by execute(), and stepTime().

set<int> RuleSystem::ruleRunTimes [private]
 

All run times -- used internally.

Definition at line 24 of file rulesystem.h.

Referenced by RuleSystem(), and stepTime().

NamedRunRuleList RuleSystem::runRules [private]
 

Rules of the system.

Definition at line 20 of file rulesystem.h.

Referenced by execute(), getRunRuleList(), and RuleSystem().


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