SETimedStabilization.h
1 /* Distributed under the Apache License, Version 2.0.
2  See accompanying NOTICE file for details.*/
3 
4 #pragma once
5 #include "engine/SEEngineStabilization.h"
6 
8 {
9  friend class PBEngine;//friend the serialization class
10 public:
12  virtual ~SETimedStabilization();
13 
14  virtual void Clear();
15 
16 public:
17 
18  bool SerializeToString(std::string& output, SerializationFormat m) const;
19  bool SerializeToFile(const std::string& filename, SerializationFormat m) const;
20  bool SerializeFromString(const std::string& src, SerializationFormat m);
21  bool SerializeFromFile(const std::string& filename, SerializationFormat m);
22 
23  virtual bool StabilizeRestingState(PhysiologyEngine& engine);
24  virtual bool StabilizeFeedbackState(PhysiologyEngine& engine);
25  virtual bool StabilizeConditions(PhysiologyEngine& engine, const SEConditionManager& conditions);
26 
27  virtual bool HasRestingStabilizationTime() const;
28  virtual SEScalarTime& GetRestingStabilizationTime();
29  virtual double GetRestingStabilizationTime(const TimeUnit& unit) const;
30 
31  virtual bool HasFeedbackStabilizationTime() const;
32  virtual SEScalarTime& GetFeedbackStabilizationTime();
33  virtual double GetFeedbackStabilizationTime(const TimeUnit& unit) const;
34 
35  virtual bool HasConditionTime(const std::string& name) const;
36  virtual void RemoveConditionTime(const std::string& name);
37  virtual const std::map<std::string,SEScalarTime*>& GetConditionTimes() const;
38  virtual SEScalarTime& GetConditionTime(const std::string& name);
39  virtual const SEScalarTime* GetConditionTime(const std::string& name) const;
40 
41 protected:
42 
43  virtual bool Stabilize(PhysiologyEngine& engine, const SEScalarTime& time);
44 
47  std::map<std::string,SEScalarTime*> m_ConditionTimes;
48 };
virtual bool SerializeFromString(const std::string &src, SerializationFormat)=0
virtual bool SerializeToString(std::string &output, SerializationFormat) const =0
Definition: Logger.h:61
virtual bool SerializeFromFile(const std::string &filename, SerializationFormat)=0
std::map< std::string, SEScalarTime * > m_ConditionTimes
Definition: SETimedStabilization.h:47
Definition: SEScalarTime.h:7
Definition: SEConditionManager.h:23
Definition: PBEngine.h:26
Definition: SEEngineStabilization.h:11
virtual bool StabilizeConditions(PhysiologyEngine &engine, const SEConditionManager &conditions)=0
Definition: PhysiologyEngine.h:51
virtual void Clear()
Definition: SEEngineStabilization.cpp:20
virtual bool SerializeToFile(const std::string &filename, SerializationFormat) const =0
virtual bool StabilizeFeedbackState(PhysiologyEngine &engine)=0
SEScalarTime * m_FeedbackStabilizationTime
Definition: SETimedStabilization.h:46
Definition: SETimedStabilization.h:7
Definition: SEScalarTime.h:23
virtual bool StabilizeRestingState(PhysiologyEngine &engine)=0
SEScalarTime * m_RestingStabilizationTime
Definition: SETimedStabilization.h:45

Distributed under the Apache License, Version 2.0.

See accompanying NOTICE file for details.