ACF $AcfVersion:0$
CLogCompBase.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-2.1-or-later OR GPL-2.0-or-later OR GPL-3.0-or-later OR LicenseRef-ACF-Commercial
2#pragma once
3
4
5// Qt includes
6#include <QtCore/QObject>
7
8// ACF includes
10
11
12namespace ilog
13{
14
15
74 public QObject,
75 public ilog::TMessageDelegatorComp<icomp::CComponentBase>
76{
77 Q_OBJECT
78public:
81
83 typedef QObject BaseClass2;
84
85 I_BEGIN_BASE_COMPONENT(CLogCompBase);
86 I_END_COMPONENT;
87
95
96 // reimplemented (ilog::IMessageConsumer)
97
110 virtual void AddMessage(const MessagePtr& messagePtr) override;
111
112protected:
136 virtual void WriteMessageToLog(const MessagePtr& messagePtr) = 0;
137
138private Q_SLOTS:
147 void OnAddMessage(const MessagePtr& messagePtr);
148
149Q_SIGNALS:
159 void EmitAddMessage(const MessagePtr& messagePtr);
160};
161
162
163} // namespace ilog
164
165
166
Base implementation for logging components using Qt event queue.
virtual void WriteMessageToLog(const MessagePtr &messagePtr)=0
Abstract method called to process a message.
QObject BaseClass2
Base class typedef for QObject functionality.
CLogCompBase()
Default constructor.
void EmitAddMessage(const MessagePtr &messagePtr)
Signal emitted when a message is added.
ilog::TMessageDelegatorComp< icomp::CComponentBase > BaseClass
Base class typedef for component functionality.
virtual void AddMessage(const MessagePtr &messagePtr) override
Add a message to this log component.
Template component that delegates messages to a slave consumer.
Shared ownership smart pointer for interface types.
This namespace contains implementations for the logging functionality.