gSAFE
1.3.8
|
#include <docgen.h>
Inherits QObject, and QXmlDefaultHandler.
Signals | |
void | errorSignal (QString err) |
Public Member Functions | |
HyperDoc (QString n) | |
~HyperDoc () | |
void | add (QString docstr) |
void | addDataSource (HTable *ht, QString redefinedName="") |
void | addIterDataTables (HFloatTables *ft) |
void | addResourceProvider (HResourceProvider *rp) |
void | clear () |
void | clearResources () |
QString | generateDoc () |
QString | getName (void) |
QString | getRawDoc () |
void | set (QString docstr) |
void | setName (QString n) |
Public Attributes | |
QList< QString > * | dtsn |
QList< HTable * > * | dtsp |
QList< HFloatTables * > * | fts |
QList< HResourceProvider * > * | resourceProviders |
Protected Member Functions | |
void | clearBuffer () |
QString | getData (QString data) |
HFloatTables * | getHFT (QString res) |
QString | getRes (QString res) |
void | out (QString o) |
Protected Attributes | |
QString | att_begin |
QString | att_end |
QString | att_notfound |
QString | body |
QString | buffer |
QString | errstr |
bool | ignore |
HTable * | insideIter |
QString | iter_hft_name |
QString | iter_notfound |
QString | iterbuffer |
bool | itermode |
QString | name |
QString | preprocessed |
int | skip_cond_deep |
HyperDoc is a template document class.
This class is store a html based document template, which references some (datalib) data. The template document can contains XML control elements which replaced to data fields when the processed document is generated. Just like in circular letters. The referenced data can came from HTable, HList or Resource provider classes (HResourceProvider). You can use [ ] | signs in the document which are converted to < > " signs in the final document. (We use this sings above that's why the template codes should be irrelevant for the xml parser) Useable control elements:
If the requested data not found nothing appear, unless you fill the notfound attribute
HyperDoc::HyperDoc | ( | QString | n | ) |
Creates an empty HyperDoc template document object
n | the name of the template. |
Definition at line 19 of file docgen.cpp.
HyperDoc::~HyperDoc | ( | ) |
Destructor
Definition at line 38 of file docgen.cpp.
void HyperDoc::add | ( | QString | docstr | ) |
Append a text to the current template document (concatenated to the end)
Definition at line 60 of file docgen.cpp.
void HyperDoc::addDataSource | ( | HTable * | ht, |
QString | redefinedName = "" |
||
) |
Add a new data source object (HTable) This is the data provider of DATA tag.
ht | the data source pointer |
redefinedName | the redefined data source name. If this parameter missing the default name will be the name of the HTable. |
Definition at line 73 of file docgen.cpp.
void HyperDoc::addIterDataTables | ( | HFloatTables * | ft | ) |
Add a new list item provider object (HFloatTables) This is the data provider of ITER tag.
ft | the list item provider object |
Definition at line 89 of file docgen.cpp.
void HyperDoc::addResourceProvider | ( | HResourceProvider * | rp | ) |
Add a new resource provider object (HResourceProvider) This is the data provider of RES tag.
rp | the resource provider object |
Definition at line 84 of file docgen.cpp.
void HyperDoc::clear | ( | void | ) |
Clears the current template document
Definition at line 50 of file docgen.cpp.
void HyperDoc::clearResources | ( | ) |
Clears all hyperdoc data source and resource providers (Including ITER,DATA,RES providers)
Definition at line 65 of file docgen.cpp.
|
signal |
This signal is emitted if error occured.
QString HyperDoc::generateDoc | ( | ) |
Returns the processed document.
Definition at line 200 of file docgen.cpp.
|
inline |
QString HyperDoc::getRawDoc | ( | ) |
Returns the raw untouched template document
Definition at line 94 of file docgen.cpp.
void HyperDoc::set | ( | QString | docstr | ) |
Sets the text of the template document
Definition at line 55 of file docgen.cpp.
|
inline |