6 #ifndef GDCORE_EVENTSREFACTORER_H
7 #define GDCORE_EVENTSREFACTORER_H
11 #include "GDCore/Events/Instruction.h"
12 #include "GDCore/Extensions/Metadata/InstructionMetadata.h"
13 #include "GDCore/String.h"
16 class ObjectsContainer;
17 class ObjectsContainersList;
18 class ProjectScopedContainers;
23 typedef std::shared_ptr<gd::BaseEvent> BaseEventSPtr;
38 std::size_t positionInList_);
42 std::weak_ptr<gd::BaseEvent> event;
44 std::size_t positionInList;
46 bool IsEventsListValid()
const {
return eventsList !=
nullptr; }
55 std::size_t GetPositionInList()
const {
return positionInList; }
57 bool IsEventValid()
const {
return !
event.expired(); }
83 static void RenameObjectInEvents(
const gd::Platform& platform,
92 static void RemoveObjectInEvents(
const gd::Platform& platform,
103 static std::vector<EventsSearchResult> SearchInEvents(
111 bool inEventSentences);
118 static std::vector<EventsSearchResult> ReplaceStringInEvents(
138 static bool RenameObjectInActions(
const gd::Platform& platform,
150 static bool RenameObjectInConditions(
const gd::Platform& platform,
162 static bool RenameObjectInEventParameters(
175 static bool RemoveObjectInConditions(
const gd::Platform& platform,
185 static bool RemoveObjectInActions(
const gd::Platform& platform,
220 static bool ReplaceStringInEventSearchableStrings(
228 static bool SearchStringInFormattedText(
const gd::Platform& platform,
233 static bool SearchStringInActions(
const gd::Platform& platform,
238 static bool SearchStringInConditions(
const gd::Platform& platform,
247 static const gd::String searchIgnoredCharacters;
Base class defining an event.
Definition: Event.h:44
A list of events.
Definition: EventsList.h:33
Class containing functions to do refactoring tasks on events.
Definition: EventsRefactorer.h:76
Class used to return result when calling EventsRefactorer::SearchInEvents.
Definition: EventsRefactorer.h:34
const gd::BaseEvent & GetEvent() const
Get the event pointed by the EventsSearchResult.
Definition: EventsRefactorer.h:63
const gd::EventsList & GetEventsList() const
Get the events list containing the event pointed by the EventsSearchResult.
Definition: EventsRefactorer.h:53
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
Used as a base class for classes that will own objects (see gd::Object).
Definition: ObjectsContainer.h:36
Holds references to variables, objects, properties and other containers.
Definition: ProjectScopedContainers.h:30
String represents an UTF8 encoded string.
Definition: String.h:31
Definition: CommonTools.h:24