musrWiz 0.1.0
Loading...
Searching...
No Matches
PMusrWizDefaultXMLParser Class Reference

The PMusrWizDefaultXMLParser class parses the musrWiz.xml default settings file. More...

#include <PAdmin.h>

Public Member Functions

 PMusrWizDefaultXMLParser (const QString &fln, PAdmin *)
 Constructor. Parses the given musrWiz.xml file.
 
virtual ~PMusrWizDefaultXMLParser ()
 Destructor.
 
virtual bool isValid ()
 Checks if the XML parsing was successful.
 

Private Types

enum  EKeyWords { eEmpty , eInstitute , eInstrument , eFitType }
 Enumeration of XML tag keywords for parsing state machine. More...
 

Private Member Functions

bool parse (QIODevice *device)
 
bool startDocument ()
 
bool startElement ()
 
bool endElement ()
 
bool characters ()
 
bool endDocument ()
 

Private Attributes

QXmlStreamReader fXml
 xml stream reader object
 
bool fValid
 flag showing if XML read has been successful
 
EKeyWords fKeyWord
 key word tag to know how to handle the content
 
PAdminfAdmin
 a pointer to the main administration class object
 
PMusrWizDefault fDefault
 default settings being parsed
 

Detailed Description

The PMusrWizDefaultXMLParser class parses the musrWiz.xml default settings file.

This class reads the musrWiz.xml file which contains the default settings for the wizard, including the default institute, instrument, and fit type.

Member Enumeration Documentation

◆ EKeyWords

Enumeration of XML tag keywords for parsing state machine.

Enumerator
eEmpty 
eInstitute 
eInstrument 
eFitType 

Constructor & Destructor Documentation

◆ PMusrWizDefaultXMLParser()

PMusrWizDefaultXMLParser::PMusrWizDefaultXMLParser ( const QString & fln,
PAdmin * admin )

Constructor. Parses the given musrWiz.xml file.

Parameters
flnPath to the musrWiz.xml file.
adminPointer to the PAdmin object where parsed defaults will be stored.

XML Parser class for the musrWiz default settings.

Parameters
adminpointer to an admin class instance.

◆ ~PMusrWizDefaultXMLParser()

virtual PMusrWizDefaultXMLParser::~PMusrWizDefaultXMLParser ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ characters()

bool PMusrWizDefaultXMLParser::characters ( )
private

This routine delivers the content of an XML tag. It fills the content into the load data structure.

◆ endDocument()

bool PMusrWizDefaultXMLParser::endDocument ( )
private

Called at the end of the XML parse process.

◆ endElement()

bool PMusrWizDefaultXMLParser::endElement ( )
private

Routine called when the end XML tag is found. It is used to put the filtering tag to 'empty'. It also resets the fFunc flag in case the entry was a theory function.

◆ isValid()

virtual bool PMusrWizDefaultXMLParser::isValid ( )
inlinevirtual

Checks if the XML parsing was successful.

Returns
true if parsing succeeded, false otherwise.

◆ parse()

bool PMusrWizDefaultXMLParser::parse ( QIODevice * device)
private

parse the musrWiz startup xml-file.

Parameters
deviceQFile object of the musrWiz startup xml-file
Returns
true on success, false otherwise

◆ startDocument()

bool PMusrWizDefaultXMLParser::startDocument ( )
private

Routine called at the beginning of the XML parsing process.

◆ startElement()

bool PMusrWizDefaultXMLParser::startElement ( )
private

Routine called when a new XML tag is found. Here it is used to set a tag for filtering afterwards the content.

Member Data Documentation

◆ fAdmin

PAdmin* PMusrWizDefaultXMLParser::fAdmin
private

a pointer to the main administration class object

◆ fDefault

PMusrWizDefault PMusrWizDefaultXMLParser::fDefault
private

default settings being parsed

◆ fKeyWord

EKeyWords PMusrWizDefaultXMLParser::fKeyWord
private

key word tag to know how to handle the content

◆ fValid

bool PMusrWizDefaultXMLParser::fValid
private

flag showing if XML read has been successful

◆ fXml

QXmlStreamReader PMusrWizDefaultXMLParser::fXml
private

xml stream reader object


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