GDevelop Core
Core library for developing platforms and tools compatible with GDevelop.
ObjectAssetSerializer.h
1 /*
2  * GDevelop Core
3  * Copyright 2008-2023 Florian Rival ([email protected]). All rights
4  * reserved. This project is released under the MIT License.
5  */
6 #pragma once
7 #include <map>
8 #include <vector>
9 #include <unordered_set>
10 
11 #include "GDCore/String.h"
12 
13 namespace gd {
14 class Object;
15 class ExtensionDependency;
16 class PropertyDescriptor;
17 class Project;
18 class Layout;
19 class ArbitraryResourceWorker;
20 class InitialInstance;
21 class SerializerElement;
22 class EffectsContainer;
23 class AbstractFileSystem;
24 class EventsBasedObjectVariant;
25 } // namespace gd
26 
27 namespace gd {
28 
34 class GD_CORE_API ObjectAssetSerializer {
35 public:
46  static void
47  SerializeTo(gd::Project &project, const gd::Object &object,
48  const gd::String &objectFullName, SerializerElement &element,
49  std::vector<gd::String> &usedResourceNames);
50 
52 
53 private:
55 
56  static gd::String GetObjectExtensionName(const gd::Object &object);
57 
58  static void SerializeUsedVariantsTo(
59  gd::Project &project, const gd::Object &object,
60  SerializerElement &variantsElement,
61  std::unordered_set<gd::String> &alreadyUsedVariantIdentifiers);
62 
63  static const gd::EventsBasedObjectVariant* GetVariant(gd::Project &project, const gd::Object &object);
64 };
65 
66 } // namespace gd
Represents a variation of style of an events-based object.
Definition: EventsBasedObjectVariant.h:25
Serialize objects into an asset for the store.
Definition: ObjectAssetSerializer.h:34
Represent an object of a platform.
Definition: Object.h:37
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
String represents an UTF8 encoded string.
Definition: String.h:33
Definition: CommonTools.h:24