CXmlStringWriteArchive.h
Go to the documentation of this file.
1 #ifndef iser_CXmlStringWriteArchive_included
2 #define iser_CXmlStringWriteArchive_included
3 
4 
5 // Qt includes
6 #include <QtCore/QBuffer>
7 
8 // ACF includes
10 
11 
12 namespace iser
13 {
14 
15 
22 {
23 public:
25 
27  const IVersionInfo* versionInfoPtr = NULL,
28  bool serializeHeader = true,
29  const CArchiveTag& rootTag = s_acfRootTag);
30  virtual ~CXmlStringWriteArchive();
31 
35  virtual const QByteArray& GetString() const;
36 
37 protected:
38  void EnsureArchiveClosed();
39 
40  // reimplemented (iser::CXmlWriteArchiveBase)
41  virtual bool WriteString(const QByteArray& value);
42 
43 private:
44  QTextStream m_stream;
45  QBuffer m_buffer;
46 };
47 
48 
49 } // namespace iser
50 
51 
52 #endif // !iser_CXmlStringWriteArchive_included
53 
54 
static CArchiveTag s_acfRootTag
Definition: CArchiveBase.h:35
Base class for XML storing archives.
Provides access to version information.
Definition: IVersionInfo.h:22
CXmlStringWriteArchive(const IVersionInfo *versionInfoPtr=NULL, bool serializeHeader=true, const CArchiveTag &rootTag=s_acfRootTag)
virtual const QByteArray & GetString() const
Close the archive and get the created XML string.
#define NULL
Definition: istd.h:64
Simple implementation of archive for writing of XML given as a string.
Process tag used to group data in archive stream.
Definition: CArchiveTag.h:21
virtual bool WriteString(const QByteArray &value)

© 2007-2017 Witold Gantzke and Kirill Lepskiy