Game Develop Core: gd::EventMetadata::CodeGenerator Class Reference

| Game Develop Core Core library for developing platforms and tools compatible with Game Develop.

- Main Page
- Modules
- Classes

- Class List
- Class Index
- Class Hierarchy

All Classes Files Functions Variables Typedefs Enumerations Macros Groups Pages
Public Member Functions | List of all members
gd::EventMetadata::CodeGenerator Class Reference

Base class used to define the code generated for a single event. More...

`#include <EventMetadata.h>`

## Public Member Functions

virtual std::string | Generate (gd::BaseEvent &event, gd::EventsCodeGenerator &codeGenerator, gd::EventsCodeGenerationContext &context)
| Called to generate the code for the event. More...
virtual void | Preprocess (gd::BaseEvent &event, gd::EventsCodeGenerator &codeGenerator, std::vector< boost::shared_ptr< gd::BaseEvent > > &eventList, unsigned int indexOfTheEventInThisList)
| Called for events that must be preprocessed. More...

## Detailed Description

Base class used to define the code generated for a single event.

Warning
  Must not be confused with gd::EventsCodeGenerator which is a more general class used to generate code for a whole layout or a list of conditions/actions.

## Member Function Documentation

std::string gd::EventMetadata::CodeGenerator::Generate | ( | gd::BaseEvent & | event,
|  | gd::EventsCodeGenerator & | codeGenerator,
|  | gd::EventsCodeGenerationContext & | context
| ) |  |

virtual

Called to generate the code for the event.

You can use gd::EventsCodeGenerator methods in particular so as to generate code for conditions or actions.

void gd::EventMetadata::CodeGenerator::Preprocess | ( | gd::BaseEvent & | event,
|  | gd::EventsCodeGenerator & | codeGenerator,
|  | std::vector< boost::shared_ptr< gd::BaseEvent > > & | eventList,
|  | unsigned int | indexOfTheEventInThisList
| ) |  |

virtual

Called for events that must be preprocessed.

Most of the events do not requires preprocessing, so you do not need to take care of this function, unless for special cases like gd::LinkEvent.

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

- EventMetadata.h
- EventMetadata.cpp