GDevelop Core
Core library for developing platforms and tools compatible with GDevelop.
PropertyFunctionGenerator.h
1 /*
2  * GDevelop Core
3  * Copyright 2008-2022 Florian Rival ([email protected]). All rights
4  * reserved. This project is released under the MIT License.
5  */
6 #ifndef GDCORE_PROPERTYFUNCTIONGENERATOR_H
7 #define GDCORE_PROPERTYFUNCTIONGENERATOR_H
8 
9 namespace gd {
10 class String;
11 class Project;
12 class EventsFunctionsExtension;
13 class EventsFunction;
14 class EventsBasedBehavior;
15 class EventsBasedObject;
16 class AbstractEventsBasedEntity;
17 class PropertyDescriptor;
18 class NamedPropertyDescriptor;
19 } // namespace gd
20 
21 namespace gd {
22 
26 class GD_CORE_API PropertyFunctionGenerator {
27  public:
31  static void GenerateBehaviorGetterAndSetter(
32  gd::Project &project,
34  gd::EventsBasedBehavior &eventsBasedBehavior,
35  const gd::NamedPropertyDescriptor &property,
36  bool isSharedProperties);
40  static void GenerateObjectGetterAndSetter(
41  gd::Project &project,
43  gd::EventsBasedObject &eventsBasedObject,
44  const gd::NamedPropertyDescriptor &property);
45  static bool CanGenerateGetterAndSetter(
46  const gd::AbstractEventsBasedEntity &eventsBasedEntity,
47  const gd::NamedPropertyDescriptor &property);
48 
52  static void GenerateConditionSkeleton(gd::Project &project,
53  gd::EventsFunction &eventFunction);
54 
56 
57  private:
58  static void GenerateGetterAndSetter(
59  gd::Project &project,
61  gd::AbstractEventsBasedEntity &eventsBasedEntity,
62  const gd::NamedPropertyDescriptor &property,
63  const gd::String &objectType,
64  bool isBehavior,
65  bool isSharedProperties);
66 
67  static gd::String CapitalizeFirstLetter(const gd::String &string);
68  static gd::String UnCapitalizeFirstLetter(const gd::String &string);
69  static gd::String GetStringifiedExtraInfo(
70  const gd::PropertyDescriptor &property);
71 
73 };
74 
75 } // namespace gd
76 
77 #endif // GDCORE_PROPERTYFUNCTIONGENERATOR_H
Represents a behavior or an object that is implemented with events.
Definition: AbstractEventsBasedEntity.h:30
Represents a behavior that is implemented with events.
Definition: EventsBasedBehavior.h:32
Represents an object that is implemented with events.
Definition: EventsBasedObject.h:30
Events that can be generated as a stand-alone function, and used as a condition, action or expression...
Definition: EventsFunction.h:38
Hold a list of Events Functions (gd::EventsFunction) and Events Based Behaviors.
Definition: EventsFunctionsExtension.h:38
Used to describe a property shown in a property grid.
Definition: NamedPropertyDescriptor.h:21
Base class representing a project (game), including all resources, scenes, objects,...
Definition: Project.h:51
Used to describe a property shown in a property grid.
Definition: PropertyDescriptor.h:25
Generate a getter and a setter functions for properties.
Definition: PropertyFunctionGenerator.h:26
String represents an UTF8 encoded string.
Definition: String.h:33
Definition: CommonTools.h:24