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

#include <PLemAutoRun.h>

Collaboration diagram for PLemHvSettingsFileParser:
Collaboration graph
[legend]

Public Types

enum  ELemHvSettingsKeyWords {
  eEmpty, eHvDeviceName, eHvChNo, eHvChName,
  eHvDemand, eCurrentLimit
}
 

Public Member Functions

 PLemHvSettingsFileParser (const QString fln)
 
 ~PLemHvSettingsFileParser ()
 
bool parseIsValid ()
 
bool parse (QIODevice *device)
 
bool startDocument ()
 
bool startElement ()
 
bool endElement ()
 
bool characters ()
 
bool endDocument ()
 
bool isValid (QString &errMsg)
 
QVector< int > * GetChNo ()
 
QVector< QString > * GetHvChNames ()
 
QVector< float > * GetHvDemands ()
 
QVector< float > * GetCurrentLimits ()
 

Private Attributes

bool fValid
 
bool fParseIsValid {false}
 
QString fErrorMsg
 
QString fHvDeviceName
 
QVector< int > fHvChNo
 
QVector< QString > fHvChName
 
QVector< float > fHvDemand
 
QVector< float > fCurrentLimit
 
QXmlStreamReader fXml
 xml stream reader object More...
 
ELemHvSettingsKeyWords fKey
 key tag for the parsing process More...
 

Detailed Description

Class which handles the HV settings file for the LEM autorun sequence.

Definition at line 191 of file PLemAutoRun.h.

Member Enumeration Documentation

◆ ELemHvSettingsKeyWords

Enumerator
eEmpty 
eHvDeviceName 
eHvChNo 
eHvChName 
eHvDemand 
eCurrentLimit 

Definition at line 194 of file PLemAutoRun.h.

Constructor & Destructor Documentation

◆ PLemHvSettingsFileParser()

PLemHvSettingsFileParser::PLemHvSettingsFileParser ( const QString  fln)

XML Parser class for the HV settings file.

Definition at line 1801 of file PLemAutoRun.cpp.

References fErrorMsg, fHvDeviceName, fParseIsValid, fValid, and parse().

◆ ~PLemHvSettingsFileParser()

PLemHvSettingsFileParser::~PLemHvSettingsFileParser ( )

Destructor

Definition at line 1821 of file PLemAutoRun.cpp.

References fCurrentLimit, fHvChName, fHvChNo, and fHvDemand.

Member Function Documentation

◆ characters()

bool PLemHvSettingsFileParser::characters ( )

The reader calls this function when it has parsed a chunk of character data.

Parameters
strcontent of a tag. This is the real information!

Definition at line 1932 of file PLemAutoRun.cpp.

References eCurrentLimit, eHvChName, eHvChNo, eHvDemand, eHvDeviceName, fCurrentLimit, fErrorMsg, fHvChName, fHvChNo, fHvDemand, fHvDeviceName, fKey, fValid, and fXml.

Referenced by parse().

◆ endDocument()

bool PLemHvSettingsFileParser::endDocument ( )

The reader calls this function after it has finished parsing. At this point it is checked if all the needed information could be collected. Otherwise some default values will be tried and a warning emitted.

Definition at line 1998 of file PLemAutoRun.cpp.

References fCurrentLimit, fHvChName, fHvChNo, fHvDemand, and fValid.

Referenced by parse().

◆ endElement()

bool PLemHvSettingsFileParser::endElement ( )

The reader calls this function when it has parsed an end element tag.

Definition at line 1917 of file PLemAutoRun.cpp.

References eEmpty, and fKey.

Referenced by parse().

◆ GetChNo()

QVector<int>* PLemHvSettingsFileParser::GetChNo ( )
inline

Definition at line 210 of file PLemAutoRun.h.

References fHvChNo.

Referenced by PLemAutoRun::LoadHvSettings().

◆ GetCurrentLimits()

QVector<float>* PLemHvSettingsFileParser::GetCurrentLimits ( )
inline

Definition at line 213 of file PLemAutoRun.h.

References fCurrentLimit.

Referenced by PLemAutoRun::LoadHvSettings().

◆ GetHvChNames()

