Game Develop Core: gd::RepeatEvent 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::RepeatEvent Class Reference

Event being repeated a specified number of times. More...

`#include <RepeatEvent.h>`

Inheritance diagram for gd::RepeatEvent:
[legend]

## Public Member Functions

| RepeatEvent (const RepeatEvent &event)
RepeatEvent & | operator= (const RepeatEvent &event)
virtual gd::BaseEventSPtr | Clone () const
virtual bool | IsExecutable () const
virtual bool | CanHaveSubEvents () const
virtual const std::vector < gd::BaseEventSPtr > & | GetSubEvents () const
virtual std::vector < gd::BaseEventSPtr > & | GetSubEvents ()
void | SetSubEvents (std::vector< gd::BaseEventSPtr > &subEvents_)
const std::vector < gd::Instruction > & | GetConditions () const
std::vector< gd::Instruction > & | GetConditions ()
void | SetConditions (std::vector< gd::Instruction > &conditions_)
const std::vector < gd::Instruction > & | GetActions () const
std::vector< gd::Instruction > & | GetActions ()
void | SetActions (std::vector< gd::Instruction > &actions_)
std::string | GetRepeatExpression () const
std::string | GetRepeatExpression ()
void | SetRepeatExpression (std::string repeatNumberExpression_)
virtual std::vector < std::vector< gd::Instruction > * > | GetAllConditionsVectors ()
virtual std::vector < std::vector< gd::Instruction > * > | GetAllActionsVectors ()
virtual std::vector < gd::Expression * > | GetAllExpressions ()
virtual void | SaveToXml (TiXmlElement *eventElem) const
virtual void | LoadFromXml (gd::Project &project, const TiXmlElement *eventElem)
virtual void | Render (wxDC &dc, int x, int y, unsigned int width, gd::EventsEditorItemsAreas &areas, gd::EventsEditorSelection &selection, const gd::Platform &platform)
virtual unsigned int | GetRenderedHeight (unsigned int width, const gd::Platform &platform) const
virtual EditEventReturnType | EditEvent (wxWindow *parent_, gd::Project &game_, gd::Layout &scene_, gd::MainFrameWrapper &mainFrameWrapper_)
Public Member Functions inherited from gd::BaseEvent
bool | HasSubEvents () const
| Return true if the events has sub events. More...
virtual std::string | GenerateEventCode (gd::EventsCodeGenerator &codeGenerator, gd::EventsCodeGenerationContext &context)
| Generate the code event : the platform provided by codeGenerator is asked for the EventMetadata associated to the event, which is then used to generate the code event ( gd::EventMetadata::codeGeneration member ) More...
virtual void | Preprocess (gd::EventsCodeGenerator &codeGenerator, std::vector< gd::BaseEventSPtr > &eventList, unsigned int indexOfTheEventInThisList)
virtual bool | MustBePreprocessed ()
| If MustBePreprocessed is redefined to return true, the gd::EventMetadata::codeGeneration associated to the event will be called to preprocess the event. More...
std::string | GetType () const
void | SetType (std::string type_)
void | SetDisabled (bool disable=true)
bool | IsDisabled () const

## Additional Inherited Members

Public Types inherited from gd::BaseEvent
enum | EditEventReturnType { ChangesMade, Cancelled, ChangesMadeButNoNeedForEventsRecompilation }
Public Attributes inherited from gd::BaseEvent
bool | folded
| Here as it must be saved. Used by events editor.
bool | eventHeightNeedUpdate
| Automatically set to true/false by the events editor.
boost::weak_ptr< gd::BaseEvent > | originalEvent
| Pointer only used for profiling events, so as to remember the original event from which it has been copied.
signed long long | totalTimeDuringLastSession
| Total time, in microseconds, used by the event during the last run. Used for profiling.
float | percentDuringLastSession
| Total time used by the event during the last run. Used for profiling.
Protected Attributes inherited from gd::BaseEvent
unsigned int | renderedHeight

