KanoopCommonQt 2.1.1
Kanoop foundational Qt utility library
Loading...
Searching...
No Matches
ideserializablefromxml.h
1/**
2 * @brief Interfaces for deserializing objects from XML.
3 */
4#ifndef IDESERIALIZABLEFROMXML_H
5#define IDESERIALIZABLEFROMXML_H
6
7#include <QByteArray>
8#include <QDomDocument>
9#include <QList>
10
11/**
12 * @brief Interface for objects that can deserialize themselves from a raw XML byte array.
13 */
15{
16public:
17 /**
18 * @brief Populate this object from an XML byte array.
19 * @param xml Raw XML data
20 */
21 virtual void deserializeFromXml(const QByteArray& xml) = 0;
22};
23
24/**
25 * @brief Interface for objects that can deserialize themselves from a QDomElement.
26 */
28{
29public:
30 /**
31 * @brief Populate this object from a QDomElement.
32 * @param element DOM element containing the object's data
33 */
34 virtual void deserializeFromDomElement(const QDomElement& element) = 0;
35};
36
37/**
38 * @brief Interface for objects that can deserialize themselves from a list of QDomElements.
39 */
41{
42public:
43 /**
44 * @brief Populate this object from a list of QDomElement values.
45 * @param list List of DOM elements to deserialize from
46 */
47 virtual void deserializeFromDomElementList(const QList<QDomElement>& list) = 0;
48};
49
50#endif // IDESERIALIZABLEFROMXML_H
Interface for objects that can deserialize themselves from a QDomElement.
virtual void deserializeFromDomElement(const QDomElement &element)=0
Populate this object from a QDomElement.
Interface for objects that can deserialize themselves from a list of QDomElements.
virtual void deserializeFromDomElementList(const QList< QDomElement > &list)=0
Populate this object from a list of QDomElement values.
Interfaces for deserializing objects from XML.
virtual void deserializeFromXml(const QByteArray &xml)=0
Populate this object from an XML byte array.