GDevelop Core
Core library for developing platforms and tools compatible with GDevelop.
InstructionsList.h
1 /*
2  * GDevelop Core
3  * Copyright 2015 Victor Levasseur ([email protected])
4  * This project is released under the MIT License.
5  */
6 
7 #ifndef GDCORE_INSTRUCTIONSLIST_H
8 #define GDCORE_INSTRUCTIONSLIST_H
9 #include "GDCore/Tools/SPtrList.h"
10 #include <memory>
11 #include <vector>
12 
13 namespace gd {
14 class Instruction;
15 }
16 namespace gd {
17 class Project;
18 }
19 namespace gd {
20 class SerializerElement;
21 }
22 
23 namespace gd {
24 
25 class InstructionsList : public SPtrList<gd::Instruction> {
26 public:
27  void InsertInstructions(const InstructionsList &list, size_t begin,
28  size_t end, size_t position = (size_t)-1);
29 
30  void RemoveAfter(size_t position);
31 
35 
39  void SerializeTo(gd::SerializerElement &element) const;
40 
45  void UnserializeFrom(gd::Project &project,
46  const gd::SerializerElement &element);
48 };
49 
50 } // namespace gd
51 
52 #endif
Definition: InstructionsList.h:25
void UnserializeFrom(gd::Project &project, const gd::SerializerElement &element)
Load the instructions from the specified element.
Definition: InstructionsList.cpp:43
void SerializeTo(gd::SerializerElement &element) const
Serialize the instructions to the specified element.
Definition: InstructionsList.cpp:39
Base class representing a project (game), including all resources, scenes, objects,...
Definition: Project.h:51
Definition: SPtrList.h:18
A generic container that can represent a value ( containing a string, double, bool or int),...
Definition: SerializerElement.h:37
Definition: CommonTools.h:24