ImagingTools Core SDK
IOperationContext.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 <istd/IChangeable.h>
7
8
9namespace imtbase
10{
11
12
13class IObjectCollection;
14
15
22class IOperationContext: virtual public istd::IChangeable
23{
24public:
25 struct IdentifableObjectInfo
26 {
27 IdentifableObjectInfo(const QByteArray& id = QByteArray(), const QString& name = QString()): id(id), name(name) {}
28
29 QByteArray id;
30 QString name;
31
32 bool operator==(const IdentifableObjectInfo& other) const
33 {
34 return (id == other.id) && (name == other.name);
35 }
36
37 bool operator!=(const IdentifableObjectInfo& other) const
38 {
39 return !operator==(other);
40 }
41 };
42
43 static const QByteArray OPERATION_CONTEXT_INFO;
44 typedef IdentifableObjectInfo OperationContextInfo;
45
49 virtual IdentifableObjectInfo GetOperationOwnerId() const = 0;
50
54 virtual QString GetOperationDescription() const = 0;
55
60};
61
62
63} // namespace imtbase
64
65
66Q_DECLARE_METATYPE(imtbase::IOperationContext::OperationContextInfo);
67
68
virtual QString GetOperationDescription() const =0
virtual imtbase::IObjectCollection * GetChangesCollection()=0
virtual IdentifableObjectInfo GetOperationOwnerId() const =0