6 #if defined(GD_IDE_ONLY)
14 #include "GDCore/Events/Instruction.h"
15 #include "GDCore/Events/InstructionsList.h"
16 #include "GDCore/Extensions/Metadata/InstructionMetadata.h"
17 #include "GDCore/String.h"
22 class EventsCodeGenerator;
23 class EventsCodeGenerationContext;
25 class SerializerElement;
28 class ReadOnlyEventVisitor;
34 typedef std::shared_ptr<BaseEvent> BaseEventSPtr;
93 bool HasSubEvents()
const;
100 std::vector<gd::InstructionsList*> noConditions;
103 virtual std::vector<const gd::InstructionsList*> GetAllConditionsVectors()
105 std::vector<const gd::InstructionsList*> noConditions;
114 std::vector<gd::InstructionsList*> noActions;
117 virtual std::vector<const gd::InstructionsList*> GetAllActionsVectors()
119 std::vector<const gd::InstructionsList*> noActions;
128 std::vector<gd::String> noSearchableStrings;
129 return noSearchableStrings;
132 virtual bool ReplaceAllSearchableStrings(
133 std::vector<gd::String> newSearchableString) {
141 virtual std::vector<std::pair<gd::Expression*, gd::ParameterMetadata> >
143 std::vector<std::pair<gd::Expression*, gd::ParameterMetadata> > noExpr;
147 std::pair<const gd::Expression*, const gd::ParameterMetadata> >
148 GetAllExpressionsWithMetadata()
const {
149 std::vector<std::pair<const gd::Expression*, const gd::ParameterMetadata> >
161 return emptyDependencies;
171 return emptySourceFile;
212 std::size_t indexOfTheEventInThisList);
217 void PreprocessAsyncActions(
const gd::Platform& platform);
286 std::weak_ptr<gd::BaseEvent>
304 static std::vector<gd::String> emptyDependencies;
Base class defining an event.
Definition: Event.h:44
float percentDuringLastSession
Definition: Event.h:294
void SetType(gd::String type_)
Change the event type.
Definition: Event.h:262
virtual std::vector< gd::InstructionsList * > GetAllActionsVectors()
Return a list of all actions of the event.
Definition: Event.h:113
virtual const std::vector< gd::String > & GetSourceFileDependencies() const
Returns the dependencies on source files of the project.
Definition: Event.h:160
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:142
virtual gd::BaseEvent * Clone() const
Definition: Event.h:59
virtual std::vector< gd::InstructionsList * > GetAllConditionsVectors()
Return a list of all conditions of the event.
Definition: Event.h:99
virtual bool CanHaveSubEvents() const
Definition: Event.h:77
virtual void SerializeTo(SerializerElement &element) const
Serialize event.
Definition: Event.h:236
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:278
bool IsDisabled() const
True if event is disabled.
Definition: Event.h:272
virtual void UnserializeFrom(gd::Project &project, const SerializerElement &element)
Unserialize the event.
Definition: Event.h:241
virtual bool MustBePreprocessed()
If MustBePreprocessed is redefined to return true, the gd::EventMetadata::preprocessing associated to...
Definition: Event.h:227
virtual std::vector< gd::String > GetAllSearchableStrings() const
Return a list of all strings of the event.
Definition: Event.h:127
virtual bool IsExecutable() const
Definition: Event.h:71
virtual gd::EventsList & GetSubEvents()
Definition: Event.h:87
void SetDisabled(bool disable=true)
Set if the event if disabled or not.
Definition: Event.h:267
virtual const gd::EventsList & GetSubEvents() const
Definition: Event.h:82
std::weak_ptr< gd::BaseEvent > originalEvent
Definition: Event.h:287
bool IsFolded() const
True if the event should be folded in the events editor.
Definition: Event.h:283
const gd::String & GetType() const
Return the event type.
Definition: Event.h:257
signed long long totalTimeDuringLastSession
Definition: Event.h:291
virtual const gd::String & GetAssociatedGDManagedSourceFile(gd::Project &project) const
Returns the name of the source file associated with the event.
Definition: Event.h:169
Empty event doing nothing.
Definition: Event.h:321
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:40
A list of events.
Definition: EventsList.h:33
Base class representing a project (game), including all resources, scenes, objects,...
Definition: Project.h:50
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:31
BaseEventSPtr GD_CORE_API CloneRememberingOriginalEvent(BaseEventSPtr event)
Definition: Event.cpp:152
Definition: CommonTools.h:24