GDevelop Core
Core library for developing platforms and tools compatible with GDevelop.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Public Member Functions | Protected Attributes | List of all members

Class used to track all resources used by a game, or a part of it (like a gd::Object). More...

#include <ResourcesInUseHelper.h>

Inherits gd::ArbitraryResourceWorker.

Public Member Functions

std::set< gd::String > & GetAllImages ()
 
std::set< gd::String > & GetAllFonts ()
 
std::set< gd::String > & GetAllAudios ()
 
std::set< gd::String > & GetAll (const gd::String &resourceType)
 
virtual void ExposeFile (gd::String &resource) override
 Expose a raw filename.
 
virtual void ExposeImage (gd::String &imageResourceName) override
 Expose an image, which is always a reference to a "image" resource.
 
virtual void ExposeAudio (gd::String &audioResourceName) override
 Expose an audio, which is either a reference to an "audio" resource, or a filename if no resource with this name exists.
 
virtual void ExposeFont (gd::String &fontResourceName) override
 Expose a font, which is either a reference to a "font" resource, or a filename if no resource with this name exists.
 
- Public Member Functions inherited from gd::ArbitraryResourceWorker
void ExposeResources (gd::ResourcesManager *resourcesManager)
 Expose a set of resources. More...
 
virtual void ExposeShader (gd::String &shaderName)
 Expose a shader. Currently unsupported.
 

Protected Attributes

std::set< gd::StringallImages
 
std::set< gd::StringallAudios
 
std::set< gd::StringallFonts
 
std::set< gd::StringemptyResources
 

Additional Inherited Members

- Protected Member Functions inherited from gd::ArbitraryResourceWorker
const std::vector
< gd::ResourcesManager * > & 
GetResources ()
 

Detailed Description

Class used to track all resources used by a game, or a part of it (like a gd::Object).

Usage example:

gd::ResourcesInUseHelper resourcesInUse;
project.ExposeResources(resourcesInUse);
//Get a set with the name of all images in the project:
std::set<gd::String> & usedImages = resourcesInUse.GetAllImages();

The documentation for this class was generated from the following file: