CXslTransformationReadArchive.h
Go to the documentation of this file.
1 #ifndef iqtex_CXslTransformationReadArchive_included
2 #define iqtex_CXslTransformationReadArchive_included
3 
4 
5 // Qt includes
6 #include <QtXml/QDomDocument>
7 #include <QtXml/QDomNode>
8 
9 
10 // ACF includes
11 #include "istd/ILogger.h"
12 
14 #include "iser/CReadArchiveBase.h"
15 
16 #include "iqtex/iqtex.h"
17 
18 
19 namespace iqtex
20 {
21 
22 
29 {
30 public:
32  const QString& filePath = "",
33  const QString& xslFilePath = "",
34  bool serializeHeader = true,
35  const iser::CArchiveTag& rootTag = s_acfRootTag);
36 
37  bool OpenFile(const QString& filePath, const QString& xslFilePath);
38 
39  // reimplemented (iser::IArchive)
40  virtual bool IsTagSkippingSupported() const;
41  virtual bool BeginTag(const iser::CArchiveTag& tag);
42  virtual bool BeginMultiTag(const iser::CArchiveTag& tag, const iser::CArchiveTag& subTag, int& count);
43  virtual bool EndTag(const iser::CArchiveTag& tag);
44  virtual bool Process(bool& value);
45  virtual bool Process(char& value);
46  virtual bool Process(quint8& value);
47  virtual bool Process(qint8& value);
48  virtual bool Process(quint16& value);
49  virtual bool Process(qint16& value);
50  virtual bool Process(quint32& value);
51  virtual bool Process(qint32& value);
52  virtual bool Process(quint64& value);
53  virtual bool Process(qint64& value);
54  virtual bool Process(float& value);
55  virtual bool Process(double& value);
56  virtual bool Process(QByteArray& value);
57  virtual bool Process(QString& value);
58  virtual bool ProcessData(void* dataPtr, int size);
59 
60 protected:
64  QString PullTextNode();
65 
66 private:
67  QDomDocument m_document;
68  QDomNode m_currentNode;
69 
70  bool m_serializeHeader;
71  iser::CArchiveTag m_rootTag;
72 };
73 
74 
75 } // namespace iqtex
76 
77 
78 #endif // !iqtex_CXslTransformationReadArchive_included
79 
80 
CXslTransformationReadArchive(const QString &filePath="", const QString &xslFilePath="", bool serializeHeader=true, const iser::CArchiveTag &rootTag=s_acfRootTag)
virtual bool BeginMultiTag(const iser::CArchiveTag &tag, const iser::CArchiveTag &subTag, int &count)
bool OpenFile(const QString &filePath, const QString &xslFilePath)
virtual bool Process(bool &value)
virtual bool ProcessData(void *dataPtr, int size)
virtual bool IsTagSkippingSupported() const
QString PullTextNode()
Find the next text node and move the current node to the next sibling.
Qt-based implementation of archive reading from XML file.
virtual bool EndTag(const iser::CArchiveTag &tag)
virtual bool BeginTag(const iser::CArchiveTag &tag)

© 2007-2011 Witold Gantzke and Kirill Lepskiy