SEBrainInjury.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"
6
7// Keep enums in sync with appropriate schema/cdm/PatientActionEnums.proto file !!
8enum class eBrainInjury_Type { Diffuse = 0, LeftFocal, RightFocal };
9extern CDM_DECL const std::string& eBrainInjury_Type_Name(eBrainInjury_Type m);
10
11class CDM_DECL SEBrainInjury : public SEPatientAction
12{
13 friend class PBPatientAction;//friend the serialization class
14public:
15
16 SEBrainInjury(Logger* logger=nullptr);
17 virtual ~SEBrainInjury();
18
19 static constexpr char const* Name = "Brain Injury";
20 std::string GetName() const override { return Name; }
21
22 void Clear() override;
23 void Copy(const SEBrainInjury& src, bool /*preserveState*/=false);
24
25 const SEScalar* GetScalar(const std::string& name) override;
26
27 bool IsValid() const override;
28 bool IsActive() const override;
29 void Deactivate() override;
30
31 virtual bool HasSeverity() const;
32 virtual SEScalar0To1& GetSeverity();
33 virtual double GetSeverity() const;
34
35 virtual eBrainInjury_Type GetType() const;
36 virtual void SetType(eBrainInjury_Type t);
37
38protected:
40 eBrainInjury_Type m_Type;
41};
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: SEBrainInjury.h:12
eBrainInjury_Type m_Type
Definition: SEBrainInjury.h:40
SEScalar0To1 * m_Severity
Definition: SEBrainInjury.h:39
std::string GetName() const override
Definition: SEBrainInjury.h:20
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: SEScalar0To1.h:8
Definition: SEScalar.h:19

Distributed under the Apache License, Version 2.0.

See accompanying NOTICE file for details.