SEConsumeNutrients.h
1/* Distributed under the Apache License, Version 2.0.
2 See accompanying NOTICE file for details.*/
3
4#pragma once
5
6#include "cdm/patient/actions/SEPatientAction.h"
7#include "cdm/patient/SENutrition.h"
8
9class CDM_DECL SEConsumeNutrients : public SEPatientAction
10{
11 friend class PBPatientAction;//friend the serialization class
12public:
13
14 SEConsumeNutrients(Logger* logger=nullptr);
15 virtual ~SEConsumeNutrients();
16
17 static constexpr char const* Name = "Consume Nutrients";
18 std::string GetName() const override { return Name; }
19
20 void Clear() override;
21 void Copy(const SEConsumeNutrients& src, bool /*preserveState*/=false);
22
23 const SEScalar* GetScalar(const std::string& name) override;
24
25 bool IsValid() const override;
26 bool IsActive() const override;
27 void Deactivate() override;
28
29 bool HasNutrition() const;
30 SENutrition& GetNutrition();
31 const SENutrition* GetNutrition() const;
32
33 virtual std::string GetNutritionFile() const;
34 virtual void SetNutritionFile(const std::string& fileName);
35 virtual bool HasNutritionFile() const;
36
37protected:
39 std::string m_NutritionFile;
40};
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: SEConsumeNutrients.h:10
SENutrition * m_Nutrition
Definition: SEConsumeNutrients.h:38
std::string m_NutritionFile
Definition: SEConsumeNutrients.h:39
std::string GetName() const override
Definition: SEConsumeNutrients.h:18
Definition: SENutrition.h:7
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

Distributed under the Apache License, Version 2.0.

See accompanying NOTICE file for details.