ILogger.h
Go to the documentation of this file.
1 #ifndef istd_ILogger_included
2 #define istd_ILogger_included
3 
4 
5 // Qt includes
6 #include <QtCore/QString>
7 
8 // ACF includes
10 
11 
12 namespace istd
13 {
14 
15 
20 class ILogger: virtual public IPolymorphic
21 {
22 public:
27  virtual bool IsLogConsumed(
29  const int* flagsPtr = NULL) const;
30 
40  virtual bool SendLogMessage(
42  int id,
43  const QString& message,
44  const QString& messageSource,
45  int flags = 0) const;
46 
47 protected:
51  virtual void DecorateMessage(
53  int id,
54  int flags,
55  QString& message,
56  QString& messageSource) const;
57 };
58 
59 
60 // inline methods
61 
63  const IInformationProvider::InformationCategory* /*categoryPtr*/,
64  const int* /*flagsPtr*/) const
65 {
66  return false;
67 }
68 
69 
72  int /*id*/,
73  const QString& /*message*/,
74  const QString& /*messageSource*/,
75  int /*flags*/) const
76 {
77  return false;
78 }
79 
80 
81 // protected methods
82 
85  int /*id*/,
86  int /*flags*/,
87  QString& /*message*/,
88  QString& /*messageSource*/) const
89 {
90 }
91 
92 
93 } // namespace istd
94 
95 
96 #endif // !istd_ILogger_included
97 
98 
virtual void DecorateMessage(IInformationProvider::InformationCategory category, int id, int flags, QString &message, QString &messageSource) const
Decorate message parts before outputting.
Definition: ILogger.h:83
Common interface for classes sending some log info.
Definition: ILogger.h:20
virtual bool IsLogConsumed(const IInformationProvider::InformationCategory *categoryPtr=NULL, const int *flagsPtr=NULL) const
Check if any log message is consumed.
Definition: ILogger.h:62
Base interface for all used interfaces and implementations.
Definition: IPolymorphic.h:17
InformationCategory
Category of information.
#define NULL
Definition: istd.h:64
virtual bool SendLogMessage(IInformationProvider::InformationCategory category, int id, const QString &message, const QString &messageSource, int flags=0) const
Send any message to log.
Definition: ILogger.h:70

© 2007-2017 Witold Gantzke and Kirill Lepskiy