SEDataRequest.h
1/* Distributed under the Apache License, Version 2.0.
2 See accompanying NOTICE file for details.*/
3
4#pragma once
6class CCompoundUnit;
8#include "cdm/engine/SEDecimalFormat.h"
9
10enum class eDataRequest_Category {
11 Patient = 0, Physiology, Environment, Action,
12 GasCompartment, LiquidCompartment, ThermalCompartment, TissueCompartment,
13 Substance, AnesthesiaMachine, BagValveMask, ECG, ECMO, Inhaler, MechanicalVentilator
14};
15extern CDM_DECL const std::string& eDataRequest_Category_Name(eDataRequest_Category m);
16
17class CDM_DECL SEDataRequest : public SEDecimalFormat
18{
19 friend class PBEngine;//friend the serialization class
20 friend class SEEngineTracker;
21 friend class SEDataRequestScalar;
23protected:
25 SEDataRequest(eDataRequest_Category category, const SEDecimalFormat* dfault = nullptr);
26public:
27
28 virtual ~SEDataRequest();
29
30 void Clear() override; //clear memory
31 virtual bool IsValid();
32 virtual void Copy(const SEDataRequest& src);
33
34 virtual size_t HashCode() const;
35
36 // The Request Category
37 virtual eDataRequest_Category GetCategory() const;
38
39 // OPTIONAL The Action Name holding the property
40protected:
41 virtual void SetActionName(const std::string& name);
42 virtual void InvalidateActionName();
43public:
44 virtual std::string GetActionName() const;
45 virtual bool HasActionName() const;
46
47 // OPTIONAL The Compartment Name holding the property
48protected:
49 virtual void SetCompartmentName(const std::string& name);
50 virtual void InvalidateCompartmentName();
51public:
52 virtual std::string GetCompartmentName() const;
53 virtual bool HasCompartmentName() const;
54
55 // OPTIONAL The Substance Name holding the property
56protected:
57 virtual void SetSubstanceName(const std::string& name);
58 virtual void InvalidateSubstanceName();
59public:
60 virtual std::string GetSubstanceName() const;
61 virtual bool HasSubstanceName() const;
62
63 // The System Property Name
64protected:
65 virtual void SetPropertyName(const std::string& name);
66 virtual void InvalidatePropertyName();
67public:
68 virtual std::string GetPropertyName() const;
69 virtual bool HasPropertyName() const;
70
71 // The Requested Unit String
72protected:
73 virtual void SetRequestedUnit(const std::string& unit);
74 virtual void InvalidateRequestedUnit();
75public:
76 virtual std::string GetRequestedUnit() const;
77 virtual bool HasRequestedUnit() const;
78
79 // The Unit that data will be retrieved in
80 // If the Requested unit is present, this should be set to that unit
81 // I cannot do this automatically, since I don't know what the quantity of the property is, so some other logic needs to complete this logic
82 // If the Requested unit is NOT present, this should be set to whatever the unit of the System Property is set as
83protected:
84 virtual void SetUnit(const CCompoundUnit& unit);
85 virtual void InvalidateUnit();
86public:
87 virtual const CCompoundUnit* GetUnit() const;
88 virtual bool HasUnit() const;
89
90 virtual std::string ToString() const;
91 virtual std::string GetHeaderName() const;
92
93protected:
94
95 eDataRequest_Category m_Category;
96 std::string m_ActionName;
97 std::string m_CompartmentName;
98 std::string m_SubstanceName;
99 std::string m_PropertyName;
100 std::string m_RequestedUnit;
102 mutable std::string m_Header;
103};
Definition: CompoundUnit.h:40
Definition: PBEngine.h:31
Definition: SEDataRequest.h:18
std::string m_ActionName
Definition: SEDataRequest.h:96
std::string m_PropertyName
Definition: SEDataRequest.h:99
eDataRequest_Category m_Category
Definition: SEDataRequest.h:95
std::string m_SubstanceName
Definition: SEDataRequest.h:98
std::string m_Header
Definition: SEDataRequest.h:102
std::string m_CompartmentName
Definition: SEDataRequest.h:97
const CCompoundUnit * m_Unit
Definition: SEDataRequest.h:101
std::string m_RequestedUnit
Definition: SEDataRequest.h:100
Definition: SEDataRequestManager.h:10
void Copy(const SEDataRequestManager &src)
Definition: SEDataRequestManager.cpp:33
Definition: SEEngineTracker.h:34
Definition: SEDecimalFormat.h:10
virtual void Clear()
Definition: SEDecimalFormat.cpp:21
Definition: SEEngineTracker.h:66
Definition: SESubstanceManager.h:9

Distributed under the Apache License, Version 2.0.

See accompanying NOTICE file for details.