gSAFE  1.3.8
Signals | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
HyperDoc Class Reference

#include <docgen.h>

Inherits QObject, and QXmlDefaultHandler.


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)
HFloatTablesgetHFT (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
QString iter_hft_name
QString iter_notfound
QString iterbuffer
bool itermode
QString name
QString preprocessed
int skip_cond_deep

Detailed Description

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

See Also

Definition at line 41 of file docgen.h.

Constructor & Destructor Documentation

HyperDoc::HyperDoc ( QString  n)

Creates an empty HyperDoc template document object

nthe name of the template.

Definition at line 19 of file docgen.cpp.

HyperDoc::~HyperDoc ( )


Definition at line 38 of file docgen.cpp.

Member Function Documentation

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.

htthe data source pointer
redefinedNamethe redefined data source name. If this parameter missing the default name will be the name of the HTable.
See Also

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.

ftthe list item provider object
See Also

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.

rpthe resource provider object
See Also

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)

See Also

Definition at line 65 of file docgen.cpp.

void HyperDoc::errorSignal ( QString  err)

This signal is emitted if error occured.

QString HyperDoc::generateDoc ( )

Returns the processed document.

Definition at line 200 of file docgen.cpp.

QString HyperDoc::getName ( void  )

Returns the template doc name

Definition at line 85 of file docgen.h.

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.

void HyperDoc::setName ( QString  n)

Sets the template doc name

Definition at line 87 of file docgen.h.

The documentation for this class was generated from the following files: