Manual for OpenFLUID 2.1.11

PluggableParameterizationExtension.hpp
Go to the documentation of this file.
1 /*
2 
3  This file is part of OpenFLUID software
4  Copyright(c) 2007, INRA - Montpellier SupAgro
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_BUILDEREXT_PLUGGABLEPARAMETERIZATIONEXTENSION_HPP__
41 #define __OPENFLUID_BUILDEREXT_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->Type = openfluid::builderext::TYPE_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 
83 namespace openfluid { namespace builderext {
84 
85 
87 {
88  Q_OBJECT;
89 
90  protected:
91 
93 
95 
96 
97  signals:
98 
99  void changed();
100 
101 
102  public:
103 
105  mp_Desc(nullptr), mp_Params(nullptr)
106  {
107 
108  }
109 
110 
112  {
113  mp_Params = Params;
114  }
115 
116 
118  {
119 
120  }
121 
122 
124  {
125  mp_Desc = Desc;
126  }
127 
128  virtual void update() = 0;
129 
130 };
131 
132 
133 } } // namespaces
134 
135 
136 #endif /* __OPENFLUID_BUILDEREXT_PLUGGABLEPARAMETERIZATIONEXTENSION_HPP__ */
OPENFLUID_API
#define OPENFLUID_API
Definition: dllexport.hpp:86
openfluid::builderext::PluggableParameterizationExtension::PluggableParameterizationExtension
PluggableParameterizationExtension()
Definition: PluggableParameterizationExtension.hpp:104
PluggableBuilderExtension.hpp
openfluid::fluidx::FluidXDescriptor
Definition: FluidXDescriptor.hpp:70
openfluid::builderext::PluggableParameterizationExtension::mp_Desc
const openfluid::fluidx::FluidXDescriptor * mp_Desc
Definition: PluggableParameterizationExtension.hpp:88
openfluid::builderext::PluggableParameterizationExtension::setFluidXDescriptor
void setFluidXDescriptor(const openfluid::fluidx::FluidXDescriptor *Desc)
Definition: PluggableParameterizationExtension.hpp:123
openfluid::builderext::PluggableParameterizationExtension::~PluggableParameterizationExtension
virtual ~PluggableParameterizationExtension()
Definition: PluggableParameterizationExtension.hpp:117
openfluid
Definition: ApplicationException.hpp:47
openfluid::builderext::PluggableParameterizationExtension::mp_Params
openfluid::ware::WareParams_t * mp_Params
Definition: PluggableParameterizationExtension.hpp:94
openfluid::builderext::PluggableBuilderExtension
Definition: PluggableBuilderExtension.hpp:54
openfluid::builderext::PluggableParameterizationExtension
Definition: PluggableParameterizationExtension.hpp:86
openfluid::builderext::PluggableParameterizationExtension::linkParams
void linkParams(openfluid::ware::WareParams_t *Params)
Definition: PluggableParameterizationExtension.hpp:111
openfluid::ware::WareParams_t
std::map< WareParamKey_t, WareParamValue_t > WareParams_t
Definition: TypeDefs.hpp:146