ImagingTools Core SDK
CEventFactoryCompBase.h
1// SPDX-License-Identifier: LGPL-2.1-or-later OR GPL-2.0-or-later OR GPL-3.0-or-later OR LicenseRef-ImtCore-Commercial
2#pragma once
3
4
5// ACF includes
6#include <icomp/CComponentBase.h>
7
8// ImtCore includes
9#include <imtloggui/IEventItemFactory.h>
10
11
12namespace imtloggui
13{
14
15
16class CEventFactoryCompBase: public icomp::CComponentBase, virtual public IEventItemFactory
17{
18public:
19 typedef icomp::CComponentBase BaseClass;
20
21 I_BEGIN_BASE_COMPONENT(CEventFactoryCompBase)
22 I_REGISTER_INTERFACE(IEventItemFactory)
23 I_ASSIGN_MULTI_0(m_messageIdListAttrPtr, "MessageIdList", "Supported message id's. Empty list for any", false);
24 I_ASSIGN(m_slaveEventFactoryCompPtr, "SlaveEventFactory", "Slave event item factory", false, "");
25 I_ASSIGN(m_timestampFormatCompPtr, "TimestampDisplayFormat", "Timestamp display format", true, "");
26 I_END_COMPONENT
27
28 // reimplemented (imtloggui::IEventItemFactory)
29 virtual QVector<int> GetSupportedMessageIds() const override;
30
31protected:
32 bool IsSupportedMessageId(int messageId) const;
33 IEventItem* CreateInstanceWithSlaveFactory(const ilog::IMessageConsumer::MessagePtr& message) const;
34
35private:
36 I_MULTIATTR(int, m_messageIdListAttrPtr);
37 I_REF(IEventItemFactory, m_slaveEventFactoryCompPtr);
38 I_ATTR(QByteArray, m_timestampFormatCompPtr);
39};
40
41
42} // namespace imtloggui
43
44