ImagingTools Core SDK
CFeaturePackageRepresentationControllerComp.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// ImtCore includes
6#include <imtserverapp/CObjectRepresentationControllerCompBase.h>
7#include <imtlic/CFeatureInfo.h>
8
9
10namespace imtauth
11{
12
13
14class CFeaturePackageRepresentationControllerComp: public imtserverapp::CObjectRepresentationControllerCompBase
15{
16public:
17 typedef imtserverapp::CObjectRepresentationControllerCompBase BaseClass;
18
19 I_BEGIN_COMPONENT(CFeaturePackageRepresentationControllerComp);
20 I_END_COMPONENT;
21
22protected:
23 // reimplemented (imtserverapp::CObjectRepresentationControllerCompBase)
24 virtual bool GetRepresentationFromValue(const istd::IChangeable& dataModel, QJsonObject& representation, const iprm::IParamsSet* paramsPtr = nullptr) const override;
25
26 // reimplemented (imtrest::IRepresentationController)
27 virtual bool IsModelSupported(const istd::IChangeable& dataModel) const override;
28 virtual bool GetDataModelFromRepresentation(const QJsonObject& representation, istd::IChangeable& dataModel) const override;
29 virtual bool GetRepresentationFromDataModel(const istd::IChangeable& dataModel, QJsonObject& representation, const iprm::IParamsSet* paramsPtr = nullptr) const override;
30
31protected:
32 bool CreateRepresentationModelFromFeatureInfo(const imtlic::CFeatureInfo& featureInfo, QJsonObject& representationModel, QString& errorMessage) const;
33};
34
35
36} // namespace imtauth
37