MythTV  master
xmlplistSerializer.h
Go to the documentation of this file.
1 #ifndef XMLPLISTSERIALIZER_H
2 #define XMLPLISTSERIALIZER_H
3 
4 #include <QXmlStreamWriter>
5 #include <QVariant>
6 #include <QIODevice>
7 #include <QStringList>
8 
9 #include "upnpexp.h"
10 #include "xmlSerializer.h"
11 
13 {
14 
15  protected:
16 
17  void BeginSerialize( QString &sName ) override; // XmlSerializer
18  void EndSerialize () override; // XmlSerializer
19 
20  void RenderValue ( const QString &sName, const QVariant &vValue , bool needKey = true);
21  void RenderStringList( const QString &sName, const QStringList &list );
22  void RenderList ( const QString &sName, const QVariantList &list );
23  void RenderMap ( const QString &sName, const QVariantMap &map );
24 
25  void BeginObject( const QString &sName, const QObject *pObject ) override; // XmlSerializer
26  void EndObject ( const QString &sName, const QObject *pObject ) override; // XmlSerializer
27  void AddProperty( const QString &sName,
28  const QVariant &vValue,
29  const QMetaObject *pMetaParent,
30  const QMetaProperty *pMetaProp ) override; // XmlSerializer
31 
32  void SerializePListObjectProperties( const QString &sName,
33  const QObject *pObject,
34  bool needKey );
35 
36  public:
37  explicit XmlPListSerializer( QIODevice *pDevice )
38  : XmlSerializer( pDevice, QString("") ) {}
39  virtual ~XmlPListSerializer() = default;
40 
41  QString GetContentType() override; // XmlSerializer
42 
43 };
44 
45 #endif // XMLPLISTSERIALIZER_H
void AddProperty(const QString &sName, const QVariant &vValue, const QMetaObject *pMetaParent, const QMetaProperty *pMetaProp) override
void RenderValue(const QString &sName, const QVariant &vValue)
XmlPListSerializer(QIODevice *pDevice)
void RenderMap(const QString &sName, const QVariantMap &map)
void RenderList(const QString &sName, const QVariantList &list)
#define UPNP_PUBLIC
Definition: upnpexp.h:9
QString GetContentType() override
void BeginSerialize(QString &sName) override
void EndObject(const QString &sName, const QObject *pObject) override
void RenderStringList(const QString &sName, const QStringList &list)
void EndSerialize() override
void BeginObject(const QString &sName, const QObject *pObject) override