lemAutoRun  1.0
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
PSAX2AutoRunParseHandler Class Reference

#include <PAutoRunParser.h>

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

Public Types

enum  EAutoRunKeyWords {
  eEmpty, eFln, eLineNo, eCmdStr,
  eAlias, eIgnoreAlarms, eIgnoreClients, eBPV,
  eComment, eOdbTag, eSetSpinRot, eSetTfl,
  eSetTemp, eSetSampleHV, eSetRA_HV, eSetTransportHV,
  eSetHvOff, eSetOdbData, eSetOdbDataArray, eSetFieldWEWL,
  eSetFieldWEWH, eSetFieldDanfysik, eSetField, eSetTitle,
  eSetTOF, eSetModInfo, eSetLEMSetup, eSetWait,
  eSetDump, eSetFOM, eRunStart, eRunStop,
  eWarmUp, eDegaussDanfysik, eDegaussWEW, eDegauss,
  eDegaussSpinRot, eCommentLine, eAlias_key, eAlias_value,
  eLoop, eLoopList, eLoopIterator, eLoopElement,
  eLoopStart, eLoopStop, eLoopStep, eLoopSetTemp,
  eLoopSetSampleHV, eLoopSetFieldWEWL, eLoopSetFieldWEWH, eLoopSetFieldDanfysik,
  eLoopSetField, eLoopTempTag, eLoopSampleHVTag, eLoopFieldTag,
  eOdbSetPath, eOdbSetIndex, eOdbSetValue, eOdbReadPath,
  eOdbReadIndex, eOdbTimeout, eOdbTolerance, eTfl_pos,
  eTfl_mode, eTemp, eDeltaT, eStabilityTimeout,
  eHeaterRange, eP_pid, eI_pid, eD_pid,
  eRamp, eFlow, eHv_value, eHv_left,
  eHv_top, eHv_right, eHv_bottom, eField_value,
  eField_unit, eTitle, eOdb_sample, eOdb_temp,
  eOdb_field, eOdb_transp, eOdb_hv_samp, eOdb_energy,
  eOdb_ra_diff_lr, eOdb_ra_diff_tb, eOdb_spin_rot, eStart,
  eStop, eUnits, eMod, eMod_date,
  eSetup, eWait, eNo_events, eNo_dumps,
  eDate, eTime, eVent, eCurrent,
  eTransportHvSettingFileName, eAngle, eNoDegauss, eChamber,
  eLabel, eState
}
 enumeration for the XML key word handling More...
 

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...
 
PAutoRunParserfArp
 pointer to the calling auto run parser More...
 
PAutoRunCmdVectorfAutoRunCmdVector
 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...
 

Detailed Description

Implementation of a schema-validating XML parser based on the xerces library.

Definition at line 85 of file PAutoRunParser.h.

Member Enumeration Documentation

enumeration for the XML key word handling

Enumerator
eEmpty 
eFln 
eLineNo 
eCmdStr 
eAlias 
eIgnoreAlarms 
eIgnoreClients 
eBPV 
eComment 
eOdbTag 
eSetSpinRot 
eSetTfl 
eSetTemp 
eSetSampleHV 
eSetRA_HV 
eSetTransportHV 
eSetHvOff 
eSetOdbData 
eSetOdbDataArray 
eSetFieldWEWL 
eSetFieldWEWH 
eSetFieldDanfysik 
eSetField 
eSetTitle 
eSetTOF 
eSetModInfo 
eSetLEMSetup 
eSetWait 
eSetDump 
eSetFOM 
eRunStart 
eRunStop 
eWarmUp 
eDegaussDanfysik 
eDegaussWEW 
eDegauss 
eDegaussSpinRot 
eCommentLine 
eAlias_key 
eAlias_value 
eLoop 
eLoopList 
eLoopIterator 
eLoopElement 
eLoopStart 
eLoopStop 
eLoopStep 
eLoopSetTemp 
eLoopSetSampleHV 
eLoopSetFieldWEWL 
eLoopSetFieldWEWH 
eLoopSetFieldDanfysik 
eLoopSetField 
eLoopTempTag 
eLoopSampleHVTag 
eLoopFieldTag 
eOdbSetPath 
eOdbSetIndex 
eOdbSetValue 
eOdbReadPath 
eOdbReadIndex 
eOdbTimeout 
eOdbTolerance 
eTfl_pos 
eTfl_mode 
eTemp 
eDeltaT 
eStabilityTimeout 
eHeaterRange 
eP_pid 
eI_pid 
eD_pid 
eRamp 
eFlow 
eHv_value 
eHv_left 
eHv_top 
eHv_right 
eHv_bottom 
eField_value 
eField_unit 
eTitle 
eOdb_sample 
eOdb_temp 
eOdb_field 
eOdb_transp 
eOdb_hv_samp 
eOdb_energy 
eOdb_ra_diff_lr 
eOdb_ra_diff_tb 
eOdb_spin_rot 
eStart 
eStop 
eUnits 
eMod 
eMod_date 
eSetup 
eWait 
eNo_events 
eNo_dumps 
eDate 
eTime 
eVent 
eCurrent 
eTransportHvSettingFileName 
eAngle 
eNoDegauss 
eChamber 
eLabel 
eState 

