<
The Pulse Team is excited to announce the Pulse Physiology Engine 4.1.0 release. Upgrade now to get the best in dynamic simulation.
×
SEAction.h
1 /* Distributed under the Apache License, Version 2.0.
2  See accompanying NOTICE file for details.*/
3 
4 #pragma once
6 
7 enum class eMergeType { Append = 0, Replace };
8 extern const std::string& eMergeType_Name(eMergeType m);
9 
10 enum class eAppliedRespiratoryCycle { Expiratory=0, Inspiratory, Instantaneous };
11 extern const std::string& eAppliedRespiratoryCycle_Name(eAppliedRespiratoryCycle m);
12 
13 class CDM_DECL SEAction : public Loggable
14 {
15  friend class PBAction;//friend the serialization class
16 public:
17 
18  SEAction(Logger* logger);
19  virtual ~SEAction();
20 
21  SEAction(const SEAction&) = delete;
22  SEAction& operator= (const SEAction&) = delete;
23 
24  virtual void Clear();
25  static SEAction* Copy(const SEAction&, const SESubstanceManager&);
26 
28  virtual bool IsValid() const { return true; }
29 
32  virtual bool IsActive() const { return !m_Active ? false : IsValid(); }
33  virtual void Activate() { m_Active = true; }
34  virtual void Deactivate() { m_Active = false; }
35 
36  virtual std::string GetComment() const;
37  virtual void SetComment(const std::string& comment);
38  virtual bool HasComment() const;
39  virtual void InvalidateComment();
40 
41  virtual void ToString(std::ostream &str)const=0;
42 
43  virtual const SEScalar* GetScalar(const std::string& name)=0;
44 
45 protected:
46  bool m_Active = true;
47  std::string m_Comment;
48 };
49 
50 inline std::ostream& operator<< (std::ostream& out, const SEAction& a)
51 {
52  a.ToString(out);
53  return out;
54 }
Definition: SESubstanceManager.h:8
virtual void ToString(std::ostream &str) const =0
Definition: SEScalar.h:18
Definition: Logger.h:66
Definition: PBActions.h:12
Definition: SEAction.h:13
virtual bool IsValid() const
Definition: SEAction.h:28
std::string m_Comment
Definition: SEAction.h:47
Definition: Logger.h:18
virtual void Deactivate()
Definition: SEAction.h:34
virtual bool IsActive() const
Definition: SEAction.h:32
virtual void Activate()
Definition: SEAction.h:33
static SEAction * Copy(const SEAction &a, const SESubstanceManager &subMgr)
Definition: PBActions.cpp:110

Distributed under the Apache License, Version 2.0.

See accompanying NOTICE file for details.