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

PHPFiles Class Reference

Stores informations about all refactored files. More...

#include <phpfiles.h>


Public Member Functions

 PHPFiles (istream &phpConfig, int iyydebug=0)
 Constructor.

void execute ()
 Refactors all files.

 ~PHPFiles ()
 Destructor.


Private Types

typedef list< PHPFileInfoPHPFileInfoList
 List of file infos.

typedef PHPFileInfoList::iterator iterator
 PHPFileInfoList iterator.

typedef PHPFileInfoList::const_iterator const_iterator
 PHPFileInfoList iterator.


Private Member Functions

void phpHeader (StatementList *phpOut) const
 Generates php file header -- smarty initialization.

void phpFooter (StatementList *phpOut, const string tplName) const
 Generates php file footer -- smarty dispaly.

void executeRuleSystemAtTime ()
 Executes RuleSystem on all files.

void executeRuleSystem ()
 Executes RuleSystem on all files for all times.

void loadIn ()
 Loads and normalizes the files.

void saveOut ()
 Saves refactored code to files.

void processHTML ()
 Finds similar parts of html.


Private Attributes

RuleSystem factor
 Rule system.

string inDir
 Directory the files are taken from.

string outDir
 Directory the files are stored to.

PHPFileInfoList phpFileInfos
 Information about refactored php files.

HTMLBox htmlBox
 Box for storing html and extracting similar code.

int yydebug
 If true parser debug messages are printed.


Detailed Description

Stores informations about all refactored files.

Definition at line 17 of file phpfiles.h.


Member Typedef Documentation

typedef PHPFileInfoList::const_iterator PHPFiles::const_iterator [private]
 

PHPFileInfoList iterator.

Definition at line 47 of file phpfiles.h.

typedef PHPFileInfoList::iterator PHPFiles::iterator [private]
 

PHPFileInfoList iterator.

Definition at line 45 of file phpfiles.h.

Referenced by executeRuleSystemAtTime(), loadIn(), processHTML(), saveOut(), and ~PHPFiles().

typedef list<PHPFileInfo> PHPFiles::PHPFileInfoList [private]
 

List of file infos.

Definition at line 43 of file phpfiles.h.


Constructor & Destructor Documentation

PHPFiles::PHPFiles istream &  phpConfig,
int  iyydebug = 0
[inline]
 

Constructor.

Reads configuration file

Definition at line 141 of file phpfiles.h.

References htmlBox, inDir, outDir, phpFileInfos, HTMLBox::setOutDir(), and yydebug.

PHPFiles::~PHPFiles  )  [inline]
 

Destructor.

Definition at line 168 of file phpfiles.h.

References iterator, and phpFileInfos.


Member Function Documentation

void PHPFiles::execute  )  [inline]
 

Refactors all files.

Definition at line 155 of file phpfiles.h.

References executeRuleSystem(), loadIn(), processHTML(), and saveOut().

Referenced by main().

void PHPFiles::executeRuleSystem  )  [inline, private]
 

Executes RuleSystem on all files for all times.

Definition at line 78 of file phpfiles.h.

References executeRuleSystemAtTime(), factor, and RuleSystem::stepTime().

Referenced by execute().

void PHPFiles::executeRuleSystemAtTime  )  [inline, private]
 

Executes RuleSystem on all files.

Definition at line 65 of file phpfiles.h.

References RuleSystem::execute(), factor, RuleSystem::getRuleRunTime(), iterator, and phpFileInfos.

Referenced by executeRuleSystem().

void PHPFiles::loadIn  )  [inline, private]
 

Loads and normalizes the files.

Definition at line 85 of file phpfiles.h.

References inDir, iterator, phpFileInfos, and yydebug.

Referenced by execute().

void PHPFiles::phpFooter StatementList phpOut,
const string  tplName
const [private]
 

Generates php file footer -- smarty dispaly.

Definition at line 9 of file phpfiles.cpp.

References List::push_back().

Referenced by saveOut().

void PHPFiles::phpHeader StatementList phpOut  )  const [private]
 

Generates php file header -- smarty initialization.

Definition at line 3 of file phpfiles.cpp.

References List::push_front().

Referenced by saveOut().

void PHPFiles::processHTML  )  [inline, private]
 

Finds similar parts of html.

Definition at line 118 of file phpfiles.h.

References htmlBox, iterator, phpFileInfos, HTMLBox::putter, and HTMLBox::replacer.

Referenced by execute().

void PHPFiles::saveOut  )  [inline, private]
 

Saves refactored code to files.

Definition at line 99 of file phpfiles.h.

References iterator, outDir, phpFileInfos, phpFooter(), phpHeader(), and phpName2tplName().

Referenced by execute().


Field Documentation

RuleSystem PHPFiles::factor [private]
 

Rule system.

Definition at line 35 of file phpfiles.h.

Referenced by executeRuleSystem(), and executeRuleSystemAtTime().

HTMLBox PHPFiles::htmlBox [private]
 

Box for storing html and extracting similar code.

Definition at line 53 of file phpfiles.h.

Referenced by PHPFiles(), and processHTML().

string PHPFiles::inDir [private]
 

Directory the files are taken from.

Definition at line 38 of file phpfiles.h.

Referenced by loadIn(), and PHPFiles().

string PHPFiles::outDir [private]
 

Directory the files are stored to.

Definition at line 40 of file phpfiles.h.

Referenced by PHPFiles(), and saveOut().

PHPFileInfoList PHPFiles::phpFileInfos [private]
 

Information about refactored php files.

Definition at line 50 of file phpfiles.h.

Referenced by executeRuleSystemAtTime(), loadIn(), PHPFiles(), processHTML(), saveOut(), and ~PHPFiles().

int PHPFiles::yydebug [private]
 

If true parser debug messages are printed.

Definition at line 56 of file phpfiles.h.

Referenced by loadIn(), and PHPFiles().


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