Definition at line 89 of file PAutoRunParser.h.

Constructor & Destructor Documentation

PSAX2AutoRunParseHandler::PSAX2AutoRunParseHandler ( PAutoRunParser arp)

Constructor of the XERCES derived XML Parser.

Parameters
arppointer to the calling class

Definition at line 54 of file PAutoRunParser.cpp.

References PAutoRunParser::GetAutoRunCmdVector().

PSAX2AutoRunParseHandler::~PSAX2AutoRunParseHandler ( )

Destructor

Definition at line 87 of file PAutoRunParser.cpp.

Member Function Documentation

void PSAX2AutoRunParseHandler::characters ( const XMLCh *const  chars,
const XMLSize_t  length 
)

Called when the content of a XML tag is found.

Parameters
charscontent of the XML tag
lengthNOT USED

Definition at line 406 of file PAutoRunParser.cpp.

void PSAX2AutoRunParseHandler::CheckOdbSetDataParamsStructure ( )
private

Checks if the ODB_SET_DATA command has a sensible parameter structure.

Definition at line 1687 of file PAutoRunParser.cpp.

void PSAX2AutoRunParseHandler::ClearAutoRunCmd ( )
private

Initializes the current local auto run command

Definition at line 1671 of file PAutoRunParser.cpp.

References LAR_MAX_PARAM.

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.

Parameters
uriNOT USED
localnameNOT USED
qnameXML end element label.

Definition at line 1352 of file PAutoRunParser.cpp.

References AutoRunCmd::cmd, LAR_MAX_PARAM, AutoRunCmd::lineNo, AutoRunCmd::noElements, and AutoRunCmd::param.

void PSAX2AutoRunParseHandler::error ( const SAXParseException &  exc)

Called by the xerces routines when a error excpetion is thrown.

Parameters
excpointer to the exception object

Definition at line 1604 of file PAutoRunParser.cpp.

References XMLParseError::errorCode, XMLParseError::errorMsg, LAR_XML_ERROR, and XMLParseError::lineNo.

void PSAX2AutoRunParseHandler::fatalError ( const SAXParseException &  exc)

Called by the xerces routines when a fatal error excpetion is thrown.

Parameters
excpointer to the exception object

Definition at line 1627 of file PAutoRunParser.cpp.

References XMLParseError::errorCode, XMLParseError::errorMsg, 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.

Parameters
msgerror message

Definition at line 1650 of file PAutoRunParser.cpp.

References XMLParseError::errorCode, XMLParseError::errorMsg, LAR_XML_FATAL, and XMLParseError::lineNo.

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.

Parameters
uriNOT USED
localnameNOT USED
qnameXML start element label
attrsNOT USED

Definition at line 112 of file PAutoRunParser.cpp.

void PSAX2AutoRunParseHandler::warning ( const SAXParseException &  exc)

Called by the xerces routines when a warning excpetion is thrown.

Parameters
excpointer to the exception object

Definition at line 1581 of file PAutoRunParser.cpp.

References XMLParseError::errorCode, XMLParseError::errorMsg, LAR_XML_WARNING, and XMLParseError::lineNo.

Member Data Documentation

PAutoRunParser* PSAX2AutoRunParseHandler::fArp
private

pointer to the calling auto run parser

Definition at line 127 of file PAutoRunParser.h.

AutoRunCmd PSAX2AutoRunParseHandler::fAutoRunCmd
private

single auto run command. Used as parsing variable before pushed into the fAutoRunCmdVector

Definition at line 133 of file PAutoRunParser.h.

PAutoRunCmdVector* PSAX2AutoRunParseHandler::fAutoRunCmdVector
private

pointer to the expanded auto run command vector

Definition at line 128 of file PAutoRunParser.h.

EAutoRunKeyWords PSAX2AutoRunParseHandler::fCmdKey
private

parse key selector for commands

Definition at line 139 of file PAutoRunParser.h.

int PSAX2AutoRunParseHandler::fCurrentUserLineNo
private

current line number of the user auto run sequence. Needed for error msg

Definition at line 131 of file PAutoRunParser.h.

bool PSAX2AutoRunParseHandler::fFatalError
private

indicates an internal fatal error while parsing

Definition at line 125 of file PAutoRunParser.h.

QString PSAX2AutoRunParseHandler::fFlnAutoRunSeq
private

file name of the user auto run sequence

Definition at line 130 of file PAutoRunParser.h.

EAutoRunKeyWords PSAX2AutoRunParseHandler::fKey
private

parse key selector for command parameters

Definition at line 138 of file PAutoRunParser.h.

PXMLLoopInfoVector PSAX2AutoRunParseHandler::fLoopInfoVector
private

vector needed to handling loop expansion

Definition at line 143 of file PAutoRunParser.h.

int PSAX2AutoRunParseHandler::fLoopNo
private

loop counter, needed for loops in loops ...

Definition at line 142 of file PAutoRunParser.h.

OdbTag PSAX2AutoRunParseHandler::fOdbTag
private

single ODB tag element.

Definition at line 136 of file PAutoRunParser.h.


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