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 #pragma once
7 
8 namespace gd {
9 class String;
10 class Project;
11 class EventsFunctionsExtension;
12 class EventsFunction;
13 class EventsBasedBehavior;
14 class EventsBasedObject;
15 class AbstractEventsBasedEntity;
16 class PropertyDescriptor;
17 class NamedPropertyDescriptor;
18 } // namespace gd
19 
20 namespace gd {
21 
25 class GD_CORE_API PropertyFunctionGenerator {
26  public:
30  static void GenerateBehaviorGetterAndSetter(
31  gd::Project &project,
33  gd::EventsBasedBehavior &eventsBasedBehavior,
34  const gd::NamedPropertyDescriptor &property,
35  bool isSharedProperties);
39  static void GenerateObjectGetterAndSetter(
40  gd::Project &project,
42  gd::EventsBasedObject &eventsBasedObject,
43  const gd::NamedPropertyDescriptor &property);
44  static bool CanGenerateGetterAndSetter(
45  const gd::AbstractEventsBasedEntity &eventsBasedEntity,
46  const gd::NamedPropertyDescriptor &property);
47 
51  static void GenerateConditionSkeleton(gd::Project &project,
52  gd::EventsFunction &eventFunction);
53 
55 
56  private:
57  static void GenerateGetterAndSetter(
58  gd::Project &project,
60  gd::AbstractEventsBasedEntity &eventsBasedEntity,
61  const gd::NamedPropertyDescriptor &property,
62  const gd::String &objectType,
63  bool isBehavior,
64  bool isSharedProperties);
65 
66  static gd::String CapitalizeFirstLetter(const gd::String &string);
67  static gd::String UnCapitalizeFirstLetter(const gd::String &string);
68  static gd::String GetStringifiedExtraInfo(
69  const gd::PropertyDescriptor &property);
70 
72 };
73 
74 } // namespace gd
Represents a behavior or an object that is implemented with events.
Definition: AbstractEventsBasedEntity.h:29
Represents a behavior that is implemented with events.
Definition: EventsBasedBehavior.h:31
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:39
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:50
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:25
String represents an UTF8 encoded string.
Definition: String.h:33
Definition: CommonTools.h:24