TreeFrogFramework  1.18
tloggerplugin.h
Go to the documentation of this file.
1 #ifndef TLOGGERPLUGIN_H
2 #define TLOGGERPLUGIN_H
3 
4 #include <QObject>
5 #include <QStringList>
6 #include <QtPlugin>
7 #include <TGlobal>
8 
9 #define TLoggerInterface_iid "org.treefrogframework.TreeFrog.TLoggerInterface/1.0"
10 
11 class TLogger;
12 
13 
15 {
16 public:
17  virtual ~TLoggerInterface() { }
18  virtual TLogger *create(const QString &key) = 0;
19 #if QT_VERSION < 0x050000
20  virtual QStringList keys() const = 0;
21 #endif
22 };
23 
24 Q_DECLARE_INTERFACE(TLoggerInterface, TLoggerInterface_iid)
25 
26 
27 class T_CORE_EXPORT TLoggerPlugin : public QObject, public TLoggerInterface
28 {
29  Q_OBJECT
30  Q_INTERFACES(TLoggerInterface)
31 
32 public:
33  explicit TLoggerPlugin(QObject *parent = 0) : QObject(parent) { }
35 
36  virtual TLogger *create(const QString &key) = 0;
37 #if QT_VERSION < 0x050000
38  virtual QStringList keys() const = 0;
39 #endif
40 };
41 
42 #endif // TLOGGERPLUGIN_H
#define T_CORE_EXPORT
Definition: tglobal.h:81
TLoggerPlugin(QObject *parent=0)
Constructor.
Definition: tloggerplugin.h:33
The TLoggerInterface class provides an interface to implement TLogger plugins.
Definition: tloggerplugin.h:14
virtual ~TLoggerInterface()
Definition: tloggerplugin.h:17
~TLoggerPlugin()
Definition: tloggerplugin.h:34
The TLogger class provides an abstract base of logging functionality.
Definition: tlogger.h:13
The TLoggerPlugin class provides an abstract base for custom TLogger plugins.
Definition: tloggerplugin.h:27
#define TLoggerInterface_iid
Definition: tloggerplugin.h:9