Linux GNU 11.4.0 Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 100.0% 3 / 0 / 3
Functions: 100.0% 1 / 0 / 1
Branches: 100.0% 1 / 0 / 1

OMCompiler/SimulationRuntime/cpp/Core/SimulationSettings/FactoryExport.cpp
Line Branch Exec Source
1 /*
2 * This file belongs to the OpenModelica Run-Time System
3 *
4 * Copyright (c) 1998-2026, Open Source Modelica Consortium (OSMC), c/o Linköpings
5 * universitet, Department of Computer and Information Science, SE-58183 Linköping, Sweden. All rights
6 * reserved.
7 *
8 * THIS PROGRAM IS PROVIDED UNDER THE TERMS OF THE BSD NEW LICENSE OR THE
9 * AGPL VERSION 3 LICENSE OR THE OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.8. ANY
10 * USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES RECIPIENT'S
11 * ACCEPTANCE OF THE BSD NEW LICENSE OR THE OSMC PUBLIC LICENSE OR THE AGPL
12 * VERSION 3, ACCORDING TO RECIPIENTS CHOICE.
13 *
14 * The OpenModelica software and the OSMC (Open Source Modelica Consortium) Public License
15 * (OSMC-PL) are obtained from OSMC, either from the above address, from the URLs:
16 * http://www.openmodelica.org or https://github.com/OpenModelica/ or
17 * http://www.ida.liu.se/projects/OpenModelica, and in the OpenModelica distribution. GNU
18 * AGPL version 3 is obtained from: https://www.gnu.org/licenses/licenses.html#GPL. The BSD NEW
19 * License is obtained from: http://www.opensource.org/licenses/BSD-3-Clause.
20 *
21 * This program is distributed WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY
23 * SET FORTH IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF
24 * OSMC-PL.
25 *
26 */
27
28 /** @addtogroup coreSimulationSettings
29 *
30 * @{
31 */
32
33 #include <Core/ModelicaDefine.h>
34 #include <Core/Modelica.h>
35 #if defined(__vxworks) || defined(__TRICORE__)
36
37
38
39 #include <Core/SimulationSettings/Factory.h>
40
41 extern "C" ISettingsFactory* createSettingsFactory(PATH library_path, PATH modelicasystem_path)
42 {
43 return new SettingsFactory(library_path, library_path, modelicasystem_path);
44 }
45
46 #elif defined(SIMSTER_BUILD)
47
48
49 #include <Core/SimulationSettings/Factory.h>
50
51 /*Simster factory */
52 extern "C" void BOOST_EXTENSION_EXPORT_DECL extension_export_simulation_settings(boost::extensions::factory_map & fm)
53 {
54
55 fm.get<ISettingsFactory,int,PATH,PATH,PATH>()[1].set<SettingsFactory>();
56 }
57
58 #elif defined(OMC_BUILD) && !defined(RUNTIME_STATIC_LINKING)
59
60
61
62 #include <SimCoreFactory/OMCFactory/OMCFactory.h>
63 #include <Core/SimulationSettings/Factory.h>
64
65 /*OMC facory*/
66 using boost::extensions::factory;
67 40 BOOST_EXTENSION_TYPE_MAP_FUNCTION {
68
69 types.get<std::map<std::string, boost::extensions::factory<ISettingsFactory,PATH,PATH,PATH> > >()
70
1/1
✓ Branch 2 taken 40 times.
40 ["SettingsFactory"].set<SettingsFactory>();
71 40 }
72 #elif defined(OMC_BUILD) && defined(RUNTIME_STATIC_LINKING)
73 #include <Core/SimulationSettings/Factory.h>
74 shared_ptr<ISettingsFactory> createFactory(PATH libraries_path, PATH config_path, PATH modelicasystem_path)
75 {
76 shared_ptr<ISettingsFactory> setttingsFactory = shared_ptr<ISettingsFactory>(new SettingsFactory(libraries_path,config_path,modelicasystem_path));
77 return setttingsFactory;
78 }
79
80 #else
81 error "operating system not supported"
82 #endif
83 /** @} */ // end of coreSimulationSettings
84