GDevelop Core
Core library for developing platforms and tools compatible with GDevelop.
EventsFunctionSelfCallChecker.h
1 /*
2  * GDevelop Core
3  * Copyright 2008-present Florian Rival ([email protected]). All rights
4  * reserved. This project is released under the MIT License.
5  */
6 #pragma once
7 
8 #include "GDCore/String.h"
9 #include <vector>
10 namespace gd {
11 class Project;
12 class EventsFunctionsExtension;
13 class EventsFunctionsContainer;
14 class EventsFunction;
15 class EventsBasedBehavior;
16 class EventsBasedObject;
17 } // namespace gd
18 
19 namespace gd {
31 class GD_CORE_API EventsFunctionSelfCallChecker {
32 public:
36  static bool IsFreeFunctionOnlyCallingItself(
37  const gd::Project &project,
38  const gd::EventsFunctionsExtension &eventsFunctionsExtension,
39  const gd::EventsFunction &eventsFunction);
40 
44  static bool IsBehaviorFunctionOnlyCallingItself(
45  const gd::Project &project,
46  const gd::EventsFunctionsExtension &eventsFunctionsExtension,
47  const gd::EventsBasedBehavior &eventsBasedBehavior,
48  const gd::EventsFunction &eventsFunction);
49 
53  static bool IsObjectFunctionOnlyCallingItself(
54  const gd::Project &project,
55  const gd::EventsFunctionsExtension &eventsFunctionsExtension,
56  const gd::EventsBasedObject &eventsBasedObject,
57  const gd::EventsFunction &eventsFunction);
58 
59 private:
60  static bool IsOnlyCallingItself(const gd::Project &project,
61  const gd::String &functionFullType,
62  const gd::EventsFunction &eventsFunction);
63 };
64 } // namespace gd
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
Check if functions are only calling themselves.
Definition: EventsFunctionSelfCallChecker.h:31
Hold a list of Events Functions (gd::EventsFunction) and Events Based Behaviors.
Definition: EventsFunctionsExtension.h:38
Base class representing a project (game), including all resources, scenes, objects,...
Definition: Project.h:50
String represents an UTF8 encoded string.
Definition: String.h:31
Definition: CommonTools.h:24