Documentation for OpenFLUID 2.2.2
Loading...
Searching...
No Matches
PluggableParameterizationExtension.hpp
Go to the documentation of this file.
1/*
2
3 This file is part of OpenFLUID software
4 Copyright(c) 2021-2026, INRAE
5
6
7 == GNU General Public License Usage ==
8
9 OpenFLUID is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
13
14 OpenFLUID is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with OpenFLUID. If not, see <http://www.gnu.org/licenses/>.
21
22
23 == Other Usage ==
24
25 Other Usage means a use of OpenFLUID that is inconsistent with the GPL
26 license, and requires a written agreement between You and INRA.
27 Licensees for Other Usage of OpenFLUID may use this file in accordance
28 with the terms contained in the written agreement between You and INRA.
29
30*/
31
32
33/**
34 @file PluggableParameterizationExtension.hpp
35
36 @author Jean-Christophe FABRE <jean-christophe.fabre@inra.fr>
37*/
38
39
40#ifndef __OPENFLUID_UIBUILDEREXT_PLUGGABLEPARAMETERIZATIONEXTENSION_HPP__
41#define __OPENFLUID_UIBUILDEREXT_PLUGGABLEPARAMETERIZATIONEXTENSION_HPP__
42
43
44#include <QWidget>
45
47
48
49/**
50 Macro for the beginning of definition of signature for parameterization extension
51*/
52#ifndef BEGIN_BUILDEREXT_SIGNATURE
53#define BEGIN_BUILDEREXT_SIGNATURE(id) \
54 extern "C" { \
55 OPENFLUID_PLUGIN openfluid::builderext::BuilderExtensionSignature* WARESIGNATURE_PROC_DECL() \
56 { \
57 openfluid::builderext::BuilderExtensionSignature* Signature =\
58 new openfluid::builderext::BuilderExtensionSignature(); \
59 Signature->ID = (id); \
60 Signature->Role = openfluid::builderext::ExtensionRole::PARAMETERIZATION; \
61 Signature->BuildInfo.SDKVersion = openfluid::config::VERSION_FULL; \
62 Signature->BuildInfo.BuildType = (WAREBUILD_BUILD_TYPE); \
63 Signature->BuildInfo.CompilerID = (WAREBUILD_COMPILER_ID); \
64 Signature->BuildInfo.CompilerVersion = (WAREBUILD_COMPILER_VERSION); \
65 Signature->BuildInfo.CompilationFlags = (WAREBUILD_COMPILATION_FLAGS);
66#endif
67
68/**
69 Macro for the end of definition of signature hook
70*/
71#ifndef END_BUILDEREXT_SIGNATURE
72#define END_BUILDEREXT_SIGNATURE \
73 return Signature; \
74 } \
75}
76#endif
77
78
79// =====================================================================
80// =====================================================================
81
82
83namespace openfluid { namespace ui { namespace builderext {
84
85
88{
89 Q_OBJECT;
90
91 protected:
92
94
96
97
98 signals:
99
100 void changed();
101
102
103 public:
104
106 QWidget(), PluggableBuilderExtension(),
107 mp_Desc(nullptr), mp_Params(nullptr)
108 {
109
110 }
111
112
114 {
115 mp_Params = Params;
116 }
117
118
120 {
121
122 }
123
124
126 {
127 mp_Desc = Desc;
128 }
129
130
131 virtual void update() = 0;
132
133};
134
135
136} } } // namespaces
137
138
139#endif /* __OPENFLUID_UIBUILDEREXT_PLUGGABLEPARAMETERIZATIONEXTENSION_HPP__ */
Definition PluggableBuilderExtension.hpp:81
Definition FluidXDescriptor.hpp:60
Definition PluggableParameterizationExtension.hpp:88
virtual ~PluggableParameterizationExtension()
Definition PluggableParameterizationExtension.hpp:119
void setFluidXDescriptor(const openfluid::fluidx::FluidXDescriptor *Desc)
Definition PluggableParameterizationExtension.hpp:125
void linkParams(openfluid::ware::WareParams_t *Params)
Definition PluggableParameterizationExtension.hpp:113
PluggableParameterizationExtension()
Definition PluggableParameterizationExtension.hpp:105
openfluid::ware::WareParams_t * mp_Params
Definition PluggableParameterizationExtension.hpp:95
const openfluid::fluidx::FluidXDescriptor * mp_Desc
Definition PluggableParameterizationExtension.hpp:93
#define OPENFLUID_API
Definition dllexport.hpp:86
std::map< WareParamKey_t, WareParamValue_t > WareParams_t
Definition TypeDefs.hpp:146
Definition ApplicationException.hpp:47