OOFILE  1.9
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members

top parser used to parse report from XML file. More...

#include <oofriXML.h>

Inheritance diagram for OOF_XMLrepParser:
Inheritance graph
[legend]
Collaboration diagram for OOF_XMLrepParser:
Collaboration graph
[legend]

Public Member Functions

oofRepbuildingReport () const
 
virtual void endElement (const XML_Char *name)
 top level parser endElement. More...
 
 OOF_XMLrepParser (dbConnect *inDB=0)
 top level parser reading report from XML file. More...
 
 OOF_XMLrepParser (expatppNesting *, dbConnect *inDB=0)
 
oofReporphanReport ()
 Relinquishes ownership so caller responsible for deleting. More...
 
virtual XML_Status parseFile (const oofFileRef &)
 
virtual XML_Status parseFile (FILE *inFile)
 
virtual void startElement (const XML_Char *name, const XML_Char **atts)
 startElement call back. More...
 
virtual ~OOF_XMLrepParser ()
 

Protected Member Functions

virtual void endElem_adorners ()
 
virtual void endElem_layout ()
 
virtual void endElem_report ()
 
virtual void endElem_schema ()
 
virtual void endElem_section ()
 
virtual void endElem_style ()
 
virtual void endUnknownElem (const char *name)
 
virtual void FinishReport ()
 cleanup and post-process report parsed from XML. More...
 
virtual void startElem_adorners (const char **atts)
 
virtual void startElem_layout (const char **atts)
 
virtual void startElem_report (const char **atts)
 
virtual void startElem_schema (const char **atts)
 
virtual void startElem_section (const char **atts)
 
virtual void startElem_style (const char **atts)
 
virtual void startUnknownElem (const char *name, const char **atts)
 

Protected Attributes

OOF_Dictionary mAdornerDict
 
dbConnectmDB
 
oofRepPromiseCompletermGraphSettingsCompleter
 owned More...
 
oofString mID
 
oofRepMultimMultiRep
 owned More...
 
oofRepmReport
 owned - the current report being built, may actually be oofRepSection More...
 
oofString mStyleString
 
oofRepPromiseCompletermTextStyleCompleter
 owned More...
 

Detailed Description

top parser used to parse report from XML file.

May create and/or populate a dbConnect.

Definition at line 39 of file oofriXML.h.

Constructor & Destructor Documentation

OOF_XMLrepParser::OOF_XMLrepParser ( dbConnect inDB = 0)

top level parser reading report from XML file.

May read just report layout or also read style tags for text styles, report and graph settings attached to layout.

Parameters
inDBis optional existing database connection that can be used with the layout. schema tags within the XML file will be added to this DB. If no dbConnect is passed in, one is created
See also

Definition at line 379 of file oofriXML.cpp.

OOF_XMLrepParser::OOF_XMLrepParser ( expatppNesting parent,
dbConnect inDB = 0 
)

Definition at line 390 of file oofriXML.cpp.

OOF_XMLrepParser::~OOF_XMLrepParser ( )
virtual

Member Function Documentation

oofRep * OOF_XMLrepParser::buildingReport ( ) const
inline

Definition at line 240 of file oofriXML.h.

References mReport.

void OOF_XMLrepParser::endElem_adorners ( )
protectedvirtual

Definition at line 672 of file oofriXML.cpp.

Referenced by endElement().

void OOF_XMLrepParser::endElem_layout ( )
protectedvirtual

Definition at line 679 of file oofriXML.cpp.

Referenced by endElement().

void OOF_XMLrepParser::endElem_report ( )
protectedvirtual

Definition at line 639 of file oofriXML.cpp.

References FinishReport(), mMultiRep, and mReport.

Referenced by endElement().

void OOF_XMLrepParser::endElem_schema ( )
protectedvirtual
void OOF_XMLrepParser::endElem_section ( )
protectedvirtual

Definition at line 653 of file oofriXML.cpp.

References oofRepMulti::appendReport(), FinishReport(), mMultiRep, and mReport.

Referenced by endElement().

void OOF_XMLrepParser::endElem_style ( )
protectedvirtual

Definition at line 665 of file oofriXML.cpp.

Referenced by endElement().

void OOF_XMLrepParser::endElement ( const XML_Char *  name)
virtual

top level parser endElement.

  • schema creates mDB using oofRepXMLsettings::createTempConnectFiles with the newConnection in createTempConnectFiles, our schema is complete and the tables attached to it can be used in dbViews, have data added etc. until newConnection, table definitions aren't finalised as the user can change table details with calls after the dbTable ctor. The caller will usually be responsible for deleting this created database, eg: a preview window will hang onto the database for redraw purposes! Because the <schema> tag creates the database, there is ONE such tag even in a multi report, preceding all the <section> tags.
Warning
must have created some instance of dbConnect before invoking to parse a report file containing a schema

Definition at line 612 of file oofriXML.cpp.

