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

HTMLBox Class Reference

Stores and refactors html code. More...

#include <htmlbox.h>


Public Member Functions

 HTMLBox ()
 constructor

void setOutDir (const string &ioutDir)
 Sets outpt directory.

void putHTML (const string &html)
 Puts html into the box.

void regenerate ()
 Regenerates collected HTML.

string getHTML (const string &html)
 Returns refactored html.

string normalize (const string &html)
 Normalizes inserted html.


Data Fields

HTMLBox::Putter putter
 Puts InlineHTML into given HTMLBox.

HTMLBox::Replacer replacer
 Extracts InlineHTML from given HTMLBox.


Private Types

typedef map< string, CollectedHTMLInfoCollectedHTMLInfoMap
 Map for storing info about html.


Private Member Functions

string generateIncludeName ()
 Generates a name for include file.


Private Attributes

CollectedHTMLInfoMap collectedHTML
 Map for storing info about html.

string outDir
 Output dir for include files.

int usedNames
 Used names for templates.

int regenerated
 Is code regenerated.


Detailed Description

Stores and refactors html code.

Definition at line 14 of file htmlbox.h.


Member Typedef Documentation

typedef map<string,CollectedHTMLInfo> HTMLBox::CollectedHTMLInfoMap [private]
 

Map for storing info about html.

Definition at line 48 of file htmlbox.h.


Constructor & Destructor Documentation

HTMLBox::HTMLBox  )  [inline]
 

constructor

Definition at line 67 of file htmlbox.h.

References putter, regenerated, replacer, and usedNames.


Member Function Documentation

string HTMLBox::generateIncludeName  )  [private]
 

Generates a name for include file.

Definition at line 24 of file htmlbox.cpp.

References usedNames.

Referenced by putHTML().

string HTMLBox::getHTML const string &  html  ) 
 

Returns refactored html.

Definition at line 94 of file htmlbox.cpp.

References collectedHTML, regenerate(), and regenerated.

Referenced by HTMLBox::Replacer::transform().

string HTMLBox::normalize const string &  html  ) 
 

Normalizes inserted html.

lowercases and removes unnaccesary whitespaces

Definition at line 37 of file htmlbox.cpp.

Referenced by putHTML().

void HTMLBox::putHTML const string &  html  ) 
 

Puts html into the box.

When html appears more than once an include file is generated, and the html is changed to include statement.

Definition at line 67 of file htmlbox.cpp.

References collectedHTML, generateIncludeName(), normalize(), and outDir.

Referenced by HTMLBox::Putter::transform().

void HTMLBox::regenerate  ) 
 

Regenerates collected HTML.

Definition at line 87 of file htmlbox.cpp.

References regenerated.

Referenced by getHTML().

void HTMLBox::setOutDir const string &  ioutDir  )  [inline]
 

Sets outpt directory.

Definition at line 70 of file htmlbox.h.

References outDir.

Referenced by PHPFiles::PHPFiles().


Field Documentation

CollectedHTMLInfoMap HTMLBox::collectedHTML [private]
 

Map for storing info about html.

Definition at line 51 of file htmlbox.h.

Referenced by getHTML(), and putHTML().

string HTMLBox::outDir [private]
 

Output dir for include files.

Definition at line 54 of file htmlbox.h.

Referenced by putHTML(), and setOutDir().

HTMLBox::Putter HTMLBox::putter
 

Puts InlineHTML into given HTMLBox.

Referenced by HTMLBox(), and PHPFiles::processHTML().

int HTMLBox::regenerated [private]
 

Is code regenerated.

Definition at line 60 of file htmlbox.h.

Referenced by getHTML(), HTMLBox(), and regenerate().

HTMLBox::Replacer HTMLBox::replacer
 

Extracts InlineHTML from given HTMLBox.

Referenced by HTMLBox(), and PHPFiles::processHTML().

int HTMLBox::usedNames [private]
 

Used names for templates.

Definition at line 57 of file htmlbox.h.

Referenced by generateIncludeName(), and HTMLBox().


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