23 #ifndef _PAUTORUNPARSER_H_ 24 #define _PAUTORUNPARSER_H_ 27 #include <QStringList> 31 #include <xercesc/sax2/Attributes.hpp> 32 #include <xercesc/sax2/DefaultHandler.hpp> 36 XERCES_CPP_NAMESPACE_USE
89 enum EAutoRunKeyWords {
eEmpty,
eFln,
eLineNo,
eCmdStr,
eAlias,
eIgnoreAlarms,
eIgnoreClients,
eBPV,
eComment,
eOdbTag,
113 void startElement(
const XMLCh *
const uri,
const XMLCh *
const localname,
114 const XMLCh *
const qname,
const Attributes &attrs);
115 void characters(
const XMLCh *
const chars,
const XMLSize_t length);
116 void endElement(
const XMLCh *
const uri,
const XMLCh *
const localname,
const XMLCh *
const qname);
119 void warning(
const SAXParseException& exc);
120 void error(
const SAXParseException& exc);
121 void fatalError(
const SAXParseException& exc);
157 PAutoRunParser(QString userAutoRunSeqFln, QString &schemaPath, QString &xmlFln,
170 void ParseError(
int noOfErrors,
int idx,
int errorNo,
int line, QString errorMsg);
188 void ConvertAlias(QString &str,
int lineNo, QString &offset, QStringList &xml);
191 void ConvertBPV(QString &str,
int lineNo, QString &offset, QStringList &xml);
192 void ConvertComment(QString &str,
int lineNo, QString &offset, QStringList &xml);
193 void ConvertDegaussWEW(QString &str,
int lineNo, QString &offset, QStringList &xml);
195 void ConvertDegauss(QString &str,
int lineNo, QString &offset, QStringList &xml);
197 void ConvertDump(QString &str,
int lineNo, QString &offset, QStringList &xml);
198 void ConvertFieldWEWL(QString &str,
int lineNo, QString &offset, QStringList &xml);
199 void ConvertFieldWEWH(QString &str,
int lineNo, QString &offset, QStringList &xml);
201 void ConvertField(QString &str,
int lineNo, QString &offset, QStringList &xml);
202 void ConvertFOM(QString &str,
int lineNo, QString &offset, QStringList &xml);
203 void ConvertLEMSetup(QString &str,
int lineNo, QString &offset, QStringList &xml);
207 void ConvertLoopTemp(QString &str,
int lineNo, QString &offset, QStringList &xml);
212 void ConvertLoopField(QString &str,
int lineNo, QString &offset, QStringList &xml);
214 void ConvertModerator(QString &str,
int lineNo, QString &offset, QStringList &xml);
215 void ConvertSampleHV(QString &str,
int lineNo, QString &offset, QStringList &xml);
216 void ConvertRA_HV(QString &str,
int lineNo, QString &offset, QStringList &xml);
218 void ConvertHVOff(QString &str,
int lineNo, QString &offset, QStringList &xml);
219 void ConvertOdbSetData(QString &str,
int lineNo, QString &offset, QStringList &xml);
221 void ConvertOdbTag(QString &str,
int lineNo, QString &offset, QStringList &xml);
222 void ConvertStart(QString &str,
int lineNo, QString &offset, QStringList &xml);
223 void ConvertStop(QString &str,
int lineNo, QString &offset, QStringList &xml);
224 void ConvertSpinRot(QString &str,
int lineNo, QString &offset, QStringList &xml);
225 void ConvertTfl(QString &str,
int lineNo, QString &offset, QStringList &xml);
226 void ConvertTemp(QString &str,
int lineNo, QString &offset, QStringList &xml);
227 void ConvertTitle(QString &str,
int lineNo, QString &offset, QStringList &xml);
228 void ConvertTOF(QString &str,
int lineNo, QString &offset, QStringList &xml);
229 void ConvertWait(QString &str,
int lineNo, QString &offset, QStringList &xml);
230 void ConvertWarmUp(QString &str,
int lineNo, QString &offset, QStringList &xml);
236 #endif // _PAUTORUNPARSER_H_ void ConvertLoopTemp(QString &str, int lineNo, QString &offset, QStringList &xml)
void ConvertField(QString &str, int lineNo, QString &offset, QStringList &xml)
void ConvertLoopFieldDanfysik(QString &str, int lineNo, QString &offset, QStringList &xml)
friend class PSAX2AutoRunParser
bool fFatalError
indicates an internal fatal error while parsing
int fCurrentUserLineNo
current line number of the user auto run sequence. Needed for error msg
void ConvertComment(QString &str, int lineNo, QString &offset, QStringList &xml)
void ConvertDump(QString &str, int lineNo, QString &offset, QStringList &xml)
int lineNo
line number in the user auto run seqence where the error occured
QMap< QString, QString > fAlias
keep all alias
AutoRunCmd loopCmd
loop cmd (loopSetTemp or loopSetSampleHV or loopSetField)
void ConvertWait(QString &str, int lineNo, QString &offset, QStringList &xml)
void ConvertLoopField(QString &str, int lineNo, QString &offset, QStringList &xml)
QString fFlnAutoRunSeq
file name of the user auto run sequence
void ConvertSpinRot(QString &str, int lineNo, QString &offset, QStringList &xml)
void ConvertTemp(QString &str, int lineNo, QString &offset, QStringList &xml)
void internalFatalError(QString &msg)
~PSAX2AutoRunParseHandler()
void ConvertTitle(QString &str, int lineNo, QString &offset, QStringList &xml)
void ConvertFieldDanfysik(QString &str, int lineNo, QString &offset, QStringList &xml)
QVector< XMLParseError > PXMLParseErrorVector
void error(const SAXParseException &exc)
void ConvertWarmUp(QString &str, int lineNo, QString &offset, QStringList &xml)
int GetParseErrorCounts()
void ParseError(int noOfErrors, int idx, int errorNo, int line, QString errorMsg)
PXMLLoopListVector list
vector of all elements over which will be looped (e.g. temp. list)
void ConvertBPV(QString &str, int lineNo, QString &offset, QStringList &xml)
void ConvertFieldWEWL(QString &str, int lineNo, QString &offset, QStringList &xml)
EAutoRunKeyWords fKey
parse key selector for command parameters
QString fXMLFileName
file name of the XML auto run sequence
void ConvertFOM(QString &str, int lineNo, QString &offset, QStringList &xml)
QString CheckForAlias(QString &str)
PAutoRunParser * fArp
pointer to the calling auto run parser
void ConvertDegaussDanfysik(QString &str, int lineNo, QString &offset, QStringList &xml)
QVector< AutoRunCmd > PAutoRunCmdVector
int errorCode
error code number defined in lemAutoRun.h
void ConvertSampleHV(QString &str, int lineNo, QString &offset, QStringList &xml)
void warning(const SAXParseException &exc)
void ConvertHVOff(QString &str, int lineNo, QString &offset, QStringList &xml)
void characters(const XMLCh *const chars, const XMLSize_t length)
PAutoRunCmdVector * GetAutoRunCmdVector()
QString fInputFileName
file name of the user auto run sequence
void startElement(const XMLCh *const uri, const XMLCh *const localname, const XMLCh *const qname, const Attributes &attrs)
void ConvertIgnoreAlarms(QString &str, int lineNo, QString &offset, QStringList &xml)
void ConvertTfl(QString &str, int lineNo, QString &offset, QStringList &xml)
PAutoRunParser::ConvertTfl.
void ConvertLoopFieldWEWL(QString &str, int lineNo, QString &offset, QStringList &xml)
void ConvertFieldWEWH(QString &str, int lineNo, QString &offset, QStringList &xml)
int fParseErrorCounter
the number parse errors encountered before giving up
PAutoRunCmdVector * fAutoRunCmdVector
pointer to the expanded auto run command vector
PXMLLoopInfoVector fLoopInfoVector
vector needed to handling loop expansion
QVector< double > PXMLLoopListVector
PSAX2AutoRunParseHandler(PAutoRunParser *arp)
void ConvertModerator(QString &str, int lineNo, QString &offset, QStringList &xml)
void fatalError(const SAXParseException &exc)
void ConvertOdbTag(QString &str, int lineNo, QString &offset, QStringList &xml)
PAutoRunCmdVector * fAutoRunCmdVector
pointer to the vector of the expanded auto run sequence
void ConvertLoopFieldWEWH(QString &str, int lineNo, QString &offset, QStringList &xml)
PAutoRunCmdVector cmd
vector of additional cmd's in the loop
POdbTagVector * fOdbTagVector
pointer to the vector of ODB tags
POdbTagVector * GetOdbTagVector()
void ConvertDegaussSpinRot(QString &str, int lineNo, QString &offset, QStringList &xml)
PXMLParseErrorVector * fXMLParseErrorVector
vector holding all the parse error information
QString fAutoRunXMLSchemaPath
file name of the XML-schema
QVector< XMLLoopInfo > PXMLLoopInfoVector
void ConvertDegaussWEW(QString &str, int lineNo, QString &offset, QStringList &xml)
void ConvertOdbSetData(QString &str, int lineNo, QString &offset, QStringList &xml)
void ConvertTransportHV(QString &str, int lineNo, QString &offset, QStringList &xml)
void ConvertLoopList(QString &str, QString &offset, QStringList &xml)
void CheckOdbSetDataParamsStructure()
QVector< OdbTag > POdbTagVector
EAutoRunKeyWords
enumeration for the XML key word handling
void ConvertRA_HV(QString &str, int lineNo, QString &offset, QStringList &xml)
PAutoRunParser(QString userAutoRunSeqFln, QString &schemaPath, QString &xmlFln, PAutoRunCmdVector *arcv, POdbTagVector *odbtagv)
void ConvertLoopEnd(QString &offset, QStringList &xml)
AutoRunCmd fAutoRunCmd
single auto run command. Used as parsing variable before pushed into the fAutoRunCmdVector ...
void ConvertLoopIterator(QString &str, QString &offset, QStringList &xml)
void ConvertIgnoreClients(QString &str, int lineNo, QString &offset, QStringList &xml)
void ConvertAlias(QString &str, int lineNo, QString &offset, QStringList &xml)
QString errorMsg
'clear text' error message. At the moment mostly comming from xerces
void ConvertStop(QString &str, int lineNo, QString &offset, QStringList &xml)
void ConvertLEMSetup(QString &str, int lineNo, QString &offset, QStringList &xml)
int fLoopNo
loop counter, needed for loops in loops ...
EAutoRunKeyWords fCmdKey
parse key selector for commands
void ConvertStart(QString &str, int lineNo, QString &offset, QStringList &xml)
PXMLParseErrorVector * GetXMLParseErrorVector()
void ConvertDegauss(QString &str, int lineNo, QString &offset, QStringList &xml)
void endElement(const XMLCh *const uri, const XMLCh *const localname, const XMLCh *const qname)
void ConvertLoopStart(int lineNo, QString &offset, QStringList &xml)
void ConvertTOF(QString &str, int lineNo, QString &offset, QStringList &xml)
void ConvertLoopSampleHV(QString &str, int lineNo, QString &offset, QStringList &xml)
PAutoRunCmdVector expandedCmd
vector of the expanded loop cmd's: generated at the end of the loop
void ConvertOdbSetDataArray(QString &str, int lineNo, QString &offset, QStringList &xml)
OdbTag fOdbTag
single ODB tag element.