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 
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(QString& value);
45 
46 protected:
47  bool ReadStringNode(QString& text);
48 
49  // reimplemented (iser::CTextReadArchiveBase)
50  virtual bool ReadTextNode(QByteArray& text);
51 
52 private:
53  QDomDocument m_document;
54  QDomNode m_currentNode;
55 
56  bool m_serializeHeader;
57  iser::CArchiveTag m_rootTag;
58 };
59 
60 
61 } // namespace iqtex
62 
63 
64 #endif // !iqtex_CXslTransformationReadArchive_included
65 
66 
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 IsTagSkippingSupported() const
Qt-based implementation of archive reading from XML file.
virtual bool ReadTextNode(QByteArray &text)
virtual bool EndTag(const iser::CArchiveTag &tag)
virtual bool Process(QString &value)
virtual bool BeginTag(const iser::CArchiveTag &tag)

© 2007-2017 Witold Gantzke and Kirill Lepskiy