![]() |
GDevelop Core
Core library for developing platforms and tools compatible with GDevelop.
|
Event repeated for each object of a list. More...
#include <ForEachEvent.h>
Inherits gd::BaseEvent.
Public Member Functions | |
| virtual gd::ForEachEvent * | Clone () const |
| virtual bool | IsExecutable () const |
| virtual bool | CanHaveSubEvents () const |
| virtual const gd::EventsList & | GetSubEvents () const |
| virtual gd::EventsList & | GetSubEvents () |
| virtual bool | CanHaveVariables () const |
| virtual const gd::VariablesContainer & | GetVariables () const |
| virtual gd::VariablesContainer & | GetVariables () |
| const gd::InstructionsList & | GetConditions () const |
| gd::InstructionsList & | GetConditions () |
| const gd::InstructionsList & | GetActions () const |
| gd::InstructionsList & | GetActions () |
| virtual gd::InstructionsList * | GetInstructionList (const gd::String &label) override |
| Return the instruction list identified by label, or nullptr if the event has no such list. More... | |
| virtual const gd::InstructionsList * | GetInstructionList (const gd::String &label) const override |
| const gd::String & | GetObjectToPick () const |
| void | SetObjectToPick (gd::String objectsToPick_) |
| const gd::String & | GetLoopIndexVariableName () const |
| void | SetLoopIndexVariableName (const gd::String &name) |
| const gd::String & | GetOrderBy () const |
| void | SetOrderBy (gd::String orderBy_) |
| const gd::Expression & | GetOrderByExpression () const |
| const gd::String & | GetOrder () const |
| void | SetOrder (const gd::String &order_) |
| const gd::String & | GetLimit () const |
| void | SetLimit (gd::String limit_) |
| const gd::Expression & | GetLimitExpression () const |
| virtual std::vector< const gd::InstructionsList * > | GetAllConditionsVectors () const |
| virtual std::vector< const gd::InstructionsList * > | GetAllActionsVectors () const |
| virtual std::vector< std::pair< const gd::Expression *, const gd::ParameterMetadata > > | GetAllExpressionsWithMetadata () const |
| virtual std::vector< gd::InstructionsList * > | GetAllConditionsVectors () |
| Return a list of all conditions of the event. More... | |
| virtual std::vector< gd::InstructionsList * > | GetAllActionsVectors () |
| Return a list of all actions of the event. More... | |
| virtual std::vector< std::pair< gd::Expression *, gd::ParameterMetadata > > | GetAllExpressionsWithMetadata () |
| Return a list of all expressions of the event, each with their associated metadata. More... | |
| virtual void | SerializeTo (SerializerElement &element) const |
| Serialize event. | |
| virtual void | UnserializeFrom (gd::Project &project, const SerializerElement &element) |
| Unserialize the event. | |
Public Member Functions inherited from gd::BaseEvent | |
| virtual gd::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. More... | |
| virtual void | Preprocess (gd::EventsCodeGenerator &codeGenerator, gd::EventsList &eventList, std::size_t indexOfTheEventInThisList) |
| void | PreprocessAsyncActions (const gd::Platform &platform) |
| virtual bool | MustBePreprocessed () |
| If MustBePreprocessed is redefined to return true, the gd::EventMetadata::preprocessing associated to the event will be called to preprocess the event. More... | |
| virtual bool | AcceptVisitor (gd::EventVisitor &eventVisitor) |
| virtual void | AcceptVisitor (gd::ReadOnlyEventVisitor &eventVisitor) const |
| const gd::String & | GetType () const |
| Return the event type. | |
| void | SetType (gd::String type_) |
| Change the event type. | |
| void | SetDisabled (bool disable=true) |
| Set if the event if disabled or not. | |
| bool | IsDisabled () const |
| True if event is disabled. | |
| void | SetFolded (bool fold=true) |
| Set if the event must be folded (i.e: sub events must be hidden in the events editor). | |
| bool | IsFolded () const |
| True if the event should be folded in the events editor. | |
| void | SetAiGeneratedEventId (const gd::String &aiGeneratedEventId_) |
| Set the AI generated event ID. | |
| const gd::String & | GetAiGeneratedEventId () const |
| Get the AI generated event ID. | |
| bool | HasSubEvents () const |
| Return true if the events has sub events. More... | |
| bool | HasVariables () const |
| Return true if the events has local variables. More... | |
| virtual std::vector< gd::String > | GetAllSearchableStrings () const |
| Return a list of all strings of the event. More... | |
| virtual bool | ReplaceAllSearchableStrings (std::vector< gd::String > newSearchableString) |
Additional Inherited Members | |
Public Attributes inherited from gd::BaseEvent | |
| std::weak_ptr< gd::BaseEvent > | originalEvent |
| signed long long | totalTimeDuringLastSession |
| float | percentDuringLastSession |
Static Public Attributes inherited from gd::BaseEvent | |
| static const gd::String | conditionsLabel = "conditions" |
| static const gd::String | actionsLabel = "actions" |
| static const gd::String | whileConditionsLabel = "whileConditions" |
Event repeated for each object of a list.
Each time the event is repeated, only the specific object of the list is picked.
|
inlinevirtual |
Derived class have to redefine this function, so as to return true, if they have sub events.
Reimplemented from gd::BaseEvent.
|
inlinevirtual |
Derived class have to redefine this function, so as to return true, if they can have local variables.
Reimplemented from gd::BaseEvent.
|
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:
Reimplemented from gd::BaseEvent.
|
virtual |
Return a list of all actions of the event.
Reimplemented from gd::BaseEvent.
|
virtual |
Return a list of all conditions of the event.
Reimplemented from gd::BaseEvent.
|
virtual |
Return a list of all expressions of the event, each with their associated metadata.
Reimplemented from gd::BaseEvent.
|
overridevirtual |
Return the instruction list identified by label, or nullptr if the event has no such list.
Supported labels are "conditions", "actions", and "whileConditions" (only for WhileEvent). Derived classes should override this; the base implementation always returns nullptr.
Reimplemented from gd::BaseEvent.
|
inlinevirtual |
Return the sub events, if applicable.
Reimplemented from gd::BaseEvent.
|
inlinevirtual |
Return the sub events, if applicable.
Reimplemented from gd::BaseEvent.
|
inlinevirtual |
Return the local variables, if applicable.
Reimplemented from gd::BaseEvent.
|
inlinevirtual |
Return the local variables, if applicable.
Reimplemented from gd::BaseEvent.
|
inlinevirtual |
Derived class have to redefine this function, so as to return true, if they are executable.
Reimplemented from gd::BaseEvent.