SEDataRequest.h
1 /* Distributed under the Apache License, Version 2.0.
2  See accompanying NOTICE file for details.*/
3 
4 #pragma once
6 class CCompoundUnit;
8 #include "engine/SEDecimalFormat.h"
9 
10 enum class eDataRequest_Category {
11  Patient = 0, Physiology, Environment, GasCompartment,
12  LiquidCompartment, ThermalCompartment, TissueCompartment, Substance,
14 };
15 extern const std::string& eDataRequest_Category_Name(eDataRequest_Category m);
16 
17 class CDM_DECL SEDataRequest : public SEDecimalFormat
18 {
19  friend class PBEngine;//friend the serialization class
20  friend class SEDataRequestManager;
21 protected:
22  SEDataRequest(const SEDataRequest& dr);
23  SEDataRequest(eDataRequest_Category category, const SEDecimalFormat* dfault = nullptr);
24 public:
25 
26  virtual ~SEDataRequest();
27 
28  virtual void Clear(); //clear memory
29  virtual bool IsValid();
30  virtual void Copy(const SEDataRequest& src);
31 
32  virtual size_t HashCode() const;
33 
34  // The Request Category
35  virtual eDataRequest_Category GetCategory() const;
36 
37  // OPTIONAL The Compartment Name holding the property
38  virtual std::string GetCompartmentName() const;
39  virtual void SetCompartmentName(const std::string& name);
40  virtual bool HasCompartmentName() const;
41  virtual void InvalidateCompartmentName();
42 
43  // OPTIONAL The Substance Name holding the property
44  virtual std::string GetSubstanceName() const;
45  virtual void SetSubstanceName(const std::string& name);
46  virtual bool HasSubstanceName() const;
47  virtual void InvalidateSubstanceName();
48 
49  // The System Property Name
50  virtual std::string GetPropertyName() const;
51  virtual void SetPropertyName(const std::string& name);
52  virtual bool HasPropertyName() const;
53  virtual void InvalidatePropertyName();
54 
55  // The Requested Unit String
56  virtual std::string GetRequestedUnit() const;
57  virtual void SetRequestedUnit(const std::string& unit);
58  virtual bool HasRequestedUnit() const;
59  virtual void InvalidateRequestedUnit();
60 
61  // The Unit that data will be retrieved in
62  // If the Requested unit is present, this should be set to that unit
63  // 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
64  // If the Requested unit is NOT present, this should be set to whatever the unit of the System Property is set as
65  virtual const CCompoundUnit* GetUnit() const;
66  virtual void SetUnit(const CCompoundUnit& unit);
67  virtual bool HasUnit() const;
68  virtual void InvalidateUnit();
69 
70 protected:
71 
72  eDataRequest_Category m_Category;
73  std::string m_CompartmentName;
74  std::string m_SubstanceName;
75  std::string m_PropertyName;
76  std::string m_RequestedUnit;
78 };
Definition: SESubstanceManager.h:8
std::string m_SubstanceName
Definition: SEDataRequest.h:74
std::string m_PropertyName
Definition: SEDataRequest.h:75
std::string m_CompartmentName
Definition: SEDataRequest.h:73
Generic inhaler for substance administration.
Definition: Inhaler.h:15
Generic ECG machine to assess the heart rhythm.
Definition: ECG.h:13
The Environment class characterizes the environment and manages interactions between the body its sur...
Definition: Environment.h:17
Definition: PBEngine.h:24
Definition: SEDecimalFormat.h:9
const CCompoundUnit * m_Unit
Definition: SEDataRequest.h:77
Definition: SEDataRequestManager.h:9
eDataRequest_Category m_Category
Definition: SEDataRequest.h:72
void Clear()
Definition: SEDataRequestManager.cpp:22
Generic anesthesia machine for positive pressure ventilation.
Definition: AnesthesiaMachine.h:17
void Copy(const SEDataRequestManager &src, const SESubstanceManager &subMgr)
Definition: SEDataRequestManager.cpp:30
Definition: SEDataRequest.h:17
Definition: CompoundUnit.h:39
std::string m_RequestedUnit
Definition: SEDataRequest.h:76