SEConsciousRespiration.h
1/* Distributed under the Apache License, Version 2.0.
2 See accompanying NOTICE file for details.*/
3
4#pragma once
5#include "cdm/patient/actions/SEPatientAction.h"
9class SEForcedPause;
10class SEUseInhaler;
11
13{
14 friend class PBPatientAction;//friend the serialization class
15public:
16
17 SEConsciousRespiration(Logger* logger=nullptr);
19
20 static constexpr char const* Name = "Conscious Respiration";
21 std::string GetName() const override { return Name; }
22
23 void Clear() override;
24 void Copy(const SEConsciousRespiration& src, bool /*preserveState*/=false);
25
26 const SEScalar* GetScalar(const std::string& name) override;
27
28 bool IsValid() const override;
29 bool IsActive() const override;
30 void Deactivate() override;
31
32 virtual bool StartImmediately() const;
33 virtual void SetStartImmediately(bool b);
34
35 // Get the active command
36 virtual bool HasCommands() const;
37 virtual SEConsciousRespirationCommand* GetActiveCommand();
39 virtual void RemoveActiveCommand();
40
41 virtual SEForcedExhale& AddForcedExhale();
42 virtual SEForcedInhale& AddForcedInhale();
43 virtual SEForcedPause& AddForcedPause();
44 virtual SEUseInhaler& AddUseInhaler();
45
46protected:
47
49 std::vector<SEConsciousRespirationCommand*> m_Commands;
50};
Definition: Logger.h:71
Definition: PBPatientActions.h:52
virtual const SEScalar * GetScalar(const std::string &name)=0
static SEAction * Copy(const SEAction &, const SESubstanceManager &)
Definition: SEAction.cpp:53
Definition: SEConsciousRespirationCommand.h:8
Definition: SEConsciousRespiration.h:13
bool m_StartImmediately
Definition: SEConsciousRespiration.h:48
std::vector< SEConsciousRespirationCommand * > m_Commands
Definition: SEConsciousRespiration.h:49
std::string GetName() const override
Definition: SEConsciousRespiration.h:21
Definition: SEForcedExhale.h:8
Definition: SEForcedInhale.h:8
Definition: SEForcedPause.h:8
Definition: SEPatientAction.h:8
void Deactivate() override
Definition: SEPatientAction.h:23
void Clear() override
Definition: SEPatientAction.h:18
bool IsValid() const override
Definition: SEPatientAction.h:19
bool IsActive() const override
Definition: SEPatientAction.h:22
Definition: SEScalar.h:19
Definition: SEUseInhaler.h:9

Distributed under the Apache License, Version 2.0.

See accompanying NOTICE file for details.