ImagingTools Core SDK
CQmlRegisterGeneratorComp.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/QFile>
7
8// ACF includes
9#include <istd/TDelPtr.h>
10#include <iprm/ITextParam.h>
11#include <iprm/IOptionsManager.h>
12#include <iproc/TSyncProcessorCompBase.h>
13
14// ImtCore includes
15#include <imtsdl/ISdlProcessArgumentsParser.h>
16#include <imtsdl/ISdlTypeListProvider.h>
17#include <imtsdl/CSdlTools.h>
18#include <imtsdl/CSdlEnumConverter.h>
19#include <imtsdlgencpp/IIncludeDirectivesProvider.h>
20#include <imtsdlgencpp/CSdlGenTools.h>
21#include <imtsdlgencpp/CCxxProcessorCompBase.h>
22
23
24namespace imtsdlgencpp
25{
26
32 private imtsdl::CSdlTools,
33 private CSdlGenTools,
34 private imtsdl::CSdlEnumConverter
35{
36
37public:
39
40 I_BEGIN_COMPONENT(CQmlRegisterGeneratorComp)
41 I_ASSIGN(m_argumentParserCompPtr, "ArgumentParser", "Command line process argument parser", true, "ArgumentParser")
42 I_ASSIGN(m_sdlTypeListCompPtr, "SdlTypeListProvider", "SDL types used to create a code", true, "SdlTypeListProvider")
43 I_ASSIGN(m_sdlEnumListCompPtr, "SdlEnumListProvider", "SDL enums used to create a code", true, "SdlEnumListProvider")
44 I_ASSIGN(m_sdlUnionListCompPtr, "SdlUnionListProvider", "SDL unioins used to create a code", true, "SdlUnionListProvider")
45 I_ASSIGN(m_customSchemaParamsCompPtr, "CustomSchemaParams", "Custom schema parameters, that contains additional options", false, "CustomSchemaParams")
46 I_ASSIGN(m_originalSchemaNamespaceCompPtr, "OriginalSchemaNamespace", "The namespace of the original(root) schema", true, "OriginalSchemaNamespace")
47 I_ASSIGN(m_dependentSchemaListCompPtr, "DependentSchemaList", "The list of dependent schemas, used to generate dependencies of output file", true, "DependentSchemaList")
48 I_END_COMPONENT
49
50 // reimplemented (ICxxFileProcessor)
51 virtual bool ProcessEntry(
52 const imtsdl::CSdlEntryBase& sdlEntry,
53 QIODevice* headerDevicePtr,
54 QIODevice* sourceDevicePtr = nullptr,
55 const iprm::IParamsSet* paramsPtr = nullptr) const override;
56
57 // reimplemented (IIncludeDirectivesProvider)
58 virtual QList<imtsdl::IncludeDirective> GetIncludeDirectives() const override;
59
60private:
61 I_REF(imtsdl::ISdlProcessArgumentsParser, m_argumentParserCompPtr);
62 I_REF(imtsdl::ISdlTypeListProvider, m_sdlTypeListCompPtr);
63 I_REF(imtsdl::ISdlEnumListProvider, m_sdlEnumListCompPtr);
64 I_REF(imtsdl::ISdlUnionListProvider, m_sdlUnionListCompPtr);
65 I_REF(iprm::IParamsSet, m_customSchemaParamsCompPtr);
66 I_REF(iprm::ITextParam, m_originalSchemaNamespaceCompPtr);
67 I_REF(iprm::IOptionsManager, m_dependentSchemaListCompPtr);
68};
69
70
71} // namespace imtsdlgencpp
72