References endElem_adorners(), endElem_layout(), endElem_report(), endElem_schema(), endElem_section(), endElem_style(), and endUnknownElem().

void OOF_XMLrepParser::endUnknownElem ( const char *  name)
protectedvirtual

Definition at line 697 of file oofriXML.cpp.

Referenced by endElement().

void OOF_XMLrepParser::FinishReport ( )
protectedvirtual

cleanup and post-process report parsed from XML.

Reconciles settings and styles read from <style> element with ID's of <layout> elements.

Definition at line 709 of file oofriXML.cpp.

References oofRepPromiseCompleter::completePromises(), OOF_Dictionary::deleteAll(), oofRepPromiseCompleter::findStringForID(), oofRep::getLocalSettings(), mAdornerDict, mGraphSettingsCompleter, mID, mReport, mStyleString, mTextStyleCompleter, oofCSS2ReportSettings::parseSettingsText(), and oofRepVisitor::visit().

Referenced by endElem_report(), and endElem_section().

oofRep * OOF_XMLrepParser::orphanReport ( )

Relinquishes ownership so caller responsible for deleting.

Returns
the generated report.

Definition at line 478 of file oofriXML.cpp.

References mReport.

Referenced by oofRepWindow::DoOpen().

XML_Status OOF_XMLrepParser::parseFile ( const oofFileRef theFile)
virtual
virtual XML_Status OOF_XMLrepParser::parseFile ( FILE *  inFile)
inlinevirtual

Definition at line 51 of file oofriXML.h.

void OOF_XMLrepParser::startElem_adorners ( const char **  atts)
protectedvirtual

Definition at line 555 of file oofriXML.cpp.

References mAdornerDict.

Referenced by startElement().

void OOF_XMLrepParser::startElem_layout ( const char **  atts)
protectedvirtual

Definition at line 562 of file oofriXML.cpp.

References mDB, mGraphSettingsCompleter, mStyleString, and mTextStyleCompleter.

Referenced by startElement().

void OOF_XMLrepParser::startElem_report ( const char **  atts)
protectedvirtual

Definition at line 517 of file oofriXML.cpp.

References mID, mMultiRep, and mReport.

Referenced by startElement().

void OOF_XMLrepParser::startElem_schema ( const char **  atts)
protectedvirtual

Definition at line 574 of file oofriXML.cpp.

Referenced by startElement().

void OOF_XMLrepParser::startElem_section ( const char **  atts)
protectedvirtual

Definition at line 536 of file oofriXML.cpp.

References mID, mMultiRep, and mReport.

Referenced by startElement().

void OOF_XMLrepParser::startElem_style ( const char **  atts)
protectedvirtual

Definition at line 548 of file oofriXML.cpp.

References mStyleString.

Referenced by startElement().

void OOF_XMLrepParser::startElement ( const XML_Char *  name,
const XML_Char **  atts 
)
virtual
void OOF_XMLrepParser::startUnknownElem ( const char *  name,
const char **  atts 
)
protectedvirtual

Definition at line 581 of file oofriXML.cpp.

References mDB.

Referenced by startElement().

Member Data Documentation

OOF_Dictionary OOF_XMLrepParser::mAdornerDict
protected

Definition at line 80 of file oofriXML.h.

Referenced by FinishReport(), and startElem_adorners().

dbConnect* OOF_XMLrepParser::mDB
protected

Definition at line 75 of file oofriXML.h.

Referenced by endElem_schema(), startElem_layout(), startUnknownElem(), and ~OOF_XMLrepParser().

oofRepPromiseCompleter* OOF_XMLrepParser::mGraphSettingsCompleter
protected

owned

Definition at line 77 of file oofriXML.h.

Referenced by FinishReport(), startElem_layout(), and ~OOF_XMLrepParser().

oofString OOF_XMLrepParser::mID
protected

Definition at line 79 of file oofriXML.h.

Referenced by FinishReport(), startElem_report(), and startElem_section().

oofRepMulti* OOF_XMLrepParser::mMultiRep
protected

owned

Definition at line 74 of file oofriXML.h.

Referenced by endElem_report(), endElem_section(), startElem_report(), and startElem_section().

oofRep* OOF_XMLrepParser::mReport
protected

owned - the current report being built, may actually be oofRepSection

Definition at line 73 of file oofriXML.h.

Referenced by buildingReport(), endElem_report(), endElem_section(), FinishReport(), orphanReport(), startElem_report(), startElem_section(), and ~OOF_XMLrepParser().

oofString OOF_XMLrepParser::mStyleString
protected

Definition at line 78 of file oofriXML.h.

Referenced by FinishReport(), startElem_layout(), and startElem_style().

oofRepPromiseCompleter* OOF_XMLrepParser::mTextStyleCompleter
protected

owned

Definition at line 76 of file oofriXML.h.

Referenced by FinishReport(), startElem_layout(), and ~OOF_XMLrepParser().


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