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  @file PluggableParameterizationExtension.hpp
34 
35  @author Jean-Christophe FABRE <jean-christophe.fabre@supagro.inra.fr>
36 */
37 
38 
39 #ifndef __OPENFLUID_BUILDEREXT_PLUGGABLEPARAMETERIZATIONEXTENSION_HPP__
40 #define __OPENFLUID_BUILDEREXT_PLUGGABLEPARAMETERIZATIONEXTENSION_HPP__
41 
42 
44 
45 #include <QWidget>
46 
47 
48 /**
49  Macro for the beginning of definition of signature for parameterization extension
50 */
51 #ifndef BEGIN_BUILDEREXT_SIGNATURE
52 #define BEGIN_BUILDEREXT_SIGNATURE(id) \
53  extern "C" { \
54  OPENFLUID_PLUGIN openfluid::builderext::BuilderExtensionSignature* WARESIGNATURE_PROC_DECL() \
55  { \
56  openfluid::builderext::BuilderExtensionSignature* Signature =\
57  new openfluid::builderext::BuilderExtensionSignature(); \
58  Signature->setABIVersion(openfluid::config::VERSION_FULL); \
59  Signature->ID = (id); \
60  Signature->Type = openfluid::builderext::TYPE_PARAMETERIZATION;
61 #endif
62 
63 /**
64  Macro for the end of definition of signature hook
65 */
66 #ifndef END_BUILDEREXT_SIGNATURE
67 #define END_BUILDEREXT_SIGNATURE \
68  return Signature; \
69  } \
70 }
71 #endif
72 
73 // =====================================================================
74 // =====================================================================
75 
76 
77 namespace openfluid { namespace builderext {
78 
79 
81 {
82  Q_OBJECT;
83 
84  protected:
85 
87 
89 
90 
91  signals:
92 
93  void changed();
94 
95 
96  public:
97 
99  mp_AdvancedDesc(nullptr), mp_Params(nullptr)
100  {
101 
102  }
103 
104 
106  {
107  mp_Params = Params;
108  }
109 
110 
112  {
113 
114  }
115 
116 
118  { mp_AdvancedDesc = Desc; }
119 
120  virtual void update() = 0;
121 
122 };
123 
124 
125 } } // namespaces
126 
127 
128 #endif /* __OPENFLUID_PLUGGABLEPARAMETERIZATIONEXTENSION_HPP__ */
const openfluid::fluidx::AdvancedFluidXDescriptor * mp_AdvancedDesc
Definition: PluggableParameterizationExtension.hpp:82
void setFluidXDescriptor(const openfluid::fluidx::AdvancedFluidXDescriptor *Desc)
Definition: PluggableParameterizationExtension.hpp:117
Definition: PluggableBuilderExtension.hpp:87
void linkParams(openfluid::ware::WareParams_t *Params)
Definition: PluggableParameterizationExtension.hpp:105
Definition: ApplicationException.hpp:47
#define OPENFLUID_API
Definition: dllexport.hpp:87
Definition: PluggableParameterizationExtension.hpp:80
openfluid::ware::WareParams_t * mp_Params
Definition: PluggableParameterizationExtension.hpp:88
PluggableParameterizationExtension()
Definition: PluggableParameterizationExtension.hpp:98
virtual ~PluggableParameterizationExtension()
Definition: PluggableParameterizationExtension.hpp:111
Definition: AdvancedFluidXDescriptor.hpp:51
std::map< WareParamKey_t, WareParamValue_t > WareParams_t
Definition: TypeDefs.hpp:130