GDevelop Core
Core library for developing platforms and tools compatible with GDevelop.
Public Member Functions | Static Public Member Functions | List of all members
gd::PlatformManager Class Reference

Singleton class managing all the platforms available. More...

#include <PlatformManager.h>

Public Member Functions

bool AddPlatform (std::shared_ptr< gd::Platform > newPlatform)
 Add a new platform to be used by the IDE.
 
gd::PlatformGetPlatform (const gd::String &platformName) const
 Get a pointer to the platform called platformName. More...
 
const std::vector< std::shared_ptr< gd::Platform > > & GetAllPlatforms () const
 Get a list of all platforms available.
 

Static Public Member Functions

static PlatformManagerGet ()
 
static void DestroySingleton ()
 Destroy the global platform manager. More...
 

Detailed Description

Singleton class managing all the platforms available.

Platforms can be added thanks to gd::PlatformManager::AddPlatform.
See gd::PlatformLoader::LoadPlatformInManager to load a platform from a file.

See also
gd::PlatformLoader

Member Function Documentation

◆ DestroySingleton()

static void gd::PlatformManager::DestroySingleton ( )
inlinestatic

Destroy the global platform manager.

This is called by the IDE before shutting down. ( Otherwise, platforms won't get notified that the IDE closed. )

◆ GetPlatform()

gd::Platform * gd::PlatformManager::GetPlatform ( const gd::String platformName) const

Get a pointer to the platform called platformName.

Note
The PlatformManager is the owner of the platform, so the pointer should not be freed or deleted.

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