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 | List of all members
gd::ResourcesManager Class Reference

Inventory all resources used by a project. More...

#include <ResourcesManager.h>

Public Member Functions

 ResourcesManager (const ResourcesManager &)
ResourcesManageroperator= (const ResourcesManager &rhs)
bool HasResource (const gd::String &name) const
 Return true if a resource exists.
ResourceGetResource (const gd::String &name)
 Return a reference to a resource.
const ResourceGetResource (const gd::String &name) const
 Return a reference to a resource.
std::shared_ptr< ResourceCreateResource (const gd::String &kind)
 Create a new resource but does not add it to the list.
std::vector< gd::StringGetAllResourceNames () const
 Get a list containing the names of all resources.
std::shared_ptr< gd::ResourceGetResourceSPtr (const gd::String &name)
 Return a (smart) pointer to a resource.
bool AddResource (const gd::Resource &resource)
 Add an already constructed resource. More...
bool AddResource (const gd::String &name, const gd::String &filename, const gd::String &kind)
 Add a resource created from a file.
void RemoveResource (const gd::String &name)
 Remove a resource.
void RenameResource (const gd::String &oldName, const gd::String &newName)
 Rename a resource.
std::size_t GetResourcePosition (const gd::String &name) const
 Return the position of the layer called "name" in the layers list.
bool MoveResourceUpInList (const gd::String &name)
 Move a resource up in the list.
bool MoveResourceDownInList (const gd::String &name)
 Move a resource down in the list.
void MoveResource (std::size_t oldIndex, std::size_t newIndex)
 Change the position of the specified resource.
bool HasFolder (const gd::String &name) const
 Return true if the folder exists.
const ResourceFolderGetFolder (const gd::String &name) const
 Return a reference to a folder.
ResourceFolderGetFolder (const gd::String &name)
 Return a reference to a folder.
void RemoveFolder (const gd::String &name)
 Remove a folder.
void CreateFolder (const gd::String &name)
 Create a new empty folder.
bool MoveFolderUpInList (const gd::String &name)
 Move a folder up in the list.
bool MoveFolderDownInList (const gd::String &name)
 Move a folder down in the list.
std::vector< gd::StringGetAllFolderList ()
 Get a list containing the name of all of the folders.
void SerializeTo (SerializerElement &element) const
 Serialize the object.
void UnserializeFrom (const SerializerElement &element)
 Unserialize the objectt.

Detailed Description

Inventory all resources used by a project.

See also

Member Function Documentation

bool gd::ResourcesManager::AddResource ( const gd::Resource resource)

Add an already constructed resource.

A copy of the resource is made and stored inside the ResourcesManager.

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