-
Notifications
You must be signed in to change notification settings - Fork 298
/
SystemBodasFactory.h
49 lines (43 loc) · 1.64 KB
/
SystemBodasFactory.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#pragma once
/** @addtogroup simcorefactoriesPolicies
*
* @{
*/
/*
Policy class to create a Simster-, Modelica- system or AlgLoopSolver
*/
template <class CreationPolicy>
struct SystemBodasFactory : public ObjectFactory<CreationPolicy>
{
public:
SystemBodasFactory(PATH library_path, PATH modelicasystem_path, PATH config_path)
: ObjectFactory<CreationPolicy>(library_path, modelicasystem_path, config_path)
{
_use_modelica_compiler = false;
}
~SystemBodasFactory()
{
}
shared_ptr<IAlgLoopSolverFactory> createAlgLoopSolverFactory(IGlobalSettings* globalSettings)
{
shared_ptr<IAlgLoopSolverFactory> algloopsolverfactory = ObjectFactory<CreationPolicy>::_factory->LoadAlgLoopSolverFactory(globalSettings);
return algloopsolverfactory;
}
shared_ptr<ISimData> createSimData()
{
shared_ptr<ISimData> simData = ObjectFactory<CreationPolicy>::_factory->LoadSimData();
return simData;
}
shared_ptr<IMixedSystem> createSystem(string modelLib, string modelKey, IGlobalSettings* globalSettings,shared_ptr<ISimObjects> simObjects)
{
shared_ptr<IMixedSystem> system = ObjectFactory<CreationPolicy>::_factory->LoadSystem(globalSettings,simObjects);
return system;
}
shared_ptr<IMixedSystem> createModelicaSystem(string modelLib, string modelKey, IGlobalSettings* globalSettings,shared_ptr<ISimObjects> simObjects)
{
shared_ptr<IMixedSystem> system = ObjectFactory<CreationPolicy>::_factory->LoadSystem(globalSettings, simObjects);
return system;
}
bool _use_modelica_compiler;
};
/** @} */ // end of simcorefactoriesPolicies