9 #include <unordered_set>
10 #include <unordered_map>
12 #include "GDCore/String.h"
20 class EventsFunctionsExtension;
22 class ObjectsContainer;
23 class VariablesContainer;
24 class EventsBasedBehavior;
25 class EventsBasedObject;
26 class ArbitraryEventsWorker;
27 class ArbitraryObjectsWorker;
28 class ArbitraryEventsFunctionsWorker;
29 class ArbitraryEventsWorkerWithContext;
30 class ArbitraryEventBasedBehaviorsWorker;
31 class ArbitraryBehaviorSharedDataWorker;
33 class BehaviorMetadata;
34 class UnfilledRequiredBehaviorPropertyProblem;
36 class SerializerElement;
42 std::unordered_set<gd::String> removedVariableNames;
43 std::unordered_map<gd::String, gd::String> oldToNewVariableNames;
45 bool HasRemovedVariables() {
return !removedVariableNames.empty(); }
47 VariablesChangeset& ClearRemovedVariables() { removedVariableNames.clear();
return *
this; }
73 static void ApplyRefactoringForVariablesContainer(
86 static void RenameEventsFunctionsExtension(
96 static void UpdateExtensionNameInEventsBasedBehavior(
109 static void RenameEventsFunction(
123 static void RenameBehaviorEventsFunction(
138 static void RenameObjectEventsFunction(
153 static void MoveEventsFunctionParameter(
157 std::size_t oldIndex,
158 std::size_t newIndex);
168 static void MoveBehaviorEventsFunctionParameter(
173 std::size_t oldIndex,
174 std::size_t newIndex);
184 static void MoveObjectEventsFunctionParameter(
189 std::size_t oldIndex,
190 std::size_t newIndex);
200 static void RenameEventsBasedBehaviorProperty(
215 static void RenameEventsBasedBehaviorSharedProperty(
230 static void RenameEventsBasedObjectProperty(
241 static void AddBehaviorAndRequiredBehaviors(
gd::Project& project,
249 static void AddRequiredBehaviorsFor(
gd::Project& project,
257 static std::vector<gd::String> FindDependentBehaviorNames(
265 static std::vector<gd::String> GetBehaviorsWithType(
const gd::Object&
object,
272 static std::vector<gd::UnfilledRequiredBehaviorPropertyProblem>
273 FindInvalidRequiredBehaviorProperties(
const gd::Project& project);
281 FixInvalidRequiredBehaviorProperties(
gd::Project& project);
290 static void RenameEventsBasedBehavior(
303 static void RenameEventsBasedObject(
317 static void RenameExternalLayout(
gd::Project &project,
323 static void RenameExternalEvents(
gd::Project &project,
367 static void ObjectOrGroupRenamedInLayout(
gd::Project& project,
379 static void ObjectOrGroupRemovedInLayout(
gd::Project& project,
383 bool removeEventsAndGroups =
true);
391 static void ObjectOrGroupRemovedInEventsBasedObject(
398 bool removeEventsAndGroups);
405 static void ObjectOrGroupRenamedInEventsBasedObject(
418 static void ObjectOrGroupRenamedInEventsFunction(
432 static void ObjectOrGroupRemovedInEventsFunction(
439 bool removeEventsAndGroups =
true);
447 static void GlobalObjectOrGroupRenamed(
gd::Project& project,
458 static void GlobalObjectOrGroupRemoved(
gd::Project& project,
461 bool removeEventsAndGroups =
true);
467 static std::set<gd::String> GetAllObjectTypesUsingEventsBasedBehavior(
477 static void EnsureBehaviorEventsFunctionsProperParameters(
485 static void EnsureObjectEventsFunctionsProperParameters(
506 static size_t GetLayoutAndExternalLayoutLayerInstancesCount(
512 static std::vector<gd::String> GetAssociatedExternalLayouts(
514 static std::vector<gd::String>
517 static std::vector<gd::String>
521 static void DoRenameEventsFunction(
gd::Project& project,
545 static void RenameEventsFunctionsExtension(
552 static void FindDependentBehaviorNames(
556 std::unordered_set<gd::String>& dependentBehaviorNames);
558 static const gd::String behaviorObjectParameterName;
559 static const gd::String parentObjectParameterName;
Represents a behavior that is implemented with events.
Definition: EventsBasedBehavior.h:31
Represents an object that is implemented with events.
Definition: EventsBasedObject.h:29
Events that can be generated as a stand-alone function, and used as a condition, action or expression...
Definition: EventsFunction.h:39
Hold a list of Events Functions (gd::EventsFunction) and Events Based Behaviors.
Definition: EventsFunctionsExtension.h:38
Represents a layer of a layout.
Definition: Layer.h:91
Represent a layout ( also called a scene ) of a project.
Definition: Layout.h:39
Represent an object of a platform.
Definition: Object.h:37
Used as a base class for classes that will own objects (see gd::Object).
Definition: ObjectsContainer.h:36
Expose a subset of the project to workers.
Definition: ProjectBrowser.h:29
Base class representing a project (game), including all resources, scenes, objects,...
Definition: Project.h:50
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
Class defining a container for gd::Variable.
Definition: VariablesContainer.h:30
Tool functions to do refactoring on the whole project after changes like deletion or renaming of an o...
Definition: WholeProjectRefactorer.h:58
Definition: CommonTools.h:24
Definition: WholeProjectRefactorer.h:41