QVector<QString>* PLemHvSettingsFileParser::GetHvChNames ( )
inline

Definition at line 211 of file PLemAutoRun.h.

References fHvChName.

Referenced by PLemAutoRun::LoadHvSettings().

◆ GetHvDemands()

QVector<float>* PLemHvSettingsFileParser::GetHvDemands ( )
inline

Definition at line 212 of file PLemAutoRun.h.

References fHvDemand.

Referenced by PLemAutoRun::LoadHvSettings().

◆ isValid()

bool PLemHvSettingsFileParser::isValid ( QString &  errMsg)
inline

Definition at line 208 of file PLemAutoRun.h.

References fErrorMsg, and fValid.

Referenced by PLemAutoRun::LoadHvSettings().

◆ parse()

bool PLemHvSettingsFileParser::parse ( QIODevice *  device)

parse the hvEdit startup xml-file.

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

Definition at line 1839 of file PLemAutoRun.cpp.

References characters(), endDocument(), endElement(), fXml, startDocument(), and startElement().

Referenced by PLemHvSettingsFileParser().

◆ parseIsValid()

bool PLemHvSettingsFileParser::parseIsValid ( )
inline

Definition at line 199 of file PLemAutoRun.h.

References fParseIsValid.

Referenced by PLemAutoRun::LoadHvSettings().

◆ startDocument()

bool PLemHvSettingsFileParser::startDocument ( )

The reader calls this function when it starts parsing the document.

Definition at line 1877 of file PLemAutoRun.cpp.

References eEmpty, and fKey.

Referenced by parse().

◆ startElement()

bool PLemHvSettingsFileParser::startElement ( )

The reader calls this function when it has parsed a start element tag.

Parameters
qNamename of the XML tag found.

Definition at line 1892 of file PLemAutoRun.cpp.

References eCurrentLimit, eHvChName, eHvChNo, eHvDemand, eHvDeviceName, fKey, and fXml.

Referenced by parse().

Member Data Documentation

◆ fCurrentLimit

QVector<float> PLemHvSettingsFileParser::fCurrentLimit
private

◆ fErrorMsg

QString PLemHvSettingsFileParser::fErrorMsg
private

Definition at line 218 of file PLemAutoRun.h.

Referenced by characters(), isValid(), and PLemHvSettingsFileParser().

◆ fHvChName

QVector<QString> PLemHvSettingsFileParser::fHvChName
private

Definition at line 221 of file PLemAutoRun.h.

Referenced by characters(), endDocument(), GetHvChNames(), and ~PLemHvSettingsFileParser().

◆ fHvChNo

QVector<int> PLemHvSettingsFileParser::fHvChNo
private

Definition at line 220 of file PLemAutoRun.h.

Referenced by characters(), endDocument(), GetChNo(), and ~PLemHvSettingsFileParser().

◆ fHvDemand

QVector<float> PLemHvSettingsFileParser::fHvDemand
private

Definition at line 222 of file PLemAutoRun.h.

Referenced by characters(), endDocument(), GetHvDemands(), and ~PLemHvSettingsFileParser().

◆ fHvDeviceName

QString PLemHvSettingsFileParser::fHvDeviceName
private

Definition at line 219 of file PLemAutoRun.h.

Referenced by characters(), and PLemHvSettingsFileParser().

◆ fKey

ELemHvSettingsKeyWords PLemHvSettingsFileParser::fKey
private

key tag for the parsing process

Definition at line 226 of file PLemAutoRun.h.

Referenced by characters(), endElement(), startDocument(), and startElement().

◆ fParseIsValid

bool PLemHvSettingsFileParser::fParseIsValid {false}
private

Definition at line 217 of file PLemAutoRun.h.

Referenced by parseIsValid(), and PLemHvSettingsFileParser().

◆ fValid

bool PLemHvSettingsFileParser::fValid
private

Definition at line 216 of file PLemAutoRun.h.

Referenced by characters(), endDocument(), isValid(), and PLemHvSettingsFileParser().

◆ fXml

QXmlStreamReader PLemHvSettingsFileParser::fXml
private

xml stream reader object

Definition at line 225 of file PLemAutoRun.h.

Referenced by characters(), parse(), and startElement().


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