Commit 395fd01a authored by Aaron Bray's avatar Aaron Bray
Browse files

Add support to request data on actions

parent e0e3d657
......@@ -31,4 +31,7 @@ Macro EngineUnitTest=EngineUnitTestDriver FastPlot Baseline=unit_tests/pulse/ Co
Macro EngineUnitTestFull=EngineUnitTestDriver FullPlot Baseline=unit_tests/pulse/ Computed=./test_results/unit_tests/pulse
Macro ScenarioTest=ScenarioTestDriver FastPlot Baseline=scenarios/ Computed=./test_results/scenarios
patient/BasicStandard.json = ScenarioTest
#patient/BasicStandard.json = ScenarioTest
patient/HemorrhageSeverity1.json = ScenarioTest
patient/HemorrhageVaryingSeverity.json = ScenarioTest
#patient/HemorrhageClass4NoFluid.json = ScenarioTest
......@@ -64,7 +64,9 @@
{ "DecimalFormat": { "Precision": 3 }, "Category": "Physiology", "PropertyName": "SystemicVascularResistance", "Unit": "mmHg s/mL"},
{ "DecimalFormat": { "Precision": 3 }, "Category": "Physiology", "PropertyName": "TotalHemorrhageRate", "Unit": "mL/s"},
{ "DecimalFormat": { "Precision": 3 }, "Category": "Physiology", "PropertyName": "TotalHemorrhagedVolume", "Unit": "mL"}
{ "DecimalFormat": { "Precision": 3 }, "Category": "Physiology", "PropertyName": "TotalHemorrhagedVolume", "Unit": "mL"},
{ "DecimalFormat": { "Precision": 3 }, "Category": "Action", "ActionName": "Hemorrhage", "CompartmentName": "RightLegVasculature", "PropertyName": "FlowRate", "Unit": "mL/s"},
{ "DecimalFormat": { "Precision": 3 }, "Category": "Action", "ActionName": "Hemorrhage", "CompartmentName": "RightLegVasculature", "PropertyName": "TotalBloodLost", "Unit": "mL"}
]
},
"AnyAction": [{
......
......@@ -64,7 +64,11 @@
{ "DecimalFormat": { "Precision": 3 }, "Category": "Physiology", "PropertyName": "SystemicVascularResistance", "Unit": "mmHg s/mL"},
{ "DecimalFormat": { "Precision": 3 }, "Category": "Physiology", "PropertyName": "TotalHemorrhageRate", "Unit": "mL/s"},
{ "DecimalFormat": { "Precision": 3 }, "Category": "Physiology", "PropertyName": "TotalHemorrhagedVolume", "Unit": "mL"}
{ "DecimalFormat": { "Precision": 3 }, "Category": "Physiology", "PropertyName": "TotalHemorrhagedVolume", "Unit": "mL"},
{ "DecimalFormat": { "Precision": 3 }, "Category": "Action", "ActionName": "Hemorrhage", "CompartmentName": "RightLegVasculature", "PropertyName": "FlowRate", "Unit": "mL/s"},
{ "DecimalFormat": { "Precision": 3 }, "Category": "Action", "ActionName": "Hemorrhage", "CompartmentName": "RightLegVasculature", "PropertyName": "TotalBloodLost", "Unit": "mL"},
{ "DecimalFormat": { "Precision": 3 }, "Category": "Action", "ActionName": "Hemorrhage", "CompartmentName": "LeftLegVasculature", "PropertyName": "FlowRate", "Unit": "mL/s"},
{ "DecimalFormat": { "Precision": 3 }, "Category": "Action", "ActionName": "Hemorrhage", "CompartmentName": "LeftLegVasculature", "PropertyName": "TotalBloodLost", "Unit": "mL"}
]
},
"AnyAction": [{
......@@ -87,6 +91,17 @@
}
}
}
}, {
"PatientAction": {
"Hemorrhage": {
"Compartment": "LeftLegVasculature",
"Severity": {
"Scalar0To1": {
"Value": 0.05
}
}
}
}
}, {
"AdvanceTime": {
"Time": {
......
......@@ -114,7 +114,6 @@ add_library_ex(CommonDataModel
patient/actions/SEBrainInjury.h
patient/actions/SEBronchoconstriction.h
patient/actions/SECardiacArrest.h
patient/actions/SEChestCompression.h
patient/actions/SEChestCompressionForce.h
patient/actions/SEChestCompressionForceScale.h
patient/actions/SEChestOcclusiveDressing.h
......@@ -154,7 +153,6 @@ add_library_ex(CommonDataModel
patient/assessments/SEUrinalysisMicroscopic.h
patient/conditions/SEAcuteRespiratoryDistressSyndrome.h
patient/conditions/SEChronicAnemia.h
patient/conditions/SEChronicHeartFailure.h
patient/conditions/SEChronicObstructivePulmonaryDisease.h
patient/conditions/SEChronicPericardialEffusion.h
patient/conditions/SEChronicRenalStenosis.h
......@@ -454,7 +452,6 @@ add_library_ex(CommonDataModel
patient/actions/SEBrainInjury.cpp
patient/actions/SEBronchoconstriction.cpp
patient/actions/SECardiacArrest.cpp
patient/actions/SEChestCompression.cpp
patient/actions/SEChestCompressionForce.cpp
patient/actions/SEChestCompressionForceScale.cpp
patient/actions/SEChestOcclusiveDressing.cpp
......@@ -494,7 +491,6 @@ add_library_ex(CommonDataModel
patient/assessments/SEUrinalysisMicroscopic.cpp
patient/conditions/SEAcuteRespiratoryDistressSyndrome.cpp
patient/conditions/SEChronicAnemia.cpp
patient/conditions/SEChronicHeartFailure.cpp
patient/conditions/SEChronicObstructivePulmonaryDisease.cpp
patient/conditions/SEChronicPericardialEffusion.cpp
patient/conditions/SEChronicRenalStenosis.cpp
......
......@@ -22,6 +22,7 @@ SEAction::~SEAction()
void SEAction::Clear()
{
m_Comment="";
m_Active = false;
}
std::string SEAction::GetComment() const
......
......@@ -17,9 +17,12 @@ public:
/** Test if the action has all data it needs */
virtual bool IsValid() const { return true; }
/** Actions can be turned off or on with various data combinations
* This method will encapsulate that logic in a single function */
virtual bool IsActive() const { return IsValid(); }
virtual bool IsActive() const { return !m_Active ? false : IsValid(); }
virtual void Activate() { m_Active = true; }
virtual void Deactivate() { m_Active = false; }
virtual std::string GetComment() const;
virtual void SetComment(const std::string& comment);
......@@ -28,8 +31,10 @@ public:
virtual void ToString(std::ostream &str)const=0;
protected:
virtual const SEScalar* GetScalar(const std::string& name)=0;
protected:
bool m_Active = true;
std::string m_Comment;
};
......
......@@ -13,11 +13,11 @@
#include "substance/SESubstanceManager.h"
#include "io/protobuf/PBEngine.h"
SEActionManager::SEActionManager(Logger* logger) : Loggable(logger)
SEActionManager::SEActionManager(SESubstanceManager& subMgr) : m_SubMgr(subMgr), Loggable(subMgr.GetLogger())
{
m_PatientActions = new SEPatientActionCollection(logger);
m_EnvironmentActions = new SEEnvironmentActionCollection(logger);
m_EquipmentActions = new SEEquipmentActionCollection(logger);
m_PatientActions = new SEPatientActionCollection(m_SubMgr);
m_EnvironmentActions = new SEEnvironmentActionCollection(m_SubMgr);
m_EquipmentActions = new SEEquipmentActionCollection(m_SubMgr);
}
SEActionManager::~SEActionManager()
......@@ -42,13 +42,13 @@ bool SEActionManager::SerializeToFile(const std::string& filename) const
{
return PBEngine::SerializeToFile(*this, filename);
}
bool SEActionManager::SerializeFromString(const std::string& src, SerializationFormat m, SESubstanceManager& subMgr)
bool SEActionManager::SerializeFromString(const std::string& src, SerializationFormat m)
{
return PBEngine::SerializeFromString(src, *this, m, subMgr);
return PBEngine::SerializeFromString(src, *this, m);
}
bool SEActionManager::SerializeFromFile(const std::string& filename, SESubstanceManager& subMgr)
bool SEActionManager::SerializeFromFile(const std::string& filename)
{
return PBEngine::SerializeFromFile(filename, *this, subMgr);
return PBEngine::SerializeFromFile(filename, *this);
}
// A raw serialize method
......@@ -64,7 +64,7 @@ bool SEActionManager::SerializeFromString(const std::string& src, std::vector<SE
return PBEngine::SerializeFromString(src, dst, m, subMgr);
}
bool SEActionManager::ProcessAction(const SEAction& action, SESubstanceManager& subMgr)
bool SEActionManager::ProcessAction(const SEAction& action)
{
if (!action.IsValid())
{
......@@ -76,15 +76,15 @@ bool SEActionManager::ProcessAction(const SEAction& action, SESubstanceManager&
const SEPatientAction* pa = dynamic_cast<const SEPatientAction*>(&action);
if (pa != nullptr)
bRet = m_PatientActions->ProcessAction(*pa, subMgr);
bRet = m_PatientActions->ProcessAction(*pa);
const SEEnvironmentAction* ea = dynamic_cast<const SEEnvironmentAction*>(&action);
if (ea != nullptr)
bRet = m_EnvironmentActions->ProcessAction(*ea, subMgr);
bRet = m_EnvironmentActions->ProcessAction(*ea);
const SEEquipmentAction* ia = dynamic_cast<const SEEquipmentAction*>(&action);
if (ia != nullptr)
bRet = m_EquipmentActions->ProcessAction(*ia, subMgr);
bRet = m_EquipmentActions->ProcessAction(*ia);
if (!bRet)
{
......@@ -100,3 +100,22 @@ void SEActionManager::GetAllActions(std::vector<const SEAction*>& actions) const
m_EnvironmentActions->GetAllActions(actions);
m_EquipmentActions->GetAllActions(actions);
}
const SEScalar* SEActionManager::GetScalar(const std::string& actionName, const std::string& cmptName, const std::string& substance, const std::string& property)
{
const SEScalar* scalar;
scalar = m_PatientActions->GetScalar(actionName,cmptName, substance,property);
if (scalar != nullptr)
return scalar;
scalar = m_EnvironmentActions->GetScalar(actionName, cmptName, substance, property);
if (scalar != nullptr)
return scalar;
scalar = m_EquipmentActions->GetScalar(actionName, cmptName, substance, property);
if (scalar != nullptr)
return scalar;
return nullptr;
}
......@@ -13,19 +13,21 @@ class CDM_DECL SEActionManager : public Loggable
friend class PBEngine;//friend the serialization class
public:
SEActionManager(Logger* logger=nullptr);
SEActionManager(SESubstanceManager& subMgr);
~SEActionManager();
void Clear();
bool SerializeToString(std::string& output, SerializationFormat m) const;
bool SerializeToFile(const std::string& filename) const;
bool SerializeFromString(const std::string& src, SerializationFormat m, SESubstanceManager& subMgr);
bool SerializeFromFile(const std::string& filename, SESubstanceManager& subMgr);
bool SerializeFromString(const std::string& src, SerializationFormat m);
bool SerializeFromFile(const std::string& filename);
static bool SerializeFromString(const std::string& src, std::vector<SEAction*>& dst, SerializationFormat m, const SESubstanceManager& subMgr);
bool ProcessAction(const SEAction& action, SESubstanceManager&);// Will make a copy
bool ProcessAction(const SEAction& action);// Will make a copy
const SEScalar* GetScalar(const std::string& actionName, const std::string& cmptName, const std::string& substance, const std::string& property);
SEPatientActionCollection& GetPatientActions() { return *m_PatientActions; }
SEEnvironmentActionCollection& GetEnvironmentActions() { return *m_EnvironmentActions; }
......@@ -38,7 +40,7 @@ public:
void GetAllActions(std::vector<const SEAction*>& v) const;
protected:
SESubstanceManager& m_SubMgr;
SEPatientActionCollection* m_PatientActions;
SEEnvironmentActionCollection* m_EnvironmentActions;
SEEquipmentActionCollection* m_EquipmentActions;
......
......@@ -26,13 +26,6 @@ bool SEAdvanceTime::IsValid() const
return HasTime() && m_Time->IsValid();
}
void SEAdvanceTime::ToString(std::ostream &str) const
{
if(HasComment())
str<<"\n\tComment : "<<m_Comment;
str << "\n\tAdvance Time : " << m_Time;
}
bool SEAdvanceTime::HasTime() const
{
return m_Time==nullptr?false:m_Time->IsValid();
......@@ -48,4 +41,18 @@ double SEAdvanceTime::GetTime(const TimeUnit& unit) const
if (m_Time == nullptr)
return SEScalar::dNaN();
return m_Time->GetValue(unit);
}
\ No newline at end of file
}
void SEAdvanceTime::ToString(std::ostream& str) const
{
if (HasComment())
str << "\n\tComment : " << m_Comment;
str << "\n\tAdvance Time : " << m_Time;
}
const SEScalar* SEAdvanceTime::GetScalar(const std::string& name)
{
if (name.compare("Time") == 0)
return &GetTime();
return nullptr;
}
......@@ -16,12 +16,14 @@ public:
virtual bool IsValid() const;
virtual void ToString(std::ostream &str) const;
virtual bool HasTime() const;
virtual SEScalarTime& GetTime();
virtual double GetTime(const TimeUnit& unit) const;
virtual void ToString(std::ostream &str) const;
virtual const SEScalar* GetScalar(const std::string& name);
protected:
SEScalarTime *m_Time;
......
......@@ -39,10 +39,10 @@ public:
protected:
SEScalarTime* m_Period;
SEScalarTime* m_Period;
eSwitch m_PeriodTimeStamps;
eSwitch m_AfterActions;
eSwitch m_ReloadState;
std::string m_Directory;
std::string m_FileName;
std::string m_Directory;
std::string m_FileName;
};
......@@ -7,7 +7,6 @@
#include "patient/conditions/SEAcuteRespiratoryDistressSyndrome.h"
#include "patient/conditions/SEChronicAnemia.h"
#include "patient/conditions/SEChronicObstructivePulmonaryDisease.h"
#include "patient/conditions/SEChronicHeartFailure.h"
#include "patient/conditions/SEChronicPericardialEffusion.h"
#include "patient/conditions/SEChronicRenalStenosis.h"
#include "patient/conditions/SEChronicVentricularSystolicDysfunction.h"
......@@ -138,20 +137,6 @@ bool SEConditionManager::Copy(const SECondition& condition, const SESubstanceMan
return true;
}
const SEChronicHeartFailure* h = dynamic_cast<const SEChronicHeartFailure*>(&condition);
if (h != nullptr)
{
// When we add more of these type, make sure to Clear then all out here
const SEChronicVentricularSystolicDysfunction* vsd = dynamic_cast<const SEChronicVentricularSystolicDysfunction*>(&condition);
if (vsd != nullptr)
{
GetChronicVentricularSystolicDysfunction().Copy(*vsd);
return true;
}
Error("Unknown Heart Failure condition");
return false;
}
const SEChronicPericardialEffusion* pe = dynamic_cast<const SEChronicPericardialEffusion*>(&condition);
if (pe != nullptr)
{
......@@ -166,6 +151,13 @@ bool SEConditionManager::Copy(const SECondition& condition, const SESubstanceMan
return true;
}
const SEChronicVentricularSystolicDysfunction* vsd = dynamic_cast<const SEChronicVentricularSystolicDysfunction*>(&condition);
if (vsd != nullptr)
{
GetChronicVentricularSystolicDysfunction().Copy(*vsd);
return true;
}
const SEConsumeMeal* g = dynamic_cast<const SEConsumeMeal*>(&condition);
if (g != nullptr)
{
......
......@@ -10,6 +10,7 @@ SEDataRequest::SEDataRequest(const SEDataRequest& dr)
{
Set(dr);
m_Category = dr.m_Category;
m_ActionName = dr.m_ActionName;
m_CompartmentName = dr.m_CompartmentName;
m_SubstanceName = dr.m_SubstanceName;
m_PropertyName = dr.m_PropertyName;
......@@ -20,6 +21,7 @@ SEDataRequest::SEDataRequest(const SEDataRequest& dr)
SEDataRequest::SEDataRequest(eDataRequest_Category category, const SEDecimalFormat* dfault) : SEDecimalFormat(dfault)
{
m_Category = category;
m_ActionName = "";
m_CompartmentName = "";
m_SubstanceName = "";
m_PropertyName="";
......@@ -29,6 +31,7 @@ SEDataRequest::SEDataRequest(eDataRequest_Category category, const SEDecimalForm
SEDataRequest::~SEDataRequest()
{
m_ActionName = "";
m_CompartmentName = "";
m_SubstanceName = "";
m_PropertyName = "";
......@@ -38,6 +41,7 @@ SEDataRequest::~SEDataRequest()
void SEDataRequest::Clear()
{
m_ActionName = "";
m_CompartmentName = "";
m_SubstanceName = "";
m_PropertyName="";
......@@ -76,6 +80,12 @@ bool SEDataRequest::IsValid()
std::cout << "Ignoring compartment and substance name on environment data request" << std::endl;
return true;
}
case eDataRequest_Category::Action:
{
if (!HasActionName())
return false;
return true;
}
case eDataRequest_Category::GasCompartment:
case eDataRequest_Category::LiquidCompartment:
case eDataRequest_Category::ThermalCompartment:
......@@ -104,7 +114,24 @@ size_t SEDataRequest::HashCode() const
eDataRequest_Category SEDataRequest::GetCategory() const
{
return m_Category;
return m_Category;
}
std::string SEDataRequest::GetActionName() const
{
return m_ActionName;
}
void SEDataRequest::SetActionName(const std::string& name)
{
m_ActionName = name;
}
bool SEDataRequest::HasActionName() const
{
return m_ActionName.empty() ? false : true;
}
void SEDataRequest::InvalidateActionName()
{
m_ActionName = "";
}
std::string SEDataRequest::GetCompartmentName() const
......
......@@ -8,9 +8,9 @@ class SEDataRequestManager;
#include "engine/SEDecimalFormat.h"
enum class eDataRequest_Category {
Patient = 0, Physiology, Environment, GasCompartment,
LiquidCompartment, ThermalCompartment, TissueCompartment, Substance,
AnesthesiaMachine, ECG, Inhaler, MechanicalVentilator
Patient = 0, Physiology, Environment, Action,
GasCompartment, LiquidCompartment, ThermalCompartment, TissueCompartment,
Substance, AnesthesiaMachine, ECG, Inhaler, MechanicalVentilator
};
extern const std::string& eDataRequest_Category_Name(eDataRequest_Category m);
......@@ -34,6 +34,12 @@ public:
// The Request Category
virtual eDataRequest_Category GetCategory() const;
// OPTIONAL The Action Name holding the property
virtual std::string GetActionName() const;
virtual void SetActionName(const std::string& name);
virtual bool HasActionName() const;
virtual void InvalidateActionName();
// OPTIONAL The Compartment Name holding the property
virtual std::string GetCompartmentName() const;
virtual void SetCompartmentName(const std::string& name);
......@@ -70,6 +76,7 @@ public:
protected:
eDataRequest_Category m_Category;
std::string m_ActionName;
std::string m_CompartmentName;
std::string m_SubstanceName;
std::string m_PropertyName;
......
......@@ -108,6 +108,9 @@ SEDataRequest* SEDataRequestManager::FindDataRequest(const SEDataRequest& dr)
case eDataRequest_Category::Environment:
my_dr = FindEnvironmentDataRequest(dr.GetPropertyName());
return my_dr;
case eDataRequest_Category::Action:
my_dr = FindActionDataRequest(dr.GetActionName(), dr.GetCompartmentName(), dr.GetSubstanceName(), dr.GetPropertyName());
return my_dr;
case eDataRequest_Category::GasCompartment:
if(dr.HasSubstanceName())
my_dr = FindGasCompartmentDataRequest(dr.GetCompartmentName(), dr.GetSubstanceName(), dr.GetPropertyName());
......@@ -245,6 +248,93 @@ SEDataRequest* SEDataRequestManager::FindEnvironmentDataRequest(const std::strin
return nullptr;
}
SEDataRequest& SEDataRequestManager::CreateActionDataRequest(const std::string& actionName, const std::string& property, const SEDecimalFormat* dfault)
{
SEDataRequest* dr = FindActionDataRequest(actionName, "", "", property);
if (dr != nullptr)
return *dr;
dr = new SEDataRequest(eDataRequest_Category::Action, dfault);
m_Requests.push_back(dr);
dr->SetActionName(actionName);
dr->SetPropertyName(property);
return *dr;
}
SEDataRequest& SEDataRequestManager::CreateActionDataRequest(const std::string& actionName, const std::string& property, const CCompoundUnit& unit, const SEDecimalFormat* dfault)
{
SEDataRequest* dr = FindActionDataRequest(actionName, "", "", property);
if (dr != nullptr)
return *dr;
dr = new SEDataRequest(eDataRequest_Category::Action, dfault);
m_Requests.push_back(dr);
dr->SetActionName(actionName);
dr->SetPropertyName(property);
dr->SetUnit(unit);
return *dr;
}
SEDataRequest& SEDataRequestManager::CreateActionCompartmentDataRequest(const std::string& actionName, const std::string& cmptName, const std::string& property, const SEDecimalFormat* dfault)
{
SEDataRequest* dr = FindActionDataRequest(actionName, cmptName, "", property);
if (dr != nullptr)
return *dr;
dr = new SEDataRequest(eDataRequest_Category::Action, dfault);
m_Requests.push_back(dr);
dr->SetActionName(actionName);
dr->SetCompartmentName(cmptName);
dr->SetPropertyName(property);
return *dr;
}
SEDataRequest& SEDataRequestManager::CreateActionCompartmentDataRequest(const std::string& actionName, const std::string& cmptName, const std::string& property, const CCompoundUnit& unit, const SEDecimalFormat* dfault)
{
SEDataRequest* dr = FindActionDataRequest(actionName, cmptName, "", property);
if (dr != nullptr)
return *dr;
dr = new SEDataRequest(eDataRequest_Category::Action, dfault);
m_Requests.push_back(dr);
dr->SetActionName(actionName);
dr->SetCompartmentName(cmptName);
dr->SetPropertyName(property);
dr->SetUnit(unit);
return *dr;
}
SEDataRequest& SEDataRequestManager::CreateActionSubstanceDataRequest(const std::string& actionName, const std::string& substance, const std::string& property, const SEDecimalFormat* dfault)
{
SEDataRequest* dr = FindActionDataRequest(actionName, "", substance, property);
if (dr != nullptr)
return *dr;
dr = new SEDataRequest(eDataRequest_Category::Action, dfault);
m_Requests.push_back(dr);
dr->SetActionName(actionName);
dr->SetSubstanceName(substance);
dr->SetPropertyName(property);
return *dr;
}
SEDataRequest& SEDataRequestManager::CreateActionSubstanceDataRequest(const std::string& actionName, const std::string& substance, const std::string& property, const CCompoundUnit& unit, const SEDecimalFormat* dfault)
{
SEDataRequest* dr = FindActionDataRequest(actionName, "", substance, property);
if (dr != nullptr)
return *dr;
dr = new SEDataRequest(eDataRequest_Category::Action, dfault);
m_Requests.push_back(dr);
dr->SetActionName(actionName);
dr->SetSubstanceName(substance);
dr->SetPropertyName(property);
dr->SetUnit(unit);
return *dr;
}
SEDataRequest* SEDataRequestManager::FindActionDataRequest(const std::string& actionName, const std::string& cmptName, const std::string& substance, const std::string& property)
{
for (SEDataRequest* dr : m_Requests)
{
if (dr->GetCategory() == eDataRequest_Category::Action &&
dr->GetPropertyName() == property &&
dr->GetActionName() == actionName &&
dr->GetCompartmentName() == cmptName &&
dr->GetSubstanceName() == substance)
return dr;
}
return nullptr;
}
SEDataRequest& SEDataRequestManager::CreateGasCompartmentDataRequest(const std::string& cmptName, const std::string& property, const SEDecimalFormat* dfault)
{
SEDataRequest* dr = FindGasCompartmentDataRequest(cmptName, property);
......@@ -305,7 +395,7 @@ SEDataRequest& SEDataRequestManager::CreateGasCompartmentDataRequest(const std::
dr->SetUnit(unit);
return *dr;
}
SEDataRequest* SEDataRequestManager::FindGasCompartmentDataRequest(const std::string& cmptName, const std::string& substance, const std::string property)
SEDataRequest* SEDataRequestManager::FindGasCompartmentDataRequest(const std::string& cmptName, const std::string& substance, const std::string& property)
{
for (SEDataRequest* dr : m_Requests)
{
......@@ -378,7 +468,7 @@ SEDataRequest& SEDataRequestManager::CreateLiquidCompartmentDataRequest(const st
dr->SetUnit(unit);
return *dr;
}
SEDataRequest* SEDataRequestManager::FindLiquidCompartmentDataRequest(const std::string& cmptName, const std::string& substance, const std::string property)
SEDataRequest* SEDataRequestManager::FindLiquidCompartmentDataRequest(const std::string& cmptName, const std::string& substance, const std::string& property)
{
for (SEDataRequest* dr : m_Requests)
{
......
......@@ -51,6 +51,13 @@ public:
SEDataRequest& CreateEnvironmentDataRequest(const std::string& property, const SEDecimalFormat* dfault = nullptr);
SEDataRequest& CreateEnvironmentDataRequest(const std::string& property, const CCompoundUnit& unit, const SEDecimalFormat* dfault = nullptr);
SEDataRequest& CreateActionDataRequest(const std::string& actionName, const std::string& property, const SEDecimalFormat* dfault = nullptr);
SEDataRequest& CreateActionDataRequest(const std::string& actionName, const std::string& property, const CCompoundUnit& unit, const SEDecimalFormat* dfault = nullptr);
SEDataRequest& CreateActionCompartmentDataRequest(const std::string& actionName, const std::string& cmptName, const std::string& property, const SEDecimalFormat* dfault = nullptr);
SEDataRequest& CreateActionCompartmentDataRequest(const std::string& actionName, const std::string& cmptName, const std::string& property, const CCompoundUnit& unit, const SEDecimalFormat* dfault = nullptr);
SEDataRequest& CreateActionSubstanceDataRequest(const std::string& actionName, const std::string& substance, const std::string& property, const SEDecimalFormat* dfault = nullptr);
SEDataRequest& CreateActionSubstanceDataRequest(const std::string& actionName, const std::string& substance, const std::string& property, const CCompoundUnit& unit, const SEDecimalFormat* dfault = nullptr);