ICF 3.1.1.10
Technical documentation of ICF Libraries
CLogCompBase.h
Go to the documentation of this file.
1/********************************************************************************
2** This file is part of the ICF Framework. Copyright (C) Witold Gantzke & Kirill Lepskiy
3** ICF Framework may be used under the terms of the LGPL License v. 2.1 by the Free Software Foundation.
4********************************************************************************/
5
6#ifndef ilog_CLogCompBase_included
7#define ilog_CLogCompBase_included
8
9
10// Qt includes
11#include <QtCore/QObject>
12
13// ICF includes
15
16
17namespace ilog
18{
19
20
25 public QObject,
26 public ilog::TMessageDelegatorComp<icomp::CComponentBase>
27{
28 Q_OBJECT
29public:
31 typedef QObject BaseClass2;
32
33 I_BEGIN_BASE_COMPONENT(CLogCompBase);
34 I_END_COMPONENT;
35
37
38 // reimplemented (ilog::IMessageConsumer)
39 void AddMessage(const MessagePtr& messagePtr) override;
40
41protected:
42 virtual void WriteMessageToLog(const MessagePtr& messagePtr) = 0;
43
44private Q_SLOTS:
45 void OnAddMessage(const MessagePtr& messagePtr);
46
47Q_SIGNALS:
48 void EmitAddMessage(const MessagePtr& messagePtr);
49};
50
51
52} // namespace ilog
53
54
55#endif // !ilog_CLogCompBase_included
56
Basic implementation for logging using event queue for message transportation.
virtual void WriteMessageToLog(const MessagePtr &messagePtr)=0
ilog::TMessageDelegatorComp< icomp::CComponentBase > BaseClass
void EmitAddMessage(const MessagePtr &messagePtr)
void AddMessage(const MessagePtr &messagePtr) override
Adds a message item to the container.
std::shared_ptr< const istd::IInformationProvider > MessagePtr
Delegator component for a message consumer.
This namespace contains implementations for the logging functionality.

© Witold Gantzke and Kirill Lepskiy