12 #include "GDCore/Events/Instruction.h"
13 #include "GDCore/Events/InstructionsList.h"
14 #include "GDCore/Extensions/Metadata/InstructionMetadata.h"
15 #include "GDCore/String.h"
20 class EventsCodeGenerator;
21 class EventsCodeGenerationContext;
23 class SerializerElement;
26 class ReadOnlyEventVisitor;
27 class VariablesContainer;
33 typedef std::shared_ptr<BaseEvent> BaseEventSPtr;
92 bool HasSubEvents()
const;
104 return badLocalVariables;
111 return badLocalVariables;
118 bool HasVariables()
const;
145 std::vector<gd::InstructionsList*> noConditions;
148 virtual std::vector<const gd::InstructionsList*> GetAllConditionsVectors()
150 std::vector<const gd::InstructionsList*> noConditions;
159 std::vector<gd::InstructionsList*> noActions;
162 virtual std::vector<const gd::InstructionsList*> GetAllActionsVectors()
164 std::vector<const gd::InstructionsList*> noActions;
173 std::vector<gd::String> noSearchableStrings;
174 return noSearchableStrings;
177 virtual bool ReplaceAllSearchableStrings(
178 std::vector<gd::String> newSearchableString) {
186 virtual std::vector<std::pair<gd::Expression*, gd::ParameterMetadata> >
188 std::vector<std::pair<gd::Expression*, gd::ParameterMetadata> > noExpr;
192 std::pair<const gd::Expression*, const gd::ParameterMetadata> >
193 GetAllExpressionsWithMetadata()
const {
194 std::vector<std::pair<const gd::Expression*, const gd::ParameterMetadata> >
237 std::size_t indexOfTheEventInThisList);
242 void PreprocessAsyncActions(
const gd::Platform& platform);
314 aiGeneratedEventId = aiGeneratedEventId_;
321 return aiGeneratedEventId;
325 std::weak_ptr<gd::BaseEvent>
Base class defining an event.
Definition: Event.h:43
float percentDuringLastSession
Definition: Event.h:333
void SetType(gd::String type_)
Change the event type.
Definition: Event.h:287
virtual std::vector< gd::InstructionsList * > GetAllActionsVectors()
Return a list of all actions of the event.
Definition: Event.h:158
const gd::String & GetAiGeneratedEventId() const
Get the AI generated event ID.
Definition: Event.h:320
virtual std::vector< std::pair< gd::Expression *, gd::ParameterMetadata > > GetAllExpressionsWithMetadata()
Return a list of all expressions of the event, each with their associated metadata.
Definition: Event.h:187
void SetAiGeneratedEventId(const gd::String &aiGeneratedEventId_)
Set the AI generated event ID.
Definition: Event.h:313
virtual gd::BaseEvent * Clone() const
Definition: Event.h:58
virtual std::vector< gd::InstructionsList * > GetAllConditionsVectors()
Return a list of all conditions of the event.
Definition: Event.h:144
virtual bool CanHaveSubEvents() const
Definition: Event.h:76
virtual gd::InstructionsList * GetInstructionList(const gd::String &label)
Return the instruction list identified by label, or nullptr if the event has no such list.
Definition: Event.h:128
virtual void SerializeTo(SerializerElement &element) const
Serialize event.
Definition: Event.h:261
virtual bool CanHaveVariables() const
Definition: Event.h:98
void SetFolded(bool fold=true)
Set if the event must be folded (i.e: sub events must be hidden in the events editor).
Definition: Event.h:303
bool IsDisabled() const
True if event is disabled.
Definition: Event.h:297
virtual void UnserializeFrom(gd::Project &project, const SerializerElement &element)
Unserialize the event.
Definition: Event.h:266
virtual bool MustBePreprocessed()
If MustBePreprocessed is redefined to return true, the gd::EventMetadata::preprocessing associated to...
Definition: Event.h:252
virtual std::vector< gd::String > GetAllSearchableStrings() const
Return a list of all strings of the event.
Definition: Event.h:172
virtual bool IsExecutable() const
Definition: Event.h:70
virtual gd::EventsList & GetSubEvents()
Definition: Event.h:86
void SetDisabled(bool disable=true)
Set if the event if disabled or not.
Definition: Event.h:292
virtual const gd::EventsList & GetSubEvents() const
Definition: Event.h:81
std::weak_ptr< gd::BaseEvent > originalEvent
Definition: Event.h:326
bool IsFolded() const
True if the event should be folded in the events editor.
Definition: Event.h:308
const gd::String & GetType() const
Return the event type.
Definition: Event.h:282
virtual const gd::VariablesContainer & GetVariables() const
Definition: Event.h:103
virtual gd::VariablesContainer & GetVariables()
Definition: Event.h:110
signed long long totalTimeDuringLastSession
Definition: Event.h:330
Empty event doing nothing.
Definition: Event.h:360
Visitor of any kind of event.
Definition: EventVisitor.h:26
Used to manage the context when generating code for events.
Definition: EventsCodeGenerationContext.h:27
Internal class used to generate code from events.
Definition: EventsCodeGenerator.h:41
A list of events.
Definition: EventsList.h:32
Definition: InstructionsList.h:25
Base class representing a project (game), including all resources, scenes, objects,...
Definition: Project.h:51
Visitor of any kind of event.
Definition: EventVisitor.h:54
A generic container that can represent a value ( containing a string, double, bool or int),...
Definition: SerializerElement.h:37
String represents an UTF8 encoded string.
Definition: String.h:33
Class defining a container for gd::Variable.
Definition: VariablesContainer.h:29
BaseEventSPtr GD_CORE_API CloneRememberingOriginalEvent(BaseEventSPtr event)
Definition: Event.cpp:156
Definition: CommonTools.h:24