GDevelop Core
Core library for developing platforms and tools compatible with GDevelop.
|
Contains user-friendly information about an object type, and a function to create a new gd::Object of this type. More...
#include <ObjectMetadata.h>
Inherits gd::InstructionOrExpressionContainerMetadata.
Public Member Functions | |
ObjectMetadata (const gd::String &extensionNamespace_, const gd::String &name_, const gd::String &fullname_, const gd::String &description_, const gd::String &icon24x24_, std::shared_ptr< gd::ObjectConfiguration > blueprintObject_) | |
Construct an object metadata, using a "blueprint" object that will be copied when a new object is requested. | |
ObjectMetadata (const gd::String &extensionNamespace_, const gd::String &name_, const gd::String &fullname_, const gd::String &description_, const gd::String &icon24x24_) | |
Construct an object metadata, without "blueprint" object. More... | |
ObjectMetadata (const gd::String &extensionNamespace_, const gd::String &name_, const gd::String &fullname_, const gd::String &description_, const gd::String &icon24x24_, CreateFunPtr createFunPtrP) | |
Construct an object metadata, with a function that will be called to instantiate a new object. | |
gd::InstructionMetadata & | AddCondition (const gd::String &name_, const gd::String &fullname_, const gd::String &description_, const gd::String &sentence_, const gd::String &group_, const gd::String &icon_, const gd::String &smallicon_) override |
Declare a new condition as being part of the extension. More... | |
gd::InstructionMetadata & | AddAction (const gd::String &name_, const gd::String &fullname_, const gd::String &description_, const gd::String &sentence_, const gd::String &group_, const gd::String &icon_, const gd::String &smallicon_) override |
Declare a new action as being part of the extension. More... | |
gd::InstructionMetadata & | AddScopedCondition (const gd::String &name_, const gd::String &fullname_, const gd::String &description_, const gd::String &sentence_, const gd::String &group_, const gd::String &icon_, const gd::String &smallicon_) override |
gd::InstructionMetadata & | AddScopedAction (const gd::String &name_, const gd::String &fullname_, const gd::String &description_, const gd::String &sentence_, const gd::String &group_, const gd::String &icon_, const gd::String &smallicon_) override |
gd::ExpressionMetadata & | AddExpression (const gd::String &name_, const gd::String &fullname_, const gd::String &description_, const gd::String &group_, const gd::String &smallicon_) override |
Declare a new expression as being part of the extension. | |
gd::ExpressionMetadata & | AddStrExpression (const gd::String &name_, const gd::String &fullname_, const gd::String &description_, const gd::String &group_, const gd::String &smallicon_) override |
Declare a new string expression as being part of the extension. | |
gd::MultipleInstructionMetadata | AddExpressionAndCondition (const gd::String &type, const gd::String &name, const gd::String &fullname, const gd::String &description, const gd::String &sentenceName, const gd::String &group, const gd::String &icon) override |
Declare a new expression and condition as being part of the object. More... | |
gd::MultipleInstructionMetadata | AddExpressionAndConditionAndAction (const gd::String &type, const gd::String &name, const gd::String &fullname, const gd::String &description, const gd::String &sentenceName, const gd::String &group, const gd::String &icon) override |
Declare a new expression, condition and action as being part of the object. More... | |
gd::InstructionMetadata & | AddDuplicatedAction (const gd::String &newActionName, const gd::String &copiedActionName) override |
Create a new action which is the duplicate of the specified one. More... | |
gd::InstructionMetadata & | AddDuplicatedCondition (const gd::String &newConditionName, const gd::String &copiedConditionName) override |
Create a new condition which is the duplicate of the specified one. More... | |
ObjectMetadata & | SetFullName (const gd::String &fullname_) override |
Set the name shown to the user. | |
ObjectMetadata & | SetDescription (const gd::String &description_) override |
Set the description shown to the user. | |
const gd::String & | GetHelpPath () const override |
Get the help path of the object, relative to the GDevelop documentation root. | |
ObjectMetadata & | SetHelpPath (const gd::String &path) override |
Set the help path of the object, relative to the GDevelop documentation root. More... | |
ObjectMetadata & | SetCategoryFullName (const gd::String &categoryFullName_) |
Set the (user friendly) name of the group this object must be categorised in. | |
const std::set< gd::String > & | GetDefaultBehaviors () const |
The "capabilities" that are offered by through behaviors. | |
bool | HasDefaultBehavior (const gd::String &behaviorType) const |
Return true if object has a default behavior of the given type. | |
ObjectMetadata & | AddDefaultBehavior (const gd::String &behaviorType) |
Add a "capability" that is offered by through a behavior. | |
ObjectMetadata & | ResetDefaultBehaviorsJustForTesting () |
const gd::String & | GetName () const override |
const gd::String & | GetFullName () const override |
const gd::String & | GetCategoryFullName () const |
const gd::String & | GetHelpUrl () const |
const gd::String & | GetDescription () const override |
const gd::String & | GetIconFilename () const override |
ObjectMetadata & | SetHelpUrl (const gd::String &url) |
Set the URL pointing to the help page about this object. More... | |
ObjectMetadata & | SetIncludeFile (const gd::String &includeFile) override |
Erase any existing include file and add the specified include. More... | |
ObjectMetadata & | AddIncludeFile (const gd::String &includeFile) override |
Add a file to the already existing include files. | |
std::map< gd::String, gd::InstructionMetadata > & | GetAllActions () override |
Return a reference to a map containing the names of the actions (as keys) and the metadata associated with (as values). | |
std::map< gd::String, gd::InstructionMetadata > & | GetAllConditions () override |
std::map< gd::String, gd::ExpressionMetadata > & | GetAllExpressions () override |
std::map< gd::String, gd::ExpressionMetadata > & | GetAllStrExpressions () override |
ObjectMetadata & | SetHidden () |
Set the object to be hidden in the IDE. More... | |
bool | IsHidden () const |
Return true if the object must be hidden in the IDE. | |
ObjectMetadata & | MarkAsRenderedIn3D () |
Declare a usage of the 3D renderer. | |
bool | IsRenderedIn3D () const |
Return true if the object uses the 3D renderer. | |
ObjectMetadata & | SetOpenFullEditorLabel (const gd::String &label) |
const gd::String & | GetOpenFullEditorLabel () const |
Public Attributes | |
std::map< gd::String, gd::InstructionMetadata > | conditionsInfos |
std::map< gd::String, gd::InstructionMetadata > | actionsInfos |
std::map< gd::String, gd::ExpressionMetadata > | expressionsInfos |
std::map< gd::String, gd::ExpressionMetadata > | strExpressionsInfos |
std::vector< gd::String > | includeFiles |
gd::String | className |
CreateFunPtr | createFunPtr |
Contains user-friendly information about an object type, and a function to create a new gd::Object of this type.
gd::ObjectMetadata::ObjectMetadata | ( | const gd::String & | extensionNamespace_, |
const gd::String & | name_, | ||
const gd::String & | fullname_, | ||
const gd::String & | description_, | ||
const gd::String & | icon24x24_ | ||
) |
Construct an object metadata, without "blueprint" object.
|
overridevirtual |
Declare a new action as being part of the extension.
AddScopedAction
, to properly namespace the action. Implements gd::InstructionOrExpressionContainerMetadata.
|
overridevirtual |
Declare a new condition as being part of the extension.
AddScopedCondition
, to properly namespace the condition. Implements gd::InstructionOrExpressionContainerMetadata.
|
overridevirtual |
Create a new action which is the duplicate of the specified one.
Useful for handling a deprecated action that is just a "copy" of the new one.
Implements gd::InstructionOrExpressionContainerMetadata.
|
overridevirtual |
Create a new condition which is the duplicate of the specified one.
Useful for handling a deprecated condition that is just a "copy" of the new one.
Implements gd::InstructionOrExpressionContainerMetadata.
|
overridevirtual |
Declare a new expression and condition as being part of the object.
Implements gd::InstructionOrExpressionContainerMetadata.
|
overridevirtual |
Declare a new expression, condition and action as being part of the object.
Implements gd::InstructionOrExpressionContainerMetadata.
|
overridevirtual |
Declare a new action as being part of the object.
Implements gd::InstructionOrExpressionContainerMetadata.
|
overridevirtual |
Declare a new condition as being part of the object.
Implements gd::InstructionOrExpressionContainerMetadata.
|
inlineoverridevirtual |
Implements gd::InstructionOrExpressionContainerMetadata.
|
inlineoverridevirtual |
Implements gd::InstructionOrExpressionContainerMetadata.
|
inlineoverridevirtual |
Implements gd::InstructionOrExpressionContainerMetadata.
|
inlineoverridevirtual |
Set the help path of the object, relative to the GDevelop documentation root.
The object instructions will have this help path set by default, unless you call SetHelpPath on them.
Implements gd::InstructionOrExpressionContainerMetadata.
ObjectMetadata & gd::ObjectMetadata::SetHelpUrl | ( | const gd::String & | url | ) |
Set the URL pointing to the help page about this object.
|
inline |
Set the object to be hidden in the IDE.
Used mainly when an object is deprecated.
|
overridevirtual |
Erase any existing include file and add the specified include.
AddIncludeFile
instead as clearing the list is more error prone. Implements gd::InstructionOrExpressionContainerMetadata.