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 SEScalarTime& GetRestingStabilizationTime();
28  virtual double GetRestingStabilizationTime(const TimeUnit& unit) const;
29 
30  virtual bool HasFeedbackStabilizationTime() const;
31  virtual SEScalarTime& GetFeedbackStabilizationTime();
32  virtual double GetFeedbackStabilizationTime(const TimeUnit& unit) const;
33 
34  virtual bool HasConditionTime(const std::string& name) const;
35  virtual void RemoveConditionTime(const std::string& name);
36  virtual const std::map<std::string,SEScalarTime*>& GetConditionTimes() const;
37  virtual SEScalarTime& GetConditionTime(const std::string& name);
38  virtual const SEScalarTime* GetConditionTime(const std::string& name) const;
39 
40 protected:
41 
42  virtual bool Stabilize(PhysiologyEngine& engine, const SEScalarTime& time);
43 
46  std::map<std::string,SEScalarTime*> m_ConditionTimes;
47 };
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:46
Definition: SEScalarTime.h:7
Definition: SEConditionManager.h:20
Definition: PBEngine.h:24
Definition: SEEngineStabilization.h:11
virtual bool StabilizeConditions(PhysiologyEngine &engine, const SEConditionManager &conditions)=0
Definition: PhysiologyEngine.h:52
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:45
Definition: SETimedStabilization.h:7
Definition: SEScalarTime.h:23
virtual bool StabilizeRestingState(PhysiologyEngine &engine)=0
SEScalarTime * m_RestingStabilizationTime
Definition: SETimedStabilization.h:44