SEPatientConfiguration.h
1 /* Distributed under the Apache License, Version 2.0.
2  See accompanying NOTICE file for details.*/
3 
4 #pragma once
6 class SEPatient;
9 
10 class CDM_DECL SEPatientConfiguration : public Loggable
11 {
12  friend class PBEngine;//friend the serialization class
13 public:
15  virtual ~SEPatientConfiguration();
16  virtual void Clear(); //clear memory
17 
18  bool SerializeToString(std::string& output, SerializationFormat m) const;
19  bool SerializeToFile(const std::string& filename, SerializationFormat m) const;
20  bool SerializeFromString(const std::string& src, SerializationFormat m);
21  bool SerializeFromFile(const std::string& filename, SerializationFormat m);
22 
23  virtual bool IsValid()const;
24 
25  virtual std::string GetPatientFile() const;
26  virtual void SetPatientFile(const std::string& patientFile);
27  virtual bool HasPatientFile() const;
28  virtual void InvalidatePatientFile();
29 
30  virtual SEPatient& GetPatient();
31  virtual const SEPatient* GetPatient() const;
32  virtual bool HasPatient() const;
33  virtual void InvalidatePatient();
34 
35  virtual SEConditionManager& GetConditions();
36  virtual const SEConditionManager* GetConditions() const;
37  virtual bool HasConditions() const;
38  virtual void InvalidateConditions();
39 
40 protected:
42  std::string m_PatientFile;
45 };
Definition: SESubstanceManager.h:8
Definition: SEPatient.h:61
Definition: SEEngineConfiguration.h:7
static bool SerializeToString(const SEPatientConfiguration &src, std::string &output, SerializationFormat m)
Definition: PBEngine.cpp:301
static bool SerializeToFile(const SEPatientConfiguration &src, const std::string &filename, SerializationFormat m)
Definition: PBEngine.cpp:307
std::string m_PatientFile
Definition: SEPatientConfiguration.h:42
static bool SerializeFromFile(const std::string &filename, SEPatientConfiguration &dst, SerializationFormat m, SESubstanceManager &subMgr)
Definition: PBEngine.cpp:323
Definition: Logger.h:11
Definition: SEConditionManager.h:20
Definition: PBEngine.h:24
Definition: SEPatientConfiguration.h:10
static bool SerializeFromString(const std::string &src, SEPatientConfiguration &dst, SerializationFormat m, SESubstanceManager &subMgr)
Definition: PBEngine.cpp:315
SESubstanceManager & m_SubMgr
Definition: SEPatientConfiguration.h:44
SEConditionManager * m_Conditions
Definition: SEPatientConfiguration.h:43
SEPatient * m_Patient
Definition: SEPatientConfiguration.h:41