MythTV  master
mythjsonserialiser.h
Go to the documentation of this file.
1 #ifndef MYTHJSONSERIALISER_H
2 #define MYTHJSONSERIALISER_H
3 
4 // MythTV
6 
7 // Std
8 #include <stack>
9 
11 {
12  public:
13  MythJSONSerialiser(const QString& Name, const QVariant& Value);
14 
15  protected:
16  void AddObject (const QString& Name, const QVariant& Value);
17  void AddValue (const QVariant& Value, const QMetaProperty *MetaProperty = nullptr);
18  void AddQObject (const QObject* Object);
19  void AddStringList(const QVariant& Values);
20  void AddList (const QVariant& Values);
21  void AddMap (const QVariantMap& Map);
22  static QString Encode(const QString& Value);
23 
24  private:
25  Q_DISABLE_COPY(MythJSONSerialiser)
26  QTextStream m_writer;
27  std::stack<bool> m_first;
28 };
29 
30 #endif
MythJSONSerialiser::MythJSONSerialiser
MythJSONSerialiser(const QString &Name, const QVariant &Value)
Definition: mythjsonserialiser.cpp:10
MythJSONSerialiser::Encode
static QString Encode(const QString &Value)
Definition: mythjsonserialiser.cpp:172
MythSerialiser
Definition: mythserialiser.h:14
MythJSONSerialiser::AddList
void AddList(const QVariant &Values)
Definition: mythjsonserialiser.cpp:141
MythJSONSerialiser::AddObject
void AddObject(const QString &Name, const QVariant &Value)
Definition: mythjsonserialiser.cpp:21
mythserialiser.h
MythJSONSerialiser::m_first
std::stack< bool > m_first
Definition: mythjsonserialiser.h:27
MythJSONSerialiser::m_writer
QTextStream m_writer
Definition: mythjsonserialiser.h:26
MythJSONSerialiser::AddQObject
void AddQObject(const QObject *Object)
Definition: mythjsonserialiser.cpp:94
Name
Definition: channelsettings.cpp:71
MythJSONSerialiser
Definition: mythjsonserialiser.h:10
MythJSONSerialiser::AddStringList
void AddStringList(const QVariant &Values)
Definition: mythjsonserialiser.cpp:128
MythJSONSerialiser::AddValue
void AddValue(const QVariant &Value, const QMetaProperty *MetaProperty=nullptr)
Definition: mythjsonserialiser.cpp:31
MythJSONSerialiser::AddMap
void AddMap(const QVariantMap &Map)
Definition: mythjsonserialiser.cpp:157