ImagingTools Core SDK
CSdlUnionGeneratorComp.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 <imtsdlgencpp/CSdlUnionConverter.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 CSdlUnionConverter
35{
36
37public:
39
40 I_BEGIN_COMPONENT(CSdlUnionGeneratorComp)
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
49 I_END_COMPONENT
50
51 // reimplemented (ICxxFileProcessor)
52 virtual bool ProcessEntry(
53 const imtsdl::CSdlEntryBase& sdlEntry,
54 QIODevice* headerDevicePtr,
55 QIODevice* sourceDevicePtr = nullptr,
56 const iprm::IParamsSet* paramsPtr = nullptr) const override;
57
58 // reimplemented (IIncludeDirectivesProvider)
59 virtual QList<imtsdl::IncludeDirective> GetIncludeDirectives() const override;
60
61private:
62 I_REF(imtsdl::ISdlProcessArgumentsParser, m_argumentParserCompPtr);
63 I_REF(imtsdl::ISdlTypeListProvider, m_sdlTypeListCompPtr);
64 I_REF(imtsdl::ISdlEnumListProvider, m_sdlEnumListCompPtr);
65 I_REF(imtsdl::ISdlUnionListProvider, m_sdlUnionListCompPtr);
66 I_REF(iprm::IParamsSet, m_customSchemaParamsCompPtr);
67 I_REF(iprm::ITextParam, m_originalSchemaNamespaceCompPtr);
68 I_REF(iprm::IOptionsManager, m_dependentSchemaListCompPtr);
69};
70
71
72} // namespace imtsdlgencpp
73