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 } // namespace gd
25 
26 namespace gd {
27 
33 class GD_CORE_API ObjectAssetSerializer {
34 public:
45  static void
46  SerializeTo(gd::Project &project, const gd::Object &object,
47  const gd::String &objectFullName, SerializerElement &element,
48  std::vector<gd::String> &usedResourceNames);
49 
51 
52 private:
54 
55  static gd::String GetObjectExtensionName(const gd::Object &object);
56 
57  static void SerializeUsedVariantsTo(
58  gd::Project &project, const gd::Object &object,
59  SerializerElement &variantsElement,
60  std::unordered_set<gd::String> &alreadyUsedVariantIdentifiers);
61 };
62 
63 } // namespace gd
Serialize objects into an asset for the store.
Definition: ObjectAssetSerializer.h:33
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