ImagingTools Core SDK
CTaskCollectionContextComp.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// Qt includes
6#include <QtCore/QMutex>
7
8// ACF includes
9#include <icomp/CComponentBase.h>
10
11// Acula includes
12#include <imthype/ITaskCollectionContext.h>
13
14
15namespace imthype
16{
17
18
19class CTaskCollectionContextComp:
20 public icomp::CComponentBase,
21 virtual public ITaskCollectionContext
22{
23public:
24 typedef icomp::CComponentBase BaseClass;
25
26 I_BEGIN_COMPONENT(CTaskCollectionContextComp);
27 I_REGISTER_INTERFACE(ITaskCollectionContext);
28 I_REGISTER_INTERFACE(iser::ISerializable);
29 I_END_COMPONENT;
30
31 CTaskCollectionContextComp();
32
33 // reimplemented (imthype::ITaskCollectionContext)
34 virtual QByteArray GetTaskId() const override;
35 virtual void SetTaskId(const QByteArray& taskId) override;
36 virtual QByteArray GetTaskInputId() const override;
37 virtual void SetTaskInputId(const QByteArray& inputId) override;
38
39 // reimplemented (iser::ISerializable)
40 virtual bool Serialize(iser::IArchive& archive) override;
41
42private:
43#if QT_VERSION >= 0x060000
44 mutable QRecursiveMutex m_dataMutex;
45#else
46 mutable QMutex m_dataMutex;
47#endif
48
49 QByteArray m_taskId;
50 QByteArray m_taskInputId;
51};
52
53
54} // namespace imthype
55
56