SESerializeState.h
1 /* Distributed under the Apache License, Version 2.0.
2  See accompanying NOTICE file for details.*/
3 
4 #pragma once
5 #include "engine/SEAction.h"
6 
7 // Keep enums in sync with appropriate schema/cdm/ActionEnums.proto file !!
8 enum class eSerialization_Type { Save = 0, Load };
9 extern const std::string& eSerialization_Type_Name(eSerialization_Type m);
10 
11 class CDM_DECL SESerializeState : public SEAction
12 {
13  friend class PBAction;//friend the serialization class
14 public:
15 
17  virtual ~SESerializeState();
18 
19  virtual void Clear(); //clear memory
20 
21  virtual bool IsValid() const;
22 
23  virtual void ToString(std::ostream &str) const;
24 
25  virtual eSerialization_Type GetType() const;
26  virtual void SetType(eSerialization_Type t);
27 
28  virtual bool HasFilename() const;
29  virtual std::string GetFilename() const;
30  virtual void SetFilename(const std::string& filename);
31  virtual void InvalidateFilename();
32 
33 protected:
34 
35  std::string m_Filename;
36  eSerialization_Type m_Type;
37 };
Definition: PBActions.h:11
Definition: SEAction.h:7
eSerialization_Type m_Type
Definition: SESerializeState.h:36
std::string m_Filename
Definition: SESerializeState.h:35
Definition: SESerializeState.h:11