GDevelop Core
Core library for developing platforms and tools compatible with GDevelop.
Serialization.h
1 /*
2  * GDevelop Core
3  * Copyright 2008-2016 Florian Rival ([email protected]). All rights
4  * reserved. This project is released under the MIT License.
5  */
6 #ifndef GDCORE_EVENTS_SERIALIZATION_H
7 #define GDCORE_EVENTS_SERIALIZATION_H
8 #include <vector>
9 #include "GDCore/Serialization/Serializer.h"
10 namespace gd {
11 class InstructionsList;
12 }
13 namespace gd {
14 class Project;
15 }
16 namespace gd {
17 class EventsList;
18 }
19 
20 namespace gd {
21 
25 class GD_CORE_API EventsListSerialization {
26  public:
33  static void UnserializeEventsFrom(gd::Project& project,
34  gd::EventsList& list,
35  const SerializerElement& events);
36 
42  static void SerializeEventsTo(const gd::EventsList& list,
43  SerializerElement& events);
44 
48  static void UnserializeInstructionsFrom(gd::Project& project,
50  const SerializerElement& elem);
51 
55  static void SerializeInstructionsTo(const gd::InstructionsList& list,
56  SerializerElement& elem);
57 
58  private:
64  static void UpdateInstructionsFromGD2x(gd::Project& project,
66  bool instructionsAreActions);
67 
73  static void UpdateInstructionsFromGD31x(gd::Project& project,
74  gd::InstructionsList& list);
75 
83  static void UpdateInstructionsFromGD4097(gd::Project& project,
84  gd::InstructionsList& list);
85 };
86 
87 } // namespace gd
88 
89 #endif // GDCORE_EVENTS_SERIALIZATION_H
A list of events.
Definition: EventsList.h:33
Contains tools for loading and saving events to SerializerElement.
Definition: Serialization.h:25
Definition: InstructionsList.h:25
Base class representing a project (game), including all resources, scenes, objects,...
Definition: Project.h:50
A generic container that can represent a value ( containing a string, double, bool or int),...
Definition: SerializerElement.h:37
Definition: CommonTools.h:24