The PFuncXMLParser class parses the musrfit_funcs.xml file.
More...
#include <PAdmin.h>
|
| enum | EFuncKeyWords {
eEmpty
, eTemplateName
, eTemplateTheo
, eTemplateFunc
,
eName
, eAbbrv
, eNoOfParam
, eParam
,
eParamName
, eParamValue
, eParamMap
} |
| | Enumeration of XML tag keywords for parsing state machine. More...
|
| |
The PFuncXMLParser class parses the musrfit_funcs.xml file.
This class reads and parses the XML file containing musrfit function definitions and theory templates. The parsed data is stored in the PAdmin object which is passed to the constructor.
◆ EFuncKeyWords
Enumeration of XML tag keywords for parsing state machine.
| Enumerator |
|---|
| eEmpty | |
| eTemplateName | |
| eTemplateTheo | |
| eTemplateFunc | |
| eName | |
| eAbbrv | |
| eNoOfParam | |
| eParam | |
| eParamName | |
| eParamValue | |
| eParamMap | |
◆ PFuncXMLParser()
| PFuncXMLParser::PFuncXMLParser |
( |
const QString & | fln, |
|
|
PAdmin * | admin ) |
Constructor. Parses the given XML file.
- Parameters
-
| fln | Path to the musrfit_funcs.xml file. |
| admin | Pointer to the PAdmin object where parsed data will be stored. |
XML Parser class for the musrWiz function file.
- Parameters
-
| admin | pointer to an admin class instance. |
◆ ~PFuncXMLParser()
| virtual PFuncXMLParser::~PFuncXMLParser |
( |
| ) |
|
|
inlinevirtual |
◆ characters()
| bool PFuncXMLParser::characters |
( |
| ) |
|
|
private |
This routine delivers the content of an XML tag. It fills the content into the load data structure.
◆ endDocument()
| bool PFuncXMLParser::endDocument |
( |
| ) |
|
|
private |
Called at the end of the XML parse process. It checks if default paths contain system variables, and if so expand them for the further use.
◆ endElement()
| bool PFuncXMLParser::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 PFuncXMLParser::isValid |
( |
| ) |
|
|
inlinevirtual |
Checks if the XML parsing was successful.
- Returns
- true if parsing succeeded, false otherwise.
◆ parse()
| bool PFuncXMLParser::parse |
( |
QIODevice * | device | ) |
|
|
private |
parse musrfit_funcs.xml
- Parameters
-
| device | QFile object of musrfit_funcs.xml |
- Returns
- true on success, false otherwise
◆ startDocument()
| bool PFuncXMLParser::startDocument |
( |
| ) |
|
|
private |
Routine called at the beginning of the XML parsing process.
◆ startElement()
| bool PFuncXMLParser::startElement |
( |
| ) |
|
|
private |
Routine called when a new XML tag is found. Here it is used to set a tag for filtering afterwards the content.
◆ fAdmin
| PAdmin* PFuncXMLParser::fAdmin |
|
private |
a pointer to the main administration class object
◆ fFunc
current function being parsed
◆ fKeyWord
key word tag to know how to handle the content
◆ fParam
current function parameter being parsed
◆ fTheoTemplate
current theory template being parsed
◆ fValid
| bool PFuncXMLParser::fValid |
|
private |
flag showing if XML read has been successful
◆ fXml
| QXmlStreamReader PFuncXMLParser::fXml |
|
private |
The documentation for this class was generated from the following files:
- /workspace/LMU/musrfit/src/musredit_qt6/musrWiz/PAdmin.h
- /workspace/LMU/musrfit/src/musredit_qt6/musrWiz/PAdmin.cpp