CXmlStreamReadArchiveBase.h
Go to the documentation of this file.
1 #ifndef iser_CXmlStreamReadArchiveBase_included
2 #define iser_CXmlStreamReadArchiveBase_included
3 
4 
5 // Qt includes
6 #include <QtCore/QTextStream>
7 
8 // ACF includes
10 
11 
12 namespace iser
13 {
14 
15 
20 {
21 public:
23 
24  int GetLastReadLine() const;
25 
26 protected:
27  explicit CXmlStreamReadArchiveBase(const CArchiveTag& rootTag = s_acfRootTag);
28 
29  // reimplemented (iser::CXmlReadArchiveBase)
30  virtual bool ReadToDelimeter(
31  const QByteArray& delimeters,
32  QByteArray& result,
33  bool skipDelimeter = true,
34  char* foundDelimeterPtr = NULL);
35 
36  // reimplemented (istd::ILogger)
37  virtual void DecorateMessage(
39  int id,
40  int flags,
41  QString& message,
42  QString& messageSource) const;
43 
44  QTextStream m_stream;
45 
46 private:
47  char m_lastReadChar;
48  bool m_useLastReadChar;
49 
50  int m_lastReadLine;
51 };
52 
53 
54 } // namespace iser
55 
56 
57 #endif // !iser_CXmlStreamReadArchiveBase_included
58 
59 
virtual void DecorateMessage(istd::IInformationProvider::InformationCategory category, int id, int flags, QString &message, QString &messageSource) const
Decorate message parts before outputting.
virtual bool ReadToDelimeter(const QByteArray &delimeters, QByteArray &result, bool skipDelimeter=true, char *foundDelimeterPtr=NULL)
Read input stream till one of specified delimeters is found.
static CArchiveTag s_acfRootTag
Definition: CArchiveBase.h:35
Base implementation of a reading archive for XML format using a stream implementation.
Base class for XML based reading archives.
InformationCategory
Category of information.
#define NULL
Definition: istd.h:64
Process tag used to group data in archive stream.
Definition: CArchiveTag.h:21
CXmlStreamReadArchiveBase(const CArchiveTag &rootTag=s_acfRootTag)

© 2007-2017 Witold Gantzke and Kirill Lepskiy