6 #ifndef GDCORE_ARBITRARYEVENTSWORKER_H
7 #define GDCORE_ARBITRARYEVENTSWORKER_H
11 #include "GDCore/Events/InstructionsList.h"
12 #include "GDCore/Events/EventVisitor.h"
13 #include "GDCore/Project/ProjectScopedContainers.h"
14 #include "GDCore/String.h"
20 class ObjectsContainer;
22 class ParameterMetadata;
65 virtual bool DoVisitEvent(
gd::BaseEvent& event) {
return false; };
75 virtual bool DoVisitLinkEvent(
gd::LinkEvent& event) {
return false; };
81 bool areConditions){};
116 : projectScopedContainers(
nullptr){};
125 projectScopedContainers = &projectScopedContainers_;
135 return *projectScopedContainers;
140 return projectScopedContainers->GetObjectsContainersList();
166 void StopAnyEventIteration()
override;
171 void VisitLinkEvent(
const gd::LinkEvent& linkEvent)
override;
174 void VisitInstruction(
const gd::Instruction& instruction,
bool isCondition);
192 virtual void DoVisitLinkEvent(
const gd::LinkEvent& linkEvent) {};
198 bool areConditions){};
204 bool isCondition) {};
209 virtual void DoVisitEventExpression(
const gd::Expression& expression,
213 bool shouldStopIteration;
228 : projectScopedContainers(
nullptr){};
237 projectScopedContainers = &projectScopedContainers_;
247 return *projectScopedContainers;
ArbitraryEventsWorker is an abstract class used to browse events (and instructions) and do some work ...
Definition: ArbitraryEventsWorker.h:36
void Launch(gd::EventsList &events)
Launch the worker on the specified events list.
Definition: ArbitraryEventsWorker.h:44
An events worker that will know about the context (the objects container). Useful for workers working...
Definition: ArbitraryEventsWorker.h:113
void Launch(gd::EventsList &events, const gd::ProjectScopedContainers &projectScopedContainers_)
Launch the worker on the specified events list, giving the objects container on which the events are ...
Definition: ArbitraryEventsWorker.h:123
Base class defining an event.
Definition: Event.h:44
Visitor of any kind of event.
Definition: EventVisitor.h:26
A list of events.
Definition: EventsList.h:33
Class representing an expression used as a parameter of a gd::Instruction. This class is nothing more...
Definition: Expression.h:30
An instruction is a member of an event: It can be a condition or an action.
Definition: Instruction.h:30
Definition: InstructionsList.h:25
A link pointing to external events (or events of another layout) that should be included and run inst...
Definition: LinkEvent.h:17
A list of objects containers, useful for accessing objects in a scoped way, along with methods to acc...
Definition: ObjectsContainersList.h:29
Holds references to variables, objects, properties and other containers.
Definition: ProjectScopedContainers.h:30
ReadOnlyArbitraryEventsWorker is an abstract class used to browse events (and instructions)....
Definition: ArbitraryEventsWorker.h:155
void Launch(const gd::EventsList &events)
Launch the worker on the specified events list.
Definition: ArbitraryEventsWorker.h:163
An events worker that will know about the context (the objects container). Useful for workers working...
Definition: ArbitraryEventsWorker.h:225
void Launch(const gd::EventsList &events, const gd::ProjectScopedContainers &projectScopedContainers_)
Launch the worker on the specified events list, giving the objects container on which the events are ...
Definition: ArbitraryEventsWorker.h:235
Visitor of any kind of event.
Definition: EventVisitor.h:54
Definition: CommonTools.h:24