10 #include "GDCore/Extensions/Metadata/DependencyMetadata.h"
11 #include "GDCore/Project/EventsBasedBehavior.h"
12 #include "GDCore/Project/EventsBasedObject.h"
13 #include "GDCore/Project/EventsFunctionsContainer.h"
14 #include "GDCore/Project/VariablesContainer.h"
15 #include "GDCore/String.h"
16 #include "GDCore/Tools/SerializableWithNameList.h"
18 class SerializerElement;
53 const gd::String& GetVersion()
const {
return version; };
54 EventsFunctionsExtension& SetVersion(
const gd::String& version_) {
59 const gd::String& GetNamespace()
const {
return extensionNamespace; };
60 EventsFunctionsExtension& SetNamespace(
const gd::String& namespace_) {
61 extensionNamespace = namespace_;
65 const gd::String& GetShortDescription()
const {
return shortDescription; };
66 EventsFunctionsExtension& SetShortDescription(
68 shortDescription = shortDescription_;
72 const gd::String& GetDescription()
const {
return description; };
73 EventsFunctionsExtension& SetDescription(
const gd::String& description_) {
74 description = description_;
78 const gd::String& GetName()
const {
return name; };
79 EventsFunctionsExtension& SetName(
const gd::String& name_) {
84 const gd::String& GetFullName()
const {
return fullName; };
85 EventsFunctionsExtension& SetFullName(
const gd::String& fullName_) {
90 const gd::String& GetCategory()
const {
return category; };
91 EventsFunctionsExtension& SetCategory(
const gd::String& category_) {
96 const std::vector<gd::String>& GetTags()
const {
return tags; };
97 std::vector<gd::String>& GetTags() {
return tags; };
99 const std::vector<gd::String>& GetAuthorIds()
const {
return authorIds; };
100 std::vector<gd::String>& GetAuthorIds() {
return authorIds; };
102 const gd::String& GetAuthor()
const {
return author; };
103 EventsFunctionsExtension& SetAuthor(
const gd::String& author_) {
108 const gd::String& GetPreviewIconUrl()
const {
return previewIconUrl; };
109 EventsFunctionsExtension& SetPreviewIconUrl(
111 previewIconUrl = previewIconUrl_;
115 const gd::String& GetIconUrl()
const {
return iconUrl; };
116 EventsFunctionsExtension& SetIconUrl(
const gd::String& iconUrl_) {
132 helpPath = helpPath_;
140 return eventsBasedBehaviors;
148 return eventsBasedBehaviors;
155 return eventsBasedObjects;
163 return eventsBasedObjects;
174 originName = originName_;
175 originIdentifier = originIdentifier_;
178 virtual const gd::String& GetOriginName()
const {
return originName; }
179 virtual const gd::String& GetOriginIdentifier()
const {
180 return originIdentifier;
192 dependencies.push_back(dependency);
193 return dependencies.back();
200 dependencies.erase(dependencies.begin() + index);
229 return globalVariables;
243 return sceneVariables;
272 void UnserializeExtensionDeclarationFrom(
280 void UnserializeExtensionImplementationFrom(
288 static bool IsExtensionLifecycleEventsFunction(
317 std::vector<gd::String> GetUnserializingOrderEventsBasedObjectNames(
327 std::vector<gd::String> tags;
328 std::vector<gd::String> authorIds;
338 std::vector<gd::DependencyMetadata> dependencies;
Used as a base class for classes that will own events-backed functions.
Definition: EventsFunctionsContainer.h:27
Hold a list of Events Functions (gd::EventsFunction) and Events Based Behaviors.
Definition: EventsFunctionsExtension.h:38
gd::DependencyMetadata & AddDependency()
Adds a new dependency.
Definition: EventsFunctionsExtension.h:190
const std::vector< gd::DependencyMetadata > & GetAllDependencies() const
Returns the list of dependencies.
Definition: EventsFunctionsExtension.h:213
const gd::String & GetHelpPath() const
Get the help path of this extension, relative to the GDevelop documentation root.
Definition: EventsFunctionsExtension.h:125
virtual void SetOrigin(const gd::String &originName_, const gd::String &originIdentifier_)
Sets an extension origin. This method is not present since the beginning so the projects created befo...
Definition: EventsFunctionsExtension.h:172
gd::VariablesContainer & GetGlobalVariables()
Definition: EventsFunctionsExtension.h:236
gd::SerializableWithNameList< EventsBasedObject > & GetEventsBasedObjects()
Return a reference to the list of the events based objects.
Definition: EventsFunctionsExtension.h:154
void RemoveDependencyAt(size_t index)
Adds a new dependency.
Definition: EventsFunctionsExtension.h:199
const gd::VariablesContainer & GetSceneVariables() const
Definition: EventsFunctionsExtension.h:242
std::vector< gd::DependencyMetadata > & GetAllDependencies()
Returns the list of dependencies.
Definition: EventsFunctionsExtension.h:206
const gd::SerializableWithNameList< EventsBasedBehavior > & GetEventsBasedBehaviors() const
Return a const reference to the list of the events based behaviors.
Definition: EventsFunctionsExtension.h:147
const gd::VariablesContainer & GetGlobalVariables() const
Definition: EventsFunctionsExtension.h:228
gd::SerializableWithNameList< EventsBasedBehavior > & GetEventsBasedBehaviors()
Return a reference to the list of the events based behaviors.
Definition: EventsFunctionsExtension.h:139
gd::VariablesContainer & GetSceneVariables()
Definition: EventsFunctionsExtension.h:250
EventsFunctionsExtension & SetHelpPath(const gd::String &helpPath_)
Set the help path of this extension, relative to the GDevelop documentation root.
Definition: EventsFunctionsExtension.h:131
EventsFunctionsExtension * Clone() const
Return a pointer to a new EventsFunctionsExtension constructed from this one.
Definition: EventsFunctionsExtension.h:49
const gd::SerializableWithNameList< EventsBasedObject > & GetEventsBasedObjects() const
Return a const reference to the list of the events based objects.
Definition: EventsFunctionsExtension.h:162
Base class representing a project (game), including all resources, scenes, objects,...
Definition: Project.h:51
A class template that store a list of elements that can be accessed by their names and serialized.
Definition: SerializableWithNameList.h:33
A generic container that can represent a value ( containing a string, double, bool or int),...
Definition: SerializerElement.h:37
SerializerElement & SetStringAttribute(const gd::String &name, const gd::String &value)
Set the string value of an attribute of the element.
Definition: SerializerElement.h:234
gd::String GetStringAttribute(const gd::String &name, gd::String defaultValue="", gd::String deprecatedName="") const
Definition: SerializerElement.cpp:83
String represents an UTF8 encoded string.
Definition: String.h:33
Class defining a container for gd::Variable.
Definition: VariablesContainer.h:28
Definition: CommonTools.h:24