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

Distributed under the Apache License, Version 2.0.

See accompanying NOTICE file for details.