lemAutoRun
1.0
|
#include <PAutoRunParser.h>
Public Member Functions | |
PSAX2AutoRunParseHandler (PAutoRunParser *arp) | |
~PSAX2AutoRunParseHandler () | |
void | startDocument () |
void | startElement (const XMLCh *const uri, const XMLCh *const localname, const XMLCh *const qname, const Attributes &attrs) |
void | characters (const XMLCh *const chars, const XMLSize_t length) |
void | endElement (const XMLCh *const uri, const XMLCh *const localname, const XMLCh *const qname) |
void | endDocument () |
void | warning (const SAXParseException &exc) |
void | error (const SAXParseException &exc) |
void | fatalError (const SAXParseException &exc) |
void | internalFatalError (QString &msg) |
Private Member Functions | |
void | ClearAutoRunCmd () |
void | CheckOdbSetDataParamsStructure () |
Private Attributes | |
bool | fFatalError |
indicates an internal fatal error while parsing More... | |
PAutoRunParser * | fArp |
pointer to the calling auto run parser More... | |
PAutoRunCmdVector * | fAutoRunCmdVector |
pointer to the expanded auto run command vector More... | |
QString | fFlnAutoRunSeq |
file name of the user auto run sequence More... | |
int | fCurrentUserLineNo |
current line number of the user auto run sequence. Needed for error msg More... | |
AutoRunCmd | fAutoRunCmd |
single auto run command. Used as parsing variable before pushed into the fAutoRunCmdVector More... | |
OdbTag | fOdbTag |
single ODB tag element. More... | |
EAutoRunKeyWords | fKey |
parse key selector for command parameters More... | |
EAutoRunKeyWords | fCmdKey |
parse key selector for commands More... | |
int | fLoopNo |
loop counter, needed for loops in loops ... More... | |
PXMLLoopInfoVector | fLoopInfoVector |
vector needed to handling loop expansion More... | |
Implementation of a schema-validating XML parser based on the xerces library.
Definition at line 85 of file PAutoRunParser.h.
enumeration for the XML key word handling
Definition at line 89 of file PAutoRunParser.h.
PSAX2AutoRunParseHandler::PSAX2AutoRunParseHandler | ( | PAutoRunParser * | arp | ) |
Constructor of the XERCES derived XML Parser.
arp | pointer to the calling class |
Definition at line 54 of file PAutoRunParser.cpp.
References ClearAutoRunCmd(), eEmpty, fArp, fAutoRunCmdVector, fCmdKey, fCurrentUserLineNo, fFatalError, fFlnAutoRunSeq, fKey, fLoopNo, fOdbTag, PAutoRunParser::GetAutoRunCmdVector(), OdbTag::idx, OdbTag::odb_path, and OdbTag::tag.
PSAX2AutoRunParseHandler::~PSAX2AutoRunParseHandler | ( | ) |
Destructor
Definition at line 87 of file PAutoRunParser.cpp.
void PSAX2AutoRunParseHandler::characters | ( | const XMLCh *const | chars, |
const XMLSize_t | length | ||
) |
Called when the content of a XML tag is found.
chars | content of the XML tag |
length | NOT USED |
Definition at line 406 of file PAutoRunParser.cpp.
References AutoRunCmd::cmdString, eAlias, eAlias_key, eAlias_value, eAngle, eBPV, eChamber, eCmdStr, eComment, eCurrent, eD_pid, eDate, eDegauss, eDegaussDanfysik, eDegaussSpinRot, eDegaussWEW, eDeltaT, eField_unit, eField_value, eFln, eFlow, eHeaterRange, eHv_bottom, eHv_left, eHv_right, eHv_top, eHv_value, eI_pid, eIgnoreAlarms, eIgnoreClients, eLabel, eLineNo, eLoopElement, eLoopFieldTag, eLoopIterator, eLoopList, eLoopSampleHVTag, eLoopSetField, eLoopSetFieldDanfysik, eLoopSetFieldWEWH, eLoopSetFieldWEWL, eLoopSetSampleHV, eLoopSetTemp, eLoopStart, eLoopStep, eLoopStop, eLoopTempTag, eMod, eMod_date, eNo_dumps, eNo_events, eNoDegauss, eOdb_energy, eOdb_field, eOdb_hv_samp, eOdb_ra_diff_lr, eOdb_ra_diff_tb, eOdb_sample, eOdb_spin_rot, eOdb_temp, eOdb_transp, eOdbReadIndex, eOdbReadPath, eOdbSetIndex, eOdbSetPath, eOdbSetValue, eOdbTag, eOdbTimeout, eOdbTolerance, eP_pid, eRamp, eRunStart, eRunStop, eSetDump, eSetField, eSetFieldDanfysik, eSetFieldWEWH, eSetFieldWEWL, eSetFOM, eSetHvOff, eSetLEMSetup, eSetModInfo, eSetOdbData, eSetOdbDataArray, eSetRA_HV, eSetSampleHV, eSetSpinRot, eSetTemp, eSetTfl, eSetTitle, eSetTOF, eSetTransportHV, eSetup, eSetWait, eStabilityTimeout, eStart, eState, eStop, eTemp, eTfl_mode, eTfl_pos, eTime, eTitle, eTransportHvSettingFileName, eUnits, eVent, eWait, eWarmUp, fAutoRunCmd, fCmdKey, fCurrentUserLineNo, fFatalError, fFlnAutoRunSeq, fKey, fLoopInfoVector, fLoopNo, fOdbTag, OdbTag::idx, internalFatalError(), AutoRunCmd::lineNo, AutoRunCmd::noElements, OdbTag::odb_path, AutoRunCmd::param, and OdbTag::tag.
|
private |
Checks if the ODB_SET_DATA command has a sensible parameter structure.
Definition at line 1687 of file PAutoRunParser.cpp.
References error(), fAutoRunCmd, fFatalError, internalFatalError(), AutoRunCmd::noElements, and AutoRunCmd::param.
Referenced by endElement().
|
private |
Initializes the current local auto run command
Definition at line 1671 of file PAutoRunParser.cpp.
References AutoRunCmd::cmd, fAutoRunCmd, LAR_MAX_PARAM, AutoRunCmd::lineNo, AutoRunCmd::loopVal, AutoRunCmd::noElements, and AutoRunCmd::param.
Referenced by endElement(), and PSAX2AutoRunParseHandler().
void PSAX2AutoRunParseHandler::endDocument | ( | ) |
Called at the end of the XML document.
Definition at line 1569 of file PAutoRunParser.cpp.
void PSAX2AutoRunParseHandler::endElement | ( | const XMLCh *const | uri, |
const XMLCh *const | localname, | ||
const XMLCh *const | qname | ||
) |
Called when a XML end-tag is found.
uri | NOT USED |
localname | NOT USED |
qname | XML end element label. |
Definition at line 1352 of file PAutoRunParser.cpp.
References CheckOdbSetDataParamsStructure(), ClearAutoRunCmd(), AutoRunCmd::cmd, eEmpty, fArp, fAutoRunCmd, fAutoRunCmdVector, fFatalError, fKey, fLoopInfoVector, fLoopNo, fOdbTag, PAutoRunParser::fOdbTagVector, internalFatalError(), LAR_MAX_PARAM, AutoRunCmd::lineNo, AutoRunCmd::noElements, OdbTag::odb_path, AutoRunCmd::param, and OdbTag::tag.
void PSAX2AutoRunParseHandler::error | ( | const SAXParseException & | exc | ) |
Called by the xerces routines when a error excpetion is thrown.
exc | pointer to the exception object |
Definition at line 1604 of file PAutoRunParser.cpp.
References XMLParseError::errorCode, XMLParseError::errorMsg, fArp, fCurrentUserLineNo, PAutoRunParser::GetXMLParseErrorVector(), LAR_XML_ERROR, and XMLParseError::lineNo.
Referenced by CheckOdbSetDataParamsStructure().
void PSAX2AutoRunParseHandler::fatalError | ( | const SAXParseException & | exc | ) |
Called by the xerces routines when a fatal error excpetion is thrown.
exc | pointer to the exception object |
Definition at line 1627 of file PAutoRunParser.cpp.
References XMLParseError::errorCode, XMLParseError::errorMsg, fArp, fCurrentUserLineNo, PAutoRunParser::GetXMLParseErrorVector(), LAR_XML_FATAL, and XMLParseError::lineNo.
void PSAX2AutoRunParseHandler::internalFatalError | ( | QString & | msg | ) |
Called when an internal inconsistency is detected which does not allow any further parsing.
msg | error message |
Definition at line 1650 of file PAutoRunParser.cpp.
References XMLParseError::errorCode, XMLParseError::errorMsg, fArp, fCurrentUserLineNo, PAutoRunParser::GetXMLParseErrorVector(), LAR_XML_FATAL, and XMLParseError::lineNo.
Referenced by characters(), CheckOdbSetDataParamsStructure(), and endElement().
void PSAX2AutoRunParseHandler::startDocument | ( | ) |
Called when the parser starts to parse the document. No functionality implemented for the moment.
Definition at line 97 of file PAutoRunParser.cpp.
void PSAX2AutoRunParseHandler::startElement | ( | const XMLCh *const | uri, |
const XMLCh *const | localname, | ||
const XMLCh *const | qname, | ||
const Attributes & | attrs | ||
) |
Called when XML start-tag is found.
uri | NOT USED |
localname | NOT USED |
qname | XML start element label |
attrs | NOT USED |
Definition at line 112 of file PAutoRunParser.cpp.
References AutoRunCmd::cmd, eAlias, eAlias_key, eAlias_value, eAngle, eBPV, eChamber, eCmdStr, eComment, eCommentLine, eCurrent, eD_pid, eDate, eDegauss, eDegaussDanfysik, eDegaussSpinRot, eDegaussWEW, eDeltaT, eField_unit, eField_value, eFln, eFlow, eHeaterRange, eHv_bottom, eHv_left, eHv_right, eHv_top, eHv_value, eI_pid, eIgnoreAlarms, eIgnoreClients, eLabel, eLineNo, eLoop, eLoopElement, eLoopFieldTag, eLoopIterator, eLoopList, eLoopSampleHVTag, eLoopSetField, eLoopSetFieldDanfysik, eLoopSetFieldWEWH, eLoopSetFieldWEWL, eLoopSetSampleHV, eLoopSetTemp, eLoopStart, eLoopStep, eLoopStop, eLoopTempTag, eMod, eMod_date, eNo_dumps, eNo_events, eNoDegauss, eOdb_energy, eOdb_field, eOdb_hv_samp, eOdb_ra_diff_lr, eOdb_ra_diff_tb, eOdb_sample, eOdb_spin_rot, eOdb_temp, eOdb_transp, eOdbReadIndex, eOdbReadPath, eOdbSetIndex, eOdbSetPath, eOdbSetValue, eOdbTag, eOdbTimeout, eOdbTolerance, eP_pid, eRamp, eRunStart, eRunStop, eSetDump, eSetField, eSetFieldDanfysik, eSetFieldWEWH, eSetFieldWEWL, eSetFOM, eSetHvOff, eSetLEMSetup, eSetModInfo, eSetOdbData, eSetOdbDataArray, eSetRA_HV, eSetSampleHV, eSetSpinRot, eSetTemp, eSetTfl, eSetTitle, eSetTOF, eSetTransportHV, eSetup, eSetWait, eStabilityTimeout, eStart, eState, eStop, eTemp, eTfl_mode, eTfl_pos, eTime, eTitle, eTransportHvSettingFileName, eUnits, eVent, eWait, eWarmUp, fAutoRunCmd, fCmdKey, fFatalError, fKey, fLoopInfoVector, fLoopNo, and AutoRunCmd::noElements.
void PSAX2AutoRunParseHandler::warning | ( | const SAXParseException & | exc | ) |
Called by the xerces routines when a warning excpetion is thrown.
exc | pointer to the exception object |
Definition at line 1581 of file PAutoRunParser.cpp.
References XMLParseError::errorCode, XMLParseError::errorMsg, fArp, fCurrentUserLineNo, PAutoRunParser::GetXMLParseErrorVector(), LAR_XML_WARNING, and XMLParseError::lineNo.
|
private |
pointer to the calling auto run parser
Definition at line 127 of file PAutoRunParser.h.
Referenced by endElement(), error(), fatalError(), internalFatalError(), PSAX2AutoRunParseHandler(), and warning().
|
private |
single auto run command. Used as parsing variable before pushed into the fAutoRunCmdVector
Definition at line 133 of file PAutoRunParser.h.
Referenced by characters(), CheckOdbSetDataParamsStructure(), ClearAutoRunCmd(), endElement(), and startElement().
|
private |
pointer to the expanded auto run command vector
Definition at line 128 of file PAutoRunParser.h.
Referenced by endElement(), and PSAX2AutoRunParseHandler().
|
private |
parse key selector for commands
Definition at line 139 of file PAutoRunParser.h.
Referenced by characters(), PSAX2AutoRunParseHandler(), and startElement().
|
private |
current line number of the user auto run sequence. Needed for error msg
Definition at line 131 of file PAutoRunParser.h.
Referenced by characters(), error(), fatalError(), internalFatalError(), PSAX2AutoRunParseHandler(), and warning().
|
private |
indicates an internal fatal error while parsing
Definition at line 125 of file PAutoRunParser.h.
Referenced by characters(), CheckOdbSetDataParamsStructure(), endElement(), PSAX2AutoRunParseHandler(), and startElement().
|
private |
file name of the user auto run sequence
Definition at line 130 of file PAutoRunParser.h.
Referenced by characters(), and PSAX2AutoRunParseHandler().
|
private |
parse key selector for command parameters
Definition at line 138 of file PAutoRunParser.h.
Referenced by characters(), endElement(), PSAX2AutoRunParseHandler(), and startElement().
|
private |
vector needed to handling loop expansion
Definition at line 143 of file PAutoRunParser.h.
Referenced by characters(), endElement(), and startElement().
|
private |
loop counter, needed for loops in loops ...
Definition at line 142 of file PAutoRunParser.h.
Referenced by characters(), endElement(), PSAX2AutoRunParseHandler(), and startElement().
|
private |
single ODB tag element.
Definition at line 136 of file PAutoRunParser.h.
Referenced by characters(), endElement(), and PSAX2AutoRunParseHandler().