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::ExtensionsLoader Class Reference

Internal class loading static extensions. More...

#include <ExtensionsLoader.h>

Static Public Member Functions

static void LoadAllExtensions (const gd::String &directory, gd::Platform &platform, bool forgiving=false)
 Load all extensions located in the extensions directory for a platform. More...
 
static void LoadExtension (const gd::String &fullpath, gd::Platform &platform, bool forgiving=false)
 Load an extension from a file and add it to a platform. More...
 
static void ExtensionsLoadingDone (const gd::String &directory)
 To be called when extensions loading is done. More...
 

Detailed Description

Internal class loading static extensions.

Class that load extensions and store them in a Platform.

Note
This is for loading extensions declared in C++, usually in files called "Extension.cpp" or "JsExtension.cpp". GDevelop 5 extensions can also be declared directly in JavaScript. See newIDE/app/src/JsExtensionsLoader and "JsExtension.js" files for extensions declared in JavaScript.

Member Function Documentation

void gd::ExtensionsLoader::ExtensionsLoadingDone ( const gd::String directory)
static

To be called when extensions loading is done.

This is necessary on Linux to make symbols exported by extensions available.

Parameters
directoryThe directory where extensions have been loaded from.
void gd::ExtensionsLoader::LoadAllExtensions ( const gd::String directory,
gd::Platform platform,
bool  forgiving = false 
)
static

Load all extensions located in the extensions directory for a platform.

Parameters
directoryThe directory where extensions must be searched.
platformThe platform the extensions belongs to.
forgivingIf set to true, files will try to be opened, but a failure when searching for the platform creation function symbol won't be logged as an error. (All other errors are still reparted as usual).
Note
Extensions files must have extensions *.xgd(w|l|m)(e), w for Windows, l for Linux, m for Mac, e for Edittime extensions.
void gd::ExtensionsLoader::LoadExtension ( const gd::String fullpath,
gd::Platform platform,
bool  forgiving = false 
)
static

Load an extension from a file and add it to a platform.

Parameters
fullpathThe fullpath to the extension file.
platformThe platform the extension belongs to.
forgivingIf set to true, files will try to be opened, but a failure when searching for the platform creation function symbol won't be logged as an error. (All other errors are still reparted as usual).

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