Commit 6e94fdff authored by Aaron Bray's avatar Aaron Bray

Merge branch '2.x'

parents 92ab76c4 a5c408b9
......@@ -2,16 +2,42 @@
/cdm/build/
/engine/build/
/schema/build/
/schema/bind/
/test/build/
/sdk/howto/build/
# The IntelliJ build dir
/.idea/out
# This is for the C# how to
/sdk/howto/csharp/.vs
/sdk/howto/csharp/bin
/sdk/howto/csharp/obj
/sdk/howto/csharp/HowToCSharp.csproj.user
/sdk/howto/csharp/HowToCSharp.sdf
sdk/howto/csharp/*.db
sdk/howto/csharp/*.opendb
# This is for the C# projects
/.vs/
/schema/bin/
/schema/obj/
/cdm/csharp/bin
/cdm/csharp/obj
/engine/csharp/.vs
/engine/csharp/bin
/engine/csharp/obj
/engine/csharp/HowToCSharp.csproj.user
/engine/csharp/HowToCSharp.sdf
/engine/csharp/*.db
/engine/csharp/*.opendb
/sdk/howto/csharp/clr/.vs
/sdk/howto/csharp/clr/bin
/sdk/howto/csharp/clr/obj
/sdk/howto/csharp/clr/HowToCSharp.csproj.user
/sdk/howto/csharp/clr/HowToCSharp.sdf
/sdk/howto/csharp/clr/*.db
/sdk/howto/csharp/clr/*.opendb
/sdk/howto/csharp/c/.vs
/sdk/howto/csharp/c/bin
/sdk/howto/csharp/c/obj
/sdk/howto/csharp/c/HowToCSharp.csproj.user
/sdk/howto/csharp/c/HowToCSharp.sdf
/sdk/howto/csharp/c/*.db
/sdk/howto/csharp/c/*.opendb
......@@ -14,9 +14,14 @@
<root url="jar://$PROJECT_DIR$/jar/reflections-0.9.9-RC1-uberjar.jar!/" />
<root url="jar://$PROJECT_DIR$/jar/jcommon-1.0.16.jar!/" />
<root url="jar://$PROJECT_DIR$/jar/commons-logging-1.2.jar!/" />
<root url="jar://$PROJECT_DIR$/jar/guava-11.0.2.jar!/" />
<root url="jar://$PROJECT_DIR$/jar/gson-2.8.5.jar!/" />
<root url="jar://$PROJECT_DIR$/jar/guava-26.0-jre.jar!/" />
<root url="jar://$PROJECT_DIR$/jar/org.eclipse.jgit-4.11.0.201803080745-r.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
<excluded>
<root url="jar://$PROJECT_DIR$/jar/zip4j-1.3.1.jar!/" />
</excluded>
</library>
</component>
\ No newline at end of file
......@@ -2,14 +2,13 @@
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/schema/bind/bind.iml" filepath="$PROJECT_DIR$/schema/bind/bind.iml" />
<module fileurl="file://$PROJECT_DIR$/cdm/cdm.iml" filepath="$PROJECT_DIR$/cdm/cdm.iml" />
<module fileurl="file://$PROJECT_DIR$/test/cdm/cdm_test.iml" filepath="$PROJECT_DIR$/test/cdm/cdm_test.iml" />
<module fileurl="file://$PROJECT_DIR$/test/driver/driver.iml" filepath="$PROJECT_DIR$/test/driver/driver.iml" />
<module fileurl="file://$PROJECT_DIR$/engine/engine.iml" filepath="$PROJECT_DIR$/engine/engine.iml" />
<module fileurl="file://$PROJECT_DIR$/test/engine/engine_test.iml" filepath="$PROJECT_DIR$/test/engine/engine_test.iml" />
<module fileurl="file://$PROJECT_DIR$/sdk/howto/howto.iml" filepath="$PROJECT_DIR$/sdk/howto/howto.iml" />
<module fileurl="file://$PROJECT_DIR$/../../builds/engine/protobuf/src/protobuf/java/core/src/main/protobuf.iml" filepath="$PROJECT_DIR$/../../builds/engine/protobuf/src/protobuf/java/core/src/main/protobuf.iml" />
<module fileurl="file://$PROJECT_DIR$/../../builds/engine/Pulse/schema/schema.iml" filepath="$PROJECT_DIR$/../../builds/engine/Pulse/schema/schema.iml" />
</modules>
</component>
</project>
\ No newline at end of file
This diff is collapsed.
......@@ -85,7 +85,7 @@ list(APPEND LOG4CPLUS_INCLUDE_DIR ${log4cplus_SRC}/include)
list(APPEND LOG4CPLUS_INCLUDE_DIR ${log4cplus_SRC}-build/include)
set(SCHEMA_SRC "${CMAKE_SOURCE_DIR}/schema")
set(SCHEMA_DST "${CMAKE_BINARY_DIR}/schema")
set(SCHEMA_DST "${CMAKE_SOURCE_DIR}/schema/bind")
# Settings for protobuf configuration
set(protobuf_BUILD_PROTOC_BINARIES OFF CACHE TYPE INTERNAL FORCE)
set(protobuf_BUILD_SHARED_LIBS OFF CACHE TYPE INTERNAL FORCE)
......@@ -109,8 +109,10 @@ add_subdirectory(engine)
add_subdirectory(test)
add_subdirectory(sdk)
add_subdirectory(verification)
include(${CMAKE_CURRENT_SOURCE_DIR}/PulseJNI.cmake)
# Various interfaces for different languages
include(${CMAKE_CURRENT_SOURCE_DIR}/PulseC.cmake)
include(${CMAKE_CURRENT_SOURCE_DIR}/PulseCLR.cmake)
include(${CMAKE_CURRENT_SOURCE_DIR}/PulseJNI.cmake)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set_target_properties (libprotobuf libprotobuf-lite PROPERTIES FOLDER protobufs)
......
add_library(PulseC SHARED engine/cpp/PulseEngineC.h
engine/cpp/PulseEngineC.cpp)
target_include_directories(PulseC PRIVATE ${CMAKE_BINARY_DIR}/schema/cpp/)
target_include_directories(PulseC PRIVATE ${CMAKE_BINARY_DIR}/schema/cpp/bind/)
target_include_directories(PulseC PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/engine/cpp)
target_include_directories(PulseC PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/cdm/cpp)
target_include_directories(PulseC PRIVATE ${EIGEN3_INCLUDE_DIR})
target_include_directories(PulseC PRIVATE ${LOG4CPLUS_INCLUDE_DIR})
target_include_directories(PulseC PRIVATE ${PROTOBUF_INCLUDE_DIR})
set(PulseC_FLAGS)
set_target_properties(PulseC PROPERTIES COMPILE_FLAGS "${PulseC_FLAGS}" PREFIX "")
if(APPLE)
set_target_properties(PulseC PROPERTIES MACOSX_RPATH ON)
endif()
target_link_libraries(PulseC PulseEngine)
set_target_properties(PulseC PROPERTIES
DEBUG_POSTFIX "${PULSE_DEBUG_POSTFIX}"
RELWITHDEBINFO_POSTFIX "${PULSE_RELWITHDEBINFO_POSTFIX}")
add_custom_command(TARGET PulseC POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:PulseC> ${INSTALL_BIN})
install(TARGETS PulseC
RUNTIME DESTINATION ${INSTALL_BIN}
LIBRARY DESTINATION ${INSTALL_LIB}
ARCHIVE DESTINATION ${INSTALL_LIB})
......@@ -15,10 +15,10 @@ target_include_directories(PulseCLR PRIVATE ${EIGEN3_INCLUDE_DIR})
target_include_directories(PulseCLR PRIVATE ${LOG4CPLUS_INCLUDE_DIR})
target_include_directories(PulseCLR PRIVATE ${PROTOBUF_INCLUDE_DIR})
set(PulseCLR_FLAGS "/EHa")
set(PulseCLR_FLAGS "/clr /EHa")
string( REPLACE "/RTC1" "" CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG} )
set_target_properties(PulseCLR PROPERTIES COMPILE_FLAGS "${PulseCLR_FLAGS}" PREFIX "")
set_target_properties(PulseCLR PROPERTIES COMMON_LANGUAGE_RUNTIME "") # Also turn on CLR
#set_target_properties(PulseCLR PROPERTIES COMMON_LANGUAGE_RUNTIME "") # CMake > 3.12 only
message(STATUS "PulseCLR COMPILE_FLAGS : ${CMAKE_CXX_FLAGS_DEBUG}")
set_target_properties(PulseCLR PROPERTIES
......

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28010.2048
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DataModelBindings", "schema\DataModelBindings.csproj", "{B2EDD13C-70D5-4460-9B89-6A2E33025917}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CommonDataModel", "cdm\csharp\CommonDataModel.csproj", "{77EBB03F-149B-405A-94F6-8FD4D2A7BD4E}"
ProjectSection(ProjectDependencies) = postProject
{B2EDD13C-70D5-4460-9B89-6A2E33025917} = {B2EDD13C-70D5-4460-9B89-6A2E33025917}
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PulseEngine", "engine\csharp\PulseEngine.csproj", "{1AEAB5E7-DD83-4710-9990-A28643E9A6E4}"
ProjectSection(ProjectDependencies) = postProject
{77EBB03F-149B-405A-94F6-8FD4D2A7BD4E} = {77EBB03F-149B-405A-94F6-8FD4D2A7BD4E}
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B2EDD13C-70D5-4460-9B89-6A2E33025917}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B2EDD13C-70D5-4460-9B89-6A2E33025917}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B2EDD13C-70D5-4460-9B89-6A2E33025917}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B2EDD13C-70D5-4460-9B89-6A2E33025917}.Release|Any CPU.Build.0 = Release|Any CPU
{77EBB03F-149B-405A-94F6-8FD4D2A7BD4E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{77EBB03F-149B-405A-94F6-8FD4D2A7BD4E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{77EBB03F-149B-405A-94F6-8FD4D2A7BD4E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{77EBB03F-149B-405A-94F6-8FD4D2A7BD4E}.Release|Any CPU.Build.0 = Release|Any CPU
{1AEAB5E7-DD83-4710-9990-A28643E9A6E4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1AEAB5E7-DD83-4710-9990-A28643E9A6E4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1AEAB5E7-DD83-4710-9990-A28643E9A6E4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1AEAB5E7-DD83-4710-9990-A28643E9A6E4}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {85696B76-5E05-4E52-8E1E-A42766963AE5}
EndGlobalSection
EndGlobal
......@@ -9,8 +9,6 @@ add_library(PulseJNI SHARED cdm/cpp/CommonDataModelJNI.cpp
engine/cpp/PulseEngineJNI.cpp)
find_package(JNI REQUIRED)
target_include_directories(PulseJNI PRIVATE ${JNI_INCLUDE_DIRS})
target_include_directories(PulseJNI PRIVATE ${CMAKE_BINARY_DIR}/schema/cpp/)
target_include_directories(PulseJNI PRIVATE ${CMAKE_BINARY_DIR}/schema/cpp/bind/)
target_include_directories(PulseJNI PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/engine/cpp)
target_include_directories(PulseJNI PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/cdm/cpp)
target_include_directories(PulseJNI PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/test/engine/cpp)
......@@ -43,8 +41,7 @@ install(TARGETS PulseJNI
file(GLOB_RECURSE JAVA_FILES
"${CMAKE_BINARY_DIR}/schema/java/*.java"
"${CMAKE_BINARY_DIR}/../protobuf/src/protobuf/java/core/src/main/java/*.java"
"${CMAKE_SOURCE_DIR}/schema/bind/java/*.java"
"${CMAKE_SOURCE_DIR}/cdm/java/*.java"
"${CMAKE_SOURCE_DIR}/engine/java/*.java"
"${CMAKE_SOURCE_DIR}/test/cdm/java/*.java"
......@@ -55,7 +52,8 @@ add_jar(PulseJava ${JAVA_FILES}
"${CMAKE_SOURCE_DIR}/jar/jcommon-1.0.16.jar"
"${CMAKE_SOURCE_DIR}/jar/jdom-2.0.2.jar"
"${CMAKE_SOURCE_DIR}/jar/jfreechart-1.0.13.jar"
"${CMAKE_SOURCE_DIR}/jar/guava-11.0.2.jar"
"${CMAKE_SOURCE_DIR}/jar/gson-2.8.5.jar"
"${CMAKE_SOURCE_DIR}/jar/guava-26.0-jre.jar"
"${CMAKE_SOURCE_DIR}/jar/log4j-1.2.17.jar"
"${CMAKE_SOURCE_DIR}/jar/poi-3.13-20150929.jar"
"${CMAKE_SOURCE_DIR}/jar/poi-ooxml-3.13-20150929.jar"
......
......@@ -41,7 +41,7 @@ message(STATUS "Eigen is here : ${eigen_SRC}" )
###################################################
message( STATUS "External project - log4cplus" )
set(log4cplus_SRC "${CMAKE_BINARY_DIR}/log4cplus/src/log4cplus")
set(log4cplus_SRC "${CMAKE_BINARY_DIR}/log4cplus/src/log4cplus" CACHE PATH "Log4cplus Source")
ExternalProject_Add( log4cplus
PREFIX log4cplus
......
This diff is collapsed.
This diff is collapsed.
{
"Name": "InitialStableState",
"Description": "Stabilize a patient and save out the engines state at time zero",
"StartType": {
"PatientConfiguration": {
"PatientFile": "StandardMale.json"
}
},
"AnyAction": [{
"Serialize": {
}
}]
}
\ No newline at end of file
Name: "InitialStableState"
Description: "Stabilize a patient and save out the engines state at time zero"
InitialParameters { PatientFile:"StandardMale.pba" }
AnyAction
{
Serialize { }
}
{
}
\ No newline at end of file
#This will change the time step
#TimeStep {
# ScalarTime { Value: 0.02 Unit: "s" }
#}
{
"Configuration": {
"AutoSerialization" : {
"Directory" : "./states/testing/",
"Filename" : "SerializationTest",
"AfterActions" : "On",
"Period" : { "ScalarTime": { "Value": 5.0, "Unit": "s" } },
"PeriodTimeStamps" : "On",
"ReloadState" : "On",
}
},
"Scenario": {
"Name":"SerializationTest",
"Description":"Basic scenario testing serialization",
"StartType":{"EngineStateFile":"./states/StandardMale@0s.json"},
"DataRequestManager": {
"DataRequest": [
{"DecimalFormat":{"Precision":2}, "Category":"Physiology", "PropertyName":"HeartRate", "Unit":"1/min"},
{"DecimalFormat":{"Precision":1}, "Category":"Physiology", "PropertyName":"ArterialPressure", "Unit":"mmHg"},
{"DecimalFormat":{"Precision":1}, "Category":"Physiology", "PropertyName":"MeanArterialPressure", "Unit":"mmHg"},
{"DecimalFormat":{} , "Category":"Physiology", "PropertyName":"SystolicArterialPressure", "Unit":"mmHg"},
{"DecimalFormat":{"Precision":1}, "Category":"Physiology", "PropertyName":"DiastolicArterialPressure", "Unit":"mmHg"},
{"DecimalFormat":{"Precision":3}, "Category":"Physiology", "PropertyName":"OxygenSaturation", "Unit":"unitless"},
{"DecimalFormat":{"Precision":4}, "Category":"Physiology", "PropertyName":"EndTidalCarbonDioxideFraction", "Unit":"unitless"},
{"DecimalFormat":{"Precision":2}, "Category":"Physiology", "PropertyName":"RespirationRate", "Unit":"1/min"},
{"DecimalFormat":{"Precision":1}, "Category":"Physiology", "PropertyName":"SkinTemperature", "Unit":"degC"},
{"DecimalFormat":{} , "Category":"GasCompartment", "CompartmentName":"Carina", "SubstanceName":"Oxygen", "PropertyName":"PartialPressure", "Unit":"cmH2O"},
]},
"AnyAction":[
{"AdvanceTime":{"Time":{"ScalarTime":{"Value":5.0,"Unit":"s"}}}},
{"PatientAction": {
"Hemorrhage": {
"Compartment": "RightArmVasculature",
"Rate": { "ScalarVolumePerTime": { "Value": 60.0, "Unit": "mL/min" } }
}
}},
{"AdvanceTime":{"Time":{"ScalarTime":{"Value":20.0,"Unit":"s"}}}},
]
}
}
\ No newline at end of file
This diff is collapsed.
{
"Name": "Vitals Monitor",
"Description": "Data associated with a vitals monitor.",
"StartType": { "PatientConfiguration": { "PatientFile": "StandardMale.json" } },
"DataRequestManager": {
"DataRequest": [
{"DecimalFormat":{"Precision":2}, "Category":"Physiology", "PropertyName":"HeartRate", "Unit":"1/min"},
{"DecimalFormat":{"Precision":1}, "Category":"Physiology", "PropertyName":"ArterialPressure", "Unit":"mmHg"},
{"DecimalFormat":{"Precision":1}, "Category":"Physiology", "PropertyName":"MeanArterialPressure", "Unit":"mmHg"},
{"DecimalFormat":{} , "Category":"Physiology", "PropertyName":"SystolicArterialPressure", "Unit":"mmHg"},
{"DecimalFormat":{"Precision":1}, "Category":"Physiology", "PropertyName":"DiastolicArterialPressure", "Unit":"mmHg"},
{"DecimalFormat":{"Precision":3}, "Category":"Physiology", "PropertyName":"OxygenSaturation", "Unit":"unitless"},
{"DecimalFormat":{"Precision":4}, "Category":"Physiology", "PropertyName":"EndTidalCarbonDioxideFraction", "Unit":"unitless"},
{"DecimalFormat":{"Precision":2}, "Category":"Physiology", "PropertyName":"RespirationRate", "Unit":"1/min"},
{"DecimalFormat":{"Precision":1}, "Category":"Physiology", "PropertyName":"SkinTemperature", "Unit":"degC"},
{"DecimalFormat":{} , "Category":"GasCompartment", "CompartmentName":"Carina", "SubstanceName":"Oxygen", "PropertyName":"PartialPressure", "Unit":"cmH2O"},
]},
"AnyAction": [{
"AdvanceTime": {
"Time": {
"ScalarTime": {
"Value": 5.0,
"Unit": "min"
}
}
}
}]
}
\ No newline at end of file
......@@ -27,7 +27,8 @@ set(JAVA_CLASSPATH Pulse.jar
"@CMAKE_SOURCE_DIR@/jar/jcommon-1.0.16.jar"
"@CMAKE_SOURCE_DIR@/jar/jdom-2.0.2.jar"
"@CMAKE_SOURCE_DIR@/jar/jfreechart-1.0.13.jar"
"@CMAKE_SOURCE_DIR@/jar/guava-11.0.2.jar"
"@CMAKE_SOURCE_DIR@/jar/gson-2.8.5.jar"
"@CMAKE_SOURCE_DIR@/jar/guava-26.0-jre.jar"
"@CMAKE_SOURCE_DIR@/jar/log4j-1.2.17.jar"
"@CMAKE_SOURCE_DIR@/jar/poi-3.13-20150929.jar"
"@CMAKE_SOURCE_DIR@/jar/poi-ooxml-3.13-20150929.jar"
......
......@@ -4,7 +4,6 @@
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry combineaccessrules="false" kind="src" path="/DataModelBindings"/>
<classpathentry kind="var" path="SOURCE_DIR/jar/commons-logging-1.2.jar"/>
<classpathentry kind="var" path="SOURCE_DIR/jar/guava-11.0.2.jar"/>
<classpathentry kind="var" path="SOURCE_DIR/jar/javassist-3.16.1-GA.jar"/>
<classpathentry kind="var" path="SOURCE_DIR/jar/jcommon-1.0.16.jar"/>
<classpathentry kind="var" path="SOURCE_DIR/jar/jdom-2.0.2.jar"/>
......@@ -17,5 +16,7 @@
<classpathentry kind="var" path="SOURCE_DIR/jar/reflections-0.9.9-RC1-uberjar.jar"/>
<classpathentry kind="var" path="SOURCE_DIR/jar/xmlbeans-2.6.0.jar"/>
<classpathentry kind="var" path="SOURCE_DIR/jar/zip4j-1.3.1.jar"/>
<classpathentry kind="var" path="SOURCE_DIR/jar/gson-2.8.5.jar"/>
<classpathentry kind="var" path="SOURCE_DIR/jar/guava-26.0-jre.jar"/>
<classpathentry kind="output" path="build/java"/>
</classpath>
......@@ -156,8 +156,8 @@ if(MSVC)
endif()
endif(MSVC)
target_include_directories(CommonDataModel PRIVATE ${CMAKE_BINARY_DIR}/schema/cpp/bind)
target_include_directories(CommonDataModel PRIVATE ${CMAKE_BINARY_DIR}/schema/cpp/)
target_include_directories(CommonDataModel PRIVATE ${CMAKE_SOURCE_DIR}/schema)
target_include_directories(CommonDataModel PRIVATE ${CMAKE_SOURCE_DIR}/schema/bind/cpp)
target_include_directories(CommonDataModel PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/cpp)
target_include_directories(CommonDataModel PRIVATE ${EIGEN3_INCLUDE_DIR})
target_include_directories(CommonDataModel PRIVATE ${LOG4CPLUS_INCLUDE_DIR})
......
......@@ -7,7 +7,6 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="jar" level="project" />
<orderEntry type="module" module-name="schema" exported="" />
<orderEntry type="module" module-name="bind" />
</component>
</module>
\ No newline at end of file
......@@ -116,7 +116,7 @@ struct CommonDataModelException : public std::runtime_error
#include "Macros.h"
#include "utils/Logger.h"
enum SerializationMode { BINARY = 0, ASCII };
enum SerializationFormat { BINARY = 0, JSON };
// General Enums
// Keep enums in sync with appropriate schema/cdm/Enums.proto file !!
......
......@@ -9,11 +9,9 @@
#include "log4cplus/config.hxx"
extern "C"
JNIEXPORT void JNICALL Java_com_kitware_physiology_utilities_jniBridge_nativeInitialize(JNIEnv *env, jobject obj, jstring wrkDir)
JNIEXPORT void JNICALL Java_com_kitware_physiology_utilities_jniBridge_nativeInitialize(JNIEnv *env, jobject obj)
{
const char* dir = env->GetStringUTFChars(wrkDir, JNI_FALSE);
CUnitConversionEngine::GetEngine().SetWorkingDirectory(dir);
env->ReleaseStringUTFChars(wrkDir, dir);
}
extern "C"
......
......@@ -6,6 +6,7 @@
class SEEventHandler;
class SEAdvanceHandler;
class SEPatient;
class SEPatientConfiguration;
class SEPatientAssessment;
class SECondition;
......@@ -62,14 +63,14 @@ public:
/// Engine will be in a cleared state if this method fails.
/// Note the provided configuration will overwrite any configuration options in the state with its contents (Use with caution!)
//--------------------------------------------------------------------------------------------------
virtual bool SerializeFromFile(const std::string& filename, SerializationMode m=ASCII, const SEScalarTime* simTime=nullptr, const SEEngineConfiguration* config = nullptr) = 0;
virtual bool SerializeFromFile(const std::string& filename, SerializationFormat m, const SEScalarTime* simTime=nullptr, const SEEngineConfiguration* config = nullptr) = 0;
//--------------------------------------------------------------------------------------------------
/// \brief
/// Save the current state of the engine to provided filename.
/// Engine will be in a cleared state if this method fails.
//--------------------------------------------------------------------------------------------------
virtual bool SerializeToFile(const std::string& filename="engine.state", SerializationMode m=ASCII) const = 0;
virtual bool SerializeToFile(const std::string& filename, SerializationFormat m) const = 0;
//--------------------------------------------------------------------------------------------------
/// \brief
......@@ -82,7 +83,7 @@ public:
/// Engine will be in a cleared state if this method fails.
/// Note the provided configuration will overwrite any configuration options in the state with its contents (Use with caution!)
//--------------------------------------------------------------------------------------------------
virtual bool SerializeFromString(const std::string& state, SerializationMode m=BINARY, const SEScalarTime* simTime = nullptr, const SEEngineConfiguration* config = nullptr) = 0;
virtual bool SerializeFromString(const std::string& state, SerializationFormat m, const SEScalarTime* simTime = nullptr, const SEEngineConfiguration* config = nullptr) = 0;
//--------------------------------------------------------------------------------------------------
/// \brief
......@@ -91,18 +92,18 @@ public:
/// Note that the bytes are binary, not text; we only use the string class as a convenient container.