## Detailed Description

Event being repeated a specified number of times.

## Constructor & Destructor Documentation

gd::RepeatEvent::RepeatEvent | ( | const RepeatEvent & | event) |  |

Custom copy operator

## Member Function Documentation

virtual bool gd::RepeatEvent::CanHaveSubEvents | ( | ) |  | const

inlinevirtual

Derived class have to redefine this function, so as to return true, if they have sub events.

Reimplemented from gd::BaseEvent.

virtual gd::BaseEventSPtr gd::RepeatEvent::Clone | ( | ) |  | const

inlinevirtual

Must return a pointer to a copy of the event. A such method is needed as the IDE may want to store copies of some events and so need a way to do polymorphic copies.

Typical implementation example:

return boost::shared_ptr<gd::BaseEvent>(new MyEventClass(*this));

Reimplemented from gd::BaseEvent.

gd::BaseEvent::EditEventReturnType gd::RepeatEvent::EditEvent | ( | wxWindow * | parent_,
|  | gd::Project & | game_,
|  | gd::Layout & | scene_,
|  | gd::MainFrameWrapper & | mainFrameWrapper_
| ) |  |

virtual

Called when the user want to edit the event

Reimplemented from gd::BaseEvent.

vector< vector< gd::Instruction > * > gd::RepeatEvent::GetAllActionsVectors | ( | ) |  |

virtual

Event must be able to return all actions std::vector they have. Used to preprocess the actions.

Reimplemented from gd::BaseEvent.

vector< vector< gd::Instruction > * > gd::RepeatEvent::GetAllConditionsVectors | ( | ) |  |

virtual

Event must be able to return all conditions std::vector they have. Used to preprocess the conditions.

Reimplemented from gd::BaseEvent.

vector< gd::Expression * > gd::RepeatEvent::GetAllExpressions | ( | ) |  |

virtual

Event must be able to return all expressions they have. Used to preprocess the expressions.

Reimplemented from gd::BaseEvent.

unsigned int gd::RepeatEvent::GetRenderedHeight | ( | unsigned int | width,
|  | const gd::Platform & | platform
| ) |  | const

virtual

Must return the height of the event when rendered

Reimplemented from gd::BaseEvent.

virtual const std::vector< gd::BaseEventSPtr >& gd::RepeatEvent::GetSubEvents | ( | ) |  | const

inlinevirtual

Return the sub events, if applicable.

Reimplemented from gd::BaseEvent.

virtual std::vector< gd::BaseEventSPtr >& gd::RepeatEvent::GetSubEvents | ( | ) |  |

inlinevirtual

Return the sub events, if applicable.

Reimplemented from gd::BaseEvent.

virtual bool gd::RepeatEvent::IsExecutable | ( | ) |  | const

inlinevirtual

Derived class have to redefine this function, so as to return true, if they are executable.

Reimplemented from gd::BaseEvent.

void gd::RepeatEvent::LoadFromXml | ( | gd::Project & | project,
|  | const TiXmlElement * | eventElem
| ) |  |

virtual

Load event from XML

Reimplemented from gd::BaseEvent.

RepeatEvent & gd::RepeatEvent::operator= | ( | const RepeatEvent & | event) |  |

Custom assignement operator

void gd::RepeatEvent::Render | ( | wxDC & | dc,
|  | int | x,
|  | int | y,
|  | unsigned int | width,
|  | gd::EventsEditorItemsAreas & | areas,
|  | gd::EventsEditorSelection & | selection,
|  | const gd::Platform & | platform
| ) |  |

virtual

Called by event editor to draw the event.

Render the event in the bitmap

Reimplemented from gd::BaseEvent.

void gd::RepeatEvent::SaveToXml | ( | TiXmlElement * | eventElem) |  | const

virtual

Save event to XML

Reimplemented from gd::BaseEvent.

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

- RepeatEvent.h
- RepeatEvent.cpp