Documentation for OpenFLUID 2.2.2
Loading...
Searching...
No Matches
Factory.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 Factory.hpp
35
36 @author Jean-Christophe FABRE <jean-christophe.fabre@inra.fr>
37 */
38
39
40#ifndef __OPENFLUID_MACHINE_FACTORY_HPP__
41#define __OPENFLUID_MACHINE_FACTORY_HPP__
42
43
45#include <openfluid/core/TypeDefs.hpp>
49
50
51namespace openfluid {
52
53
54namespace base {
55class ExecutionMessages;
56class OutputDescriptor;
57}
58namespace core {
59class SpatialGraph;
60class Datastore;
61}
62namespace fluidx {
63class SpatialDomainDescriptor;
64class RunDescriptor;
65class DatastoreDescriptor;
66} }
67
68
69namespace openfluid { namespace machine {
70
71class SimulationBlob;
72class ModelInstance;
73class MonitoringInstance;
74
75
77{
78
79 public:
80
81 Factory() = delete;
82
83 /**
84 Builds a spatial graph from a domain descriptor
85 @param[in] Descriptor the spatial domain descriptor
86 @param[out] SGraph the instanciated spatial graph
87 */
90
91 /**
92 Builds a datastore from a datastore descriptor
93 @param[in] Descriptor the datastore descriptor
94 @param[out] Store the instanciated datastore
95 */
98
99 /**
100 Builds a coupled model instance from a model descriptor
101 @param[in] ModelDesc the model descriptor
102 @param[out] MInstance the instanciated coupled model
103 */
105 ModelInstance& MInstance);
106
107 /**
108 Builds a monitoring instance from a monitoring descriptor
109 @param[in] MonDesc the monitoring descriptor
110 @param[out] MonInstance the instanciated monitoring
111 */
113 MonitoringInstance& MonInstance);
114
115 /**
116 Fills the current run context from a run configuration descriptor
117 @param[in] RunDesc the run configuration descriptor
118 */
120
121 /**
122 Builds a simulation blob from descriptors
123 @param[in] FluidXDesc the descriptors
124 @param[out] SimBlob the instanciated simulation blob
125 */
127 SimulationBlob& SimBlob);
128
129};
130
131
132} } //namespaces
133
134
135#endif /* __OPENFLUID_MACHINE_FACTORY_HPP__ */
Definition Datastore.hpp:58
Definition SpatialGraph.hpp:53
Definition CoupledModelDescriptor.hpp:53
Definition DatastoreDescriptor.hpp:55
Definition FluidXDescriptor.hpp:60
Definition MonitoringDescriptor.hpp:53
Definition RunConfigurationDescriptor.hpp:53
Definition SpatialDomainDescriptor.hpp:63
Definition Factory.hpp:77
static void buildDatastoreFromDescriptor(const openfluid::fluidx::DatastoreDescriptor &Descriptor, openfluid::core::Datastore &Store)
static void buildDomainFromDescriptor(const openfluid::fluidx::SpatialDomainDescriptor &Descriptor, openfluid::core::SpatialGraph &SGraph)
static void fillRunContextFromDescriptor(const openfluid::fluidx::RunConfigurationDescriptor &RunDesc)
static void buildMonitoringInstanceFromDescriptor(const openfluid::fluidx::MonitoringDescriptor &MonDesc, MonitoringInstance &MonInstance)
static void buildSimulationBlobFromDescriptors(const openfluid::fluidx::FluidXDescriptor &FluidXDesc, SimulationBlob &SimBlob)
static void buildModelInstanceFromDescriptor(const openfluid::fluidx::CoupledModelDescriptor &ModelDesc, ModelInstance &MInstance)
Definition ModelInstance.hpp:66
Definition MonitoringInstance.hpp:59
Definition SimulationBlob.hpp:54
#define OPENFLUID_API
Definition dllexport.hpp:86
Definition ApplicationException.hpp:47