SESerializeState.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 <string>
15 
16 #include <biogears/cdm/scenario/SEAction.h>
17 #include <biogears/schema/cdm/Scenario.hxx>
18 
19 namespace biogears {
20 class BIOGEARS_API SESerializeState : public SEAction {
21 public:
23  virtual ~SESerializeState() override;
24 
25  static constexpr const char* TypeTag() { return "SESerializeState"; };
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::SerializeStateData& in);
33  virtual CDM::SerializeStateData* Unload() const override;
34 
35 protected:
36  virtual void Unload(CDM::SerializeStateData& data) const;
37 
38 public:
39  virtual void ToString(std::ostream& str) const override;
40 
41  virtual CDM::enumSerializationType::value GetType() const;
42  virtual void SetType(CDM::enumSerializationType::value t);
43  virtual bool HasType() const;
44  virtual void InvalidateType();
45 
46  virtual bool HasFilename() const;
47  virtual std::string GetFilename() const;
48  virtual const char* GetFilename_cStr() const;
49  virtual void SetFilename(const char* filename);
50  virtual void SetFilename(const std::string& filename);
51  virtual void InvalidateFilename();
52 
53 protected:
54  std::string m_Filename;
56 };
57 }
Definition: SEAction.h:22
Definition: SESerializeState.h:20
CDM::enumSerializationType::value m_Type
Definition: SESerializeState.h:55
std::string m_Filename
Definition: SESerializeState.h:54
static constexpr const char * TypeTag()
Definition: SESerializeState.h:25
value
Underlying enum type.
Definition: Scenario.hxx:5213
Definition: SEElectricalCircuit.h:18
const char * classname() const override
Definition: SESerializeState.h:26
Class corresponding to the SerializeStateData schema type.
Definition: Scenario.hxx:5360