GDevelop Core
Core library for developing platforms and tools compatible with GDevelop.
|
Describe an event provided by an extension of a platform. More...
#include <EventMetadata.h>
Public Member Functions | |
EventMetadata & | SetCodeGenerator (std::function< gd::String(gd::BaseEvent &event, gd::EventsCodeGenerator &codeGenerator, gd::EventsCodeGenerationContext &context)> function) |
Set the code generator used when generating code from events. | |
EventMetadata & | SetPreprocessing (std::function< void(gd::BaseEvent &event, gd::EventsCodeGenerator &codeGenerator, gd::EventsList &eventList, std::size_t indexOfTheEventInThisList)> function) |
Set the code to preprocess the event. | |
void | ClearCodeGenerationAndPreprocessing () |
Reset the code generation and preprocessing functions of the event. | |
bool | HasCustomCodeGenerator () const |
Return true if SetCodeGenerator was called to set a function to call to generate the event code. | |
EventMetadata (const gd::String &name_, const gd::String &fullname_, const gd::String &description_, const gd::String &group_, const gd::String &smallicon_, std::shared_ptr< gd::BaseEvent > instance) | |
const gd::String & | GetFullName () const |
const gd::String & | GetDescription () const |
const gd::String & | GetGroup () const |
Public Attributes | |
gd::String | fullname |
gd::String | description |
gd::String | group |
std::shared_ptr< gd::BaseEvent > | instance |
bool | hasCustomCodeGenerator = false |
std::function< gd::String(gd::BaseEvent &event, gd::EventsCodeGenerator &codeGenerator, gd::EventsCodeGenerationContext &context)> | codeGeneration |
std::function< void(gd::BaseEvent &event, gd::EventsCodeGenerator &codeGenerator, gd::EventsList &eventList, std::size_t indexOfTheEventInThisList)> | preprocessing |
Describe an event provided by an extension of a platform.
Extensions writers, you should most of the time be using PlatformExtension::AddEvent method to add events.