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

Describe an event provided by an extension of a platform. More...

#include <EventMetadata.h>

Public Member Functions

EventMetadataSetCodeGenerator (std::function< gd::String(gd::BaseEvent &event, gd::EventsCodeGenerator &codeGenerator, gd::EventsCodeGenerationContext &context)> function)
 Set the code generator used when generating code from events.
EventMetadataSetPreprocessing (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::StringGetFullName () const
const gd::StringGetDescription () const
const gd::StringGetGroup () const

Public Attributes

gd::String fullname
gd::String description
gd::String group
std::shared_ptr< gd::BaseEventinstance
bool hasCustomCodeGenerator
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

Detailed Description

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.

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