GDevelop Core
Core library for developing platforms and tools compatible with GDevelop.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Static Public Member Functions | List of all members
gd::PlatformLoader Class Reference

Load a gd::Platform in memory from a file and add it to the manager. More...

#include <PlatformLoader.h>

Static Public Member Functions

static void LoadAllPlatformsInManager (gd::String dir)
 
static std::shared_ptr
< gd::Platform
LoadPlatformInManager (gd::String fullpath)
 

Detailed Description

Load a gd::Platform in memory from a file and add it to the manager.

Platforms are expected to be compiled into shared library. The shared library must provides the two C functions CreateGDPlatform and DestroyGDPlatform :

extern "C" gd::Platform * GD_API CreateGDPlatform();
extern "C" void GD_API DestroyGDPlatform();

Platforms are expected to be singletons, so the DestroyGDPlatform is not passing any pointer as argument.

Member Function Documentation

void gd::PlatformLoader::LoadAllPlatformsInManager ( gd::String  dir)
static

Load all the platforms available in a directory.

Parameters
dirThe directory where platforms must be searched for.
Todo:
For now, only GDCpp.dll and GDJS.dll are loaded.
std::shared_ptr< gd::Platform > gd::PlatformLoader::LoadPlatformInManager ( gd::String  fullpath)
static

Load a specific platform.

Parameters
fullpathThe path to the platform file.
Returns
Smart pointer to the loaded platform. Can be NULL ( if loading failed ).

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