05Robot 3.0

- Main Page
- Modules
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Member Functions | Protected Member Functions | Properties | List of all members
cXmlIO Class Reference

Delivers XML file serialisation and deserialisation methods for modules. More...

`#include <cxmlio.h>`

Inheritance diagram for cXmlIO:

## Public Member Functions
| cXmlIO (int _xmlID=0, QObject *parent=nullptr)
virtual QString | sXmlKey ()
| Generates key of XML entry (as name of the serialised class is) More...
virtual void | findInXML (QString &fileName, bool compareXmlID=true)
| serches th file for XML key corr to class name and fill class properties according to entries found More...
virtual void | writeXml (QXmlStreamWriter &xml)
| Writes XML entries to file. Can be overloaded to save additional data, apart from object properties. More...
virtual void | readXml (QXmlStreamReader &xml)
| Called by findInXML. Reads XML entries. Has to be overloaded if additional data was written to file in object entry. More...
virtual void | writeCsvData (QXmlStreamWriter &stream, QString key, const QVector< QVector< double > > &s)
virtual void | writeCsvVector (QXmlStreamWriter &stream, QString key, const QVector< double > &s)
virtual void | readCsvData (QXmlStreamReader &stream, QVector< QVector< double > > &s)
virtual void | readCsvVector (QXmlStreamReader &stream, QVector< double > &s)
virtual void | write64BaseData (QXmlStreamWriter &stream, QString key, const QVector< QVector< double > > &s)
virtual void | read64BaseData (QXmlStreamReader &stream, QVector< QVector< double > > &s)
template<typename T >
void | writeData (QXmlStreamWriter &stream, QString key, const T &data)
template<typename T >
void | readData (QXmlStreamReader &stream, T &data)
int | getXmlID () const
void | setXmlID (int value)

## Static Public Member Functions
static void | metaCopy (QObject *dest, QObject *src)

## Protected Member Functions
void | metaDataXmlReader (QXmlStreamReader &stream, QObject &obj, bool isUser=true)
void | metaDataXmlWriter (QXmlStreamWriter &stream, const QObject &obj, bool isUser=true)

## Properties
int | xmlID
| Defines uniqe identifier for object in XML file. More...

## Detailed Description

Delivers XML file serialisation and deserialisation methods for modules.

05Robot - serialization routines

Author
  P.Kaczmarek,J.Tomczynski,T.Mankowski

Version
  1.0 2017

## Constructor & Destructor Documentation

cXmlIO | ( | int | _xmlID = `0`,
|  | QObject * | parent = `nullptr`
| ) |  |

## Member Function Documentation

virtual void findInXML | ( | QString & | fileName,
|  | bool | compareXmlID = `true`
| ) |  |
| virtual

serches th file for XML key corr to class name and fill class properties according to entries found

Parameters

  fileName |
  compareXmlID | states if xmlID matters

int getXmlID | ( |  | ) | const

static void metaCopy | ( | QObject * | dest,
|  | QObject * | src
| ) |  |
| static

void metaDataXmlReader | ( | QXmlStreamReader & | stream,
|  | QObject & | obj,
|  | bool | isUser = `true`
| ) |  |
| protected

void metaDataXmlWriter | ( | QXmlStreamWriter & | stream,
|  | const QObject & | obj,
|  | bool | isUser = `true`
| ) |  |
| protected

virtual void read64BaseData | ( | QXmlStreamReader & | stream,
|  | QVector< QVector< double > > & | s
| ) |  |
| virtual

virtual void readCsvData | ( | QXmlStreamReader & | stream,
|  | QVector< QVector< double > > & | s
| ) |  |
| virtual

virtual void readCsvVector | ( | QXmlStreamReader & | stream,
|  | QVector< double > & | s
| ) |  |
| virtual

void readData | ( | QXmlStreamReader & | stream,
|  | T & | data
| ) |  |
| inline

virtual void readXml | ( | QXmlStreamReader & | xml | ) |
| virtual

Called by findInXML. Reads XML entries. Has to be overloaded if additional data was written to file in object entry.

Parameters

  xml | reference to stream corresponding to object entry in XML

Reimplemented in Processor_ObjectExtraction, UR3Workspace, ObjectManipulationProperties, Processor_PlaneCalibration, ProcessorObject, and CameraObject.

void setXmlID | ( | int | value | ) |

virtual QString sXmlKey | ( |  | ) |
| inline virtual

Generates key of XML entry (as name of the serialised class is)

Returns

virtual void write64BaseData | ( | QXmlStreamWriter & | stream,
|  | QString | key,
|  | const QVector< QVector< double > > & | s
| ) |  |
| virtual

virtual void writeCsvData | ( | QXmlStreamWriter & | stream,
|  | QString | key,
|  | const QVector< QVector< double > > & | s
| ) |  |
| virtual

virtual void writeCsvVector | ( | QXmlStreamWriter & | stream,
|  | QString | key,
|  | const QVector< double > & | s
| ) |  |
| virtual

void writeData | ( | QXmlStreamWriter & | stream,
|  | QString | key,
|  | const T & | data
| ) |  |
| inline

virtual void writeXml | ( | QXmlStreamWriter & | xml | ) |
| virtual

Writes XML entries to file. Can be overloaded to save additional data, apart from object properties.

Parameters

  xml | reference to XML file stream

Reimplemented in Processor_ObjectExtraction, UR3Workspace, Processor_PlaneCalibration, ProcessorObject, and CameraObject.

## Property Documentation

int xmlID
| read

Defines uniqe identifier for object in XML file.

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

- misc/cxmlio.h