GDevelop Core
Core library for developing platforms and tools compatible with GDevelop.
|
Base class for implementing a platform. More...
#include <Platform.h>
Public Member Functions | |
virtual gd::String | GetName () const |
Must return the platform name. | |
virtual gd::String | GetFullName () const |
Must return the platform full name, displayed to users. | |
virtual gd::String | GetSubtitle () const |
Must return a text describing the platform in a few words. | |
virtual gd::String | GetDescription () const |
Must return a text describing the platform, displayed to users. | |
virtual gd::String | GetIcon () const |
Must return a filename to a 32*32 image file for the platform. | |
void | EnableExtensionLoadingLogs (bool enable) |
Activate or disable the logs on the standard output when loading an extension. | |
Extensions management | |
Member functions used to manage the extensions | |
virtual void | ReloadBuiltinExtensions () |
(Re)load platform built-in extensions. More... | |
virtual gd::String | GetExtensionCreateFunctionName () |
Must return the name of the function that is used to create an extension for this platform. More... | |
virtual bool | AddExtension (std::shared_ptr< PlatformExtension > extension) |
Add an extension to the platform. More... | |
bool | IsExtensionLoaded (const gd::String &name) const |
Return true if an extension with the specified name is loaded. | |
std::shared_ptr< PlatformExtension > | GetExtension (const gd::String &name) const |
Get an extension of the platform. More... | |
const std::vector< std::shared_ptr< gd::PlatformExtension > > & | GetAllPlatformExtensions () const |
Get all extensions loaded for the platform. More... | |
virtual void | RemoveExtension (const gd::String &name) |
Remove an extension from the platform. More... | |
const InstructionOrExpressionGroupMetadata & | GetInstructionOrExpressionGroupMetadata (const gd::String &name) const |
Get the metadata (icon, etc...) of a group used for instructions or expressions. | |
Factory method | |
Member functions used to create the platform objects. TODO: This could be moved to gd::MetadataProvider. | |
std::unique_ptr< gd::ObjectConfiguration > | CreateObjectConfiguration (gd::String type) const |
Create an object of given type with the specified name. | |
std::shared_ptr< gd::BaseEvent > | CreateEvent (const gd::String &type) const |
Create an event of given type. | |
Base class for implementing a platform.
|
virtual |
Add an extension to the platform.
|
inline |
Get all extensions loaded for the platform.
std::shared_ptr< gd::PlatformExtension > gd::Platform::GetExtension | ( | const gd::String & | name | ) | const |
Get an extension of the platform.
|
inlinevirtual |
Must return the name of the function that is used to create an extension for this platform.
For example, GD C++ Platform uses "CreateGDExtension" and GD JS Platform "CreateGDJSExtension".
|
inlinevirtual |
(Re)load platform built-in extensions.
|
virtual |
Remove an extension from the platform.
Events, objects, behaviors provided by the extension won't be available anymore.