CLogCompBase.h
Go to the documentation of this file.
1 #ifndef ilog_CLogCompBase_included
2 #define ilog_CLogCompBase_included
3 
4 
5 // Qt includes
6 #include <QtCore/QObject>
7 
8 // ACF includes
10 
11 
12 namespace ilog
13 {
14 
15 
22  public QObject,
23  public ilog::TMessageDelegatorComp<icomp::CComponentBase>
24 {
25  Q_OBJECT
26 public:
28  typedef QObject BaseClass2;
29 
30  I_BEGIN_BASE_COMPONENT(CLogCompBase);
31  I_END_COMPONENT;
32 
33  CLogCompBase();
34 
35  // reimplemented (ilog::IMessageConsumer)
36  virtual void AddMessage(const MessagePtr& messagePtr);
37 
38 protected:
39  virtual void WriteMessageToLog(const MessagePtr& messagePtr) = 0;
40 
41 private Q_SLOTS:
42  void OnAddMessage(const MessagePtr& messagePtr);
43 
44 Q_SIGNALS:
45  void EmitAddMessage(const MessagePtr& messagePtr);
46 };
47 
48 
49 } // namespace ilog
50 
51 
52 #endif // !ilog_CLogCompBase_included
53 
Delegator component for a message consumer.
virtual void AddMessage(const MessagePtr &messagePtr)
Adds a message item to the container.
Basic implementation for logging using event queue for message transportation.
Definition: CLogCompBase.h:21
Implementation of a smart pointer.
Definition: TSmartPtr.h:24
ilog::TMessageDelegatorComp< icomp::CComponentBase > BaseClass
Definition: CLogCompBase.h:27
void EmitAddMessage(const MessagePtr &messagePtr)
virtual void WriteMessageToLog(const MessagePtr &messagePtr)=0

© 2007-2017 Witold Gantzke and Kirill Lepskiy