<
    Kitware and KbPort announce the launch of SimPulse
×
SEScenario.h
1 /* Distributed under the Apache License, Version 2.0.
2  See accompanying NOTICE file for details.*/
3 
4 #pragma once
5 class SEAction;
6 class SECondition;
10 
11 class CDM_DECL SEScenario : public Loggable
12 {
13  friend class PBScenario;//friend the serialization class
14 public:
15 
16  SEScenario(Logger* logger=nullptr, std::string const& dataDir="./");
17  virtual ~SEScenario();
18 
19  virtual void Clear(); //clear memory
20  virtual void Copy(const SEScenario& src);
21 
22  bool SerializeToString(std::string& output, eSerializationFormat m) const;
23  bool SerializeToFile(const std::string& filename) const;
24  bool SerializeFromString(const std::string& src, eSerializationFormat m);
25  bool SerializeFromFile(const std::string& filename);
26 
27  bool IsValid() const;
28 
29  virtual std::string GetName() const;
30  virtual void SetName(const std::string& name);
31  virtual bool HasName() const;
32 
33  virtual std::string GetDescription() const;
34  virtual void SetDescription(const std::string& desc);
35  virtual bool HasDescription() const;
36 
37  virtual std::string GetEngineStateFile() const;
38  virtual void SetEngineStateFile(const std::string& file);
39  virtual bool HasEngineStateFile() const;
40 
41  virtual SEPatientConfiguration& GetPatientConfiguration();
42  virtual const SEPatientConfiguration* GetPatientConfiguration() const;
43  virtual bool HasPatientConfiguration() const;
44 
45  virtual void AddAction(const SEAction& action);
46  virtual const std::vector<SEAction*>& GetActions();
47  virtual const std::vector<const SEAction*>& GetActions() const;
48 
49  virtual SEDataRequestManager& GetDataRequestManager() { return *m_DataRequestMgr; }
50  virtual const SEDataRequestManager& GetDataRequestManager() const { return *m_DataRequestMgr; }
51 
52  virtual SESubstanceManager& GetSubstanceManager() { return *m_SubMgr; }
53  virtual const SESubstanceManager& GetSubstanceManager() const { return *m_SubMgr; }
54 
55 protected:
57  std::string m_Name;
58  std::string m_Description;
59  std::string m_EngineStateFile;
62  std::vector<SEAction*> m_Actions;
63 };
Definition: SESubstanceManager.h:8
SEDataRequestManager * m_DataRequestMgr
Definition: SEScenario.h:61
static bool SerializeFromString(const std::string &src, SEScenario &dst, eSerializationFormat m)
Definition: PBScenario.cpp:83
Definition: Logger.h:66
std::vector< SEAction * > m_Actions
Definition: SEScenario.h:62
Definition: SEAction.h:13
virtual SEDataRequestManager & GetDataRequestManager()
Definition: SEScenario.h:49
SESubstanceManager * m_SubMgr
Definition: SEScenario.h:56
std::string m_EngineStateFile
Definition: SEScenario.h:59
Definition: Logger.h:18
Definition: PBScenario.h:8
Definition: SECondition.h:7
Definition: SEPatientConfiguration.h:11
static bool SerializeToFile(const SEScenario &src, const std::string &filename)
Definition: PBScenario.cpp:77
Definition: SEDataRequestManager.h:9
Definition: SEScenario.h:11
std::string m_Name
Definition: SEScenario.h:57
std::string m_Description
Definition: SEScenario.h:58
static void Copy(const SEScenario &src, SEScenario &dst)
Definition: PBScenario.cpp:63
virtual SESubstanceManager & GetSubstanceManager()
Definition: SEScenario.h:52
static bool SerializeFromFile(const std::string &filename, SEScenario &dst)
Definition: PBScenario.cpp:91
virtual const SEDataRequestManager & GetDataRequestManager() const
Definition: SEScenario.h:50
virtual const SESubstanceManager & GetSubstanceManager() const
Definition: SEScenario.h:53
SEPatientConfiguration * m_PatientConfiguration
Definition: SEScenario.h:60
static bool SerializeToString(const SEScenario &src, std::string &output, eSerializationFormat m)
Definition: PBScenario.cpp:71

Distributed under the Apache License, Version 2.0.

See accompanying NOTICE file for details.