SEAdvanceTime.h
1 /**************************************************************************************
2 Copyright 2015 Applied Research Associates, Inc.
3 Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4 this file except in compliance with the License. You may obtain a copy of the License
5 at:
6 http://www.apache.org/licenses/LICENSE-2.0
7 Unless required by applicable law or agreed to in writing, software distributed under
8 the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
9 CONDITIONS OF ANY KIND, either express or implied. See the License for the
10 specific language governing permissions and limitations under the License.
11 **************************************************************************************/
12 
13 #pragma once
14 #include <biogears/cdm/scenario/SEAction.h>
15 #include <biogears/schema/cdm/Scenario.hxx>
16 
17 namespace biogears {
18 class TimeUnit;
19 
20 class BIOGEARS_API SEAdvanceTime : public SEAction {
21 public:
22  SEAdvanceTime();
23  virtual ~SEAdvanceTime() override;
24 
25  static constexpr const char* TypeTag() { return "SEAdvanceTime"; };
26  const char* classname() const override { return TypeTag(); }
27 
28  virtual void Clear() override; //clear memory
29 
30  virtual bool IsValid() const override;
31 
32  virtual bool Load(const CDM::AdvanceTimeData& in);
33  virtual CDM::AdvanceTimeData* Unload() const;
34 
35 protected:
36  virtual void Unload(CDM::AdvanceTimeData& data) const;
37 
38 public:
39  virtual void ToString(std::ostream& str) const override;
40 
41  virtual bool HasTime() const;
42  virtual SEScalarTime& GetTime();
43  virtual double GetTime(const TimeUnit& unit) const;
44 
45 protected:
47 };
48 }
Definition: SEAdvanceTime.h:20
Definition: SEAction.h:22
SEScalarTime * m_Time
Definition: SEAdvanceTime.h:46
const char * classname() const override
Definition: SEAdvanceTime.h:26
Definition: SEScalarTime.h:37
Definition: SEScalarTime.h:18
static constexpr const char * TypeTag()
Definition: SEAdvanceTime.h:25
Class corresponding to the AdvanceTimeData schema type.
Definition: Scenario.hxx:5037
Definition: SEElectricalCircuit.h:18