GDevelop Core
Core library for developing platforms and tools compatible with GDevelop.
PlatformSpecificAssets.h
1 /*
2  * GDevelop Core
3  * Copyright 2008-2018 Florian Rival ([email protected]). All rights
4  * reserved. This project is released under the MIT License.
5  */
6 
7 #ifndef GDCORE_PLATFORMASSETS_H
8 #define GDCORE_PLATFORMASSETS_H
9 #include <map>
10 #include "GDCore/String.h"
11 namespace gd {
12 class SerializerElement;
13 class ArbitraryResourceWorker;
14 }
15 
16 namespace gd {
17 
26 class GD_CORE_API PlatformSpecificAssets {
27  public:
29  virtual ~PlatformSpecificAssets(){};
30 
34  bool Has(const gd::String& platform, const gd::String& name) const;
35 
39  const gd::String& Get(const gd::String& platform,
40  const gd::String& name) const;
41 
45  void Remove(const gd::String& platform, const gd::String& name);
46 
50  void Set(const gd::String& platform,
51  const gd::String& name,
52  const gd::String& resourceName);
53 
54  void ExposeResources(gd::ArbitraryResourceWorker& worker);
55 
59 
62  void SerializeTo(SerializerElement& element) const;
63 
67  void UnserializeFrom(const SerializerElement& element);
69 
70  private:
71  std::map<gd::String, gd::String> assets;
72 
73  static gd::String badStr;
74 };
75 } // namespace gd
76 
77 #endif // GDCORE_PLATFORMASSETS_H
ArbitraryResourceWorker is used so as to inventory resources and sometimes update them.
Definition: ArbitraryResourceWorker.h:44
Store the icons, splashscreens or reference to any other asset that can be needed when exporting the ...
Definition: PlatformSpecificAssets.h:26
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