Changeset 9fdfa27 in OpenModelica
- Timestamp:
- 2015-04-10T17:45:03+02:00 (9 years ago)
- Branches:
- Added-citation-metadata, maintenance/v1.14, maintenance/v1.15, maintenance/v1.16, maintenance/v1.17, maintenance/v1.18, maintenance/v1.19, maintenance/v1.20, maintenance/v1.21, maintenance/v1.22, maintenance/v1.23, master, omlib-staging
- Children:
- 305ab23b
- Parents:
- d9e3df5
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
Compiler/Template/CodegenFMUCpp.tpl
r14ffb43 r9fdfa27 87 87 class <%lastIdentOfPath(modelInfo.name)%>WriteOutput { 88 88 public: 89 <%lastIdentOfPath(modelInfo.name)%>WriteOutput(IGlobalSettings* globalSettings, boost::shared_ptr<IAlgLoopSolverFactory> nonLinSolverFactory, boost::shared_ptr<ISimData> simData ) {}89 <%lastIdentOfPath(modelInfo.name)%>WriteOutput(IGlobalSettings* globalSettings, boost::shared_ptr<IAlgLoopSolverFactory> nonLinSolverFactory, boost::shared_ptr<ISimData> simData, boost::shared_ptr<ISimVars> simVars) {} 90 90 virtual ~<%lastIdentOfPath(modelInfo.name)%>WriteOutput() {} 91 91 … … 175 175 class <%modelIdentifier%>FMU: public <%modelIdentifier%>Extension { 176 176 public: 177 // create simulation variables 178 static ISimVars *createSimVars(); 179 177 180 // constructor 178 181 <%modelIdentifier%>FMU(IGlobalSettings* globalSettings, 179 182 boost::shared_ptr<IAlgLoopSolverFactory> nonLinSolverFactory, 180 boost::shared_ptr<ISimData> simData); 183 boost::shared_ptr<ISimData> simData, 184 boost::shared_ptr<ISimVars> simVars); 181 185 182 186 // initialization … … 236 240 '#include "FMU/FMULibInterface.cpp"'%> 237 241 242 // create simulation variables 243 #include <System/FactoryExport.h> 244 #include <System/SimVars.h> 245 246 ISimVars *<%modelIdentifier%>FMU::createSimVars() { 247 return new SimVars(<%numRealvars(modelInfo)%>, <%numIntvars(modelInfo)%>, <%numBoolvars(modelInfo)%>, <%getPreVarsCount(simCode)%>, <%numStatevars(modelInfo)%>, <%numStateVarIndex(modelInfo)%>); 248 } 249 238 250 // constructor 239 251 <%modelIdentifier%>FMU::<%modelIdentifier%>FMU(IGlobalSettings* globalSettings, 240 252 boost::shared_ptr<IAlgLoopSolverFactory> nonLinSolverFactory, 241 boost::shared_ptr<ISimData> simData ):242 PreVariables(<%getPreVarsCount(simCode)%>),243 <%modelIdentifier%>(globalSettings, nonLinSolverFactory, simData ),244 <%modelIdentifier%>Extension(globalSettings, nonLinSolverFactory, simData ) {253 boost::shared_ptr<ISimData> simData, 254 boost::shared_ptr<ISimVars> simVars): 255 <%modelIdentifier%>(globalSettings, nonLinSolverFactory, simData, simVars), 256 <%modelIdentifier%>Extension(globalSettings, nonLinSolverFactory, simData, simVars) { 245 257 } 246 258 -
SimulationRuntime/cpp/Core/System/CMakeLists.txt
rcdfcc84 r9fdfa27 46 46 ${CMAKE_SOURCE_DIR}/Include/Core/System/DiscreteEvents.h 47 47 ${CMAKE_SOURCE_DIR}/Include/Core/System/ContinuousEvents.h 48 ${CMAKE_SOURCE_DIR}/Include/Core/System/SimVars.h 49 ${CMAKE_SOURCE_DIR}/Core/System/FactoryExport.h 48 50 DESTINATION include/omc/cpp/Core/System) 49 51 install (FILES -
SimulationRuntime/cpp/Include/FMU2/FMU2Wrapper.cpp
ra9009b7e r9fdfa27 76 76 _model = boost::shared_ptr<MODEL_CLASS> 77 77 (new MODEL_CLASS(&_global_settings, solver_factory, 78 boost::shared_ptr<ISimData>(new SimData()))); 78 boost::shared_ptr<ISimData>(new SimData()), 79 boost::shared_ptr<ISimVars>(MODEL_CLASS::createSimVars()))); 79 80 _model->initialize(); 80 81 _string_buffer.resize(_model->getDimString());
Note: See TracChangeset
for help on using the changeset viewer.