GDevelop Core
Core library for developing platforms and tools compatible with GDevelop.
|
Describe a parameter of an instruction (action, condition) or of an expression: type, user-friendly description, etc... More...
#include <ParameterMetadata.h>
Public Member Functions | |
ParameterMetadata * | Clone () const |
Return a pointer to a new ParameterMetadata constructed from this one. | |
gd::ValueTypeMetadata & | GetValueTypeMetadata () |
Return the metadata of the parameter type. | |
const gd::ValueTypeMetadata & | GetValueTypeMetadata () const |
Return the metadata of the parameter type. | |
ParameterMetadata & | SetValueTypeMetadata (const gd::ValueTypeMetadata &valueTypeMetadata_) |
Set the metadata of the parameter type. | |
const gd::String & | GetType () const |
Return the type of the parameter. More... | |
ParameterMetadata & | SetType (const gd::String &type_) |
Set the type of the parameter. More... | |
const gd::String & | GetName () const |
Return the name of the parameter. More... | |
ParameterMetadata & | SetName (const gd::String &name_) |
Set the name of the parameter. More... | |
const gd::String & | GetExtraInfo () const |
Return an optional additional information, used for some parameters with special type (for example, it can contains the type of object accepted by the parameter). More... | |
ParameterMetadata & | SetExtraInfo (const gd::String &supplementaryInformation_) |
Set an optional additional information, used for some parameters with special type (for example, it can contains the type of object accepted by the parameter). More... | |
bool | IsOptional () const |
Return true if the parameter is optional. More... | |
ParameterMetadata & | SetOptional (bool optional_=true) |
Set if the parameter is optional. More... | |
const gd::String & | GetDescription () const |
Return the description of the parameter. | |
ParameterMetadata & | SetDescription (const gd::String &description_) |
Set the description of the parameter. | |
bool | IsCodeOnly () const |
Return true if the parameter is only meant to be completed during compilation and must not be displayed to the user. | |
ParameterMetadata & | SetCodeOnly (bool codeOnly_=true) |
Set if the parameter is only meant to be completed during compilation and must not be displayed to the user. | |
const gd::String & | GetDefaultValue () const |
Get the default value for the parameter. | |
ParameterMetadata & | SetDefaultValue (const gd::String &defaultValue_) |
Set the default value, if the parameter is optional. | |
const gd::String & | GetLongDescription () const |
Get the user friendly, long description for the parameter. | |
ParameterMetadata & | SetLongDescription (const gd::String &longDescription_) |
Set the user friendly, long description for the parameter. | |
Serialization | |
void | SerializeTo (gd::SerializerElement &element) const |
Serialize the ParameterMetadata to the specified element. | |
void | UnserializeFrom (const gd::SerializerElement &element) |
Load the ParameterMetadata from the specified element. | |
Static Public Member Functions | |
static bool | IsObject (const gd::String ¶meterType) |
Return true if the type of the parameter is representing one object (or more, i.e: an object group). More... | |
static bool | IsBehavior (const gd::String ¶meterType) |
Return true if the type of the parameter is "behavior". More... | |
static bool | IsExpression (const gd::String &type, const gd::String ¶meterType) |
Return true if the type of the parameter is an expression of the given type. More... | |
static const gd::String & | GetExpressionValueType (const gd::String ¶meterType) |
Return the expression type from the parameter type. Declinations of "number" and "string" types (like "forceMultiplier" or "sceneName") are replaced by "number" and "string". More... | |
Public Attributes | |
gd::String | description |
Description shown in editor. | |
bool | codeOnly |
Describe a parameter of an instruction (action, condition) or of an expression: type, user-friendly description, etc...
|
inlinestatic |
Return the expression type from the parameter type. Declinations of "number" and "string" types (like "forceMultiplier" or "sceneName") are replaced by "number" and "string".
|
inline |
Return an optional additional information, used for some parameters with special type (for example, it can contains the type of object accepted by the parameter).
|
inline |
Return the name of the parameter.
Name is optional, and won't be filled for most parameters of extensions. It is useful when generating a function from events, where parameters must be named.
|
inline |
Return the type of the parameter.
|
inlinestatic |
Return true if the type of the parameter is "behavior".
|
inlinestatic |
Return true if the type of the parameter is an expression of the given type.
|
inlinestatic |
Return true if the type of the parameter is representing one object (or more, i.e: an object group).
|
inline |
Return true if the parameter is optional.
|
inline |
Set an optional additional information, used for some parameters with special type (for example, it can contains the type of object accepted by the parameter).
|
inline |
Set the name of the parameter.
Name is optional, and won't be filled for most parameters of extensions. It is useful when generating a function from events, where parameters must be named.
|
inline |
Set if the parameter is optional.
|
inline |
Set the type of the parameter.
bool gd::ParameterMetadata::codeOnly |
True if parameter is relative to code generation only, i.e. must not be shown in editor