GDevelop Core
Core library for developing platforms and tools compatible with GDevelop.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Public Member Functions | Public Attributes | List of all members

Describe user-friendly information about an expression, its parameters and the function name as well as other information for code generation. More...

#include <ExpressionMetadata.h>

Public Member Functions

 ExpressionMetadata (const gd::String &extensionNamespace, const gd::String &name, const gd::String &fullname, const gd::String &description, const gd::String &group, const gd::String &smallicon)
 
 ExpressionMetadata ()
 
ExpressionMetadataSetHidden ()
 Set the expression as not shown in the IDE.
 
ExpressionMetadataSetGroup (const gd::String &str)
 Set the group of the instruction in the IDE.
 
const gd::StringGetHelpPath () const
 
ExpressionMetadataSetHelpPath (const gd::String &path)
 
bool IsPrivate () const
 
ExpressionMetadataSetPrivate ()
 
gd::ExpressionMetadataAddParameter (const gd::String &type, const gd::String &description, const gd::String &optionalObjectType="", bool parameterIsOptional=false)
 
gd::ExpressionMetadataAddCodeOnlyParameter (const gd::String &type, const gd::String &supplementaryInformation)
 
ExpressionMetadataSetDefaultValue (gd::String defaultValue_)
 
ExpressionMetadataSetParameterLongDescription (gd::String longDescription)
 Set the long description shown in the editor for the last added parameter. More...
 
ExpressionCodeGenerationInformationSetFunctionName (const gd::String &functionName)
 Set the function that should be called when generating the source code from events. More...
 
ExpressionCodeGenerationInformationGetCodeExtraInformation ()
 Return the structure containing the information about code generation for the expression.
 
bool IsShown () const
 
const gd::StringGetFullName () const
 
const gd::StringGetDescription () const
 
const gd::StringGetGroup () const
 
const gd::StringGetSmallIconFilename () const
 
const gd::ParameterMetadataGetParameter (std::size_t id) const
 
gd::ParameterMetadataGetParameter (std::size_t id)
 
std::size_t GetParametersCount () const
 
const std::vector
< gd::ParameterMetadata > & 
GetParameters () const
 

Public Attributes

ExpressionCodeGenerationInformation codeExtraInformation
 
std::vector
< gd::ParameterMetadata
parameters
 

Detailed Description

Describe user-friendly information about an expression, its parameters and the function name as well as other information for code generation.

Constructor & Destructor Documentation

gd::ExpressionMetadata::ExpressionMetadata ( const gd::String extensionNamespace,
const gd::String name,
const gd::String fullname,
const gd::String description,
const gd::String group,
const gd::String smallicon 
)

Construct a new expression metadata.

gd::ExpressionMetadata::ExpressionMetadata ( )
inline

Construct an empty ExpressionMetadata.

Warning
Don't use this - only here to fullfil std::map requirements.

Member Function Documentation

gd::ExpressionMetadata & gd::ExpressionMetadata::AddCodeOnlyParameter ( const gd::String type,
const gd::String supplementaryInformation 
)
gd::ExpressionMetadata & gd::ExpressionMetadata::AddParameter ( const gd::String type,
const gd::String description,
const gd::String optionalObjectType = "",
bool  parameterIsOptional = false 
)
const gd::String& gd::ExpressionMetadata::GetHelpPath ( ) const
inline

Get the help path of the expression, relative to the documentation root.

bool gd::ExpressionMetadata::IsPrivate ( ) const
inline

Check if the instruction is private - it can't be used outside of the object/ behavior that it is attached too.

ExpressionMetadata& gd::ExpressionMetadata::SetDefaultValue ( gd::String  defaultValue_)
inline

Set the default value used in editor (or if an optional parameter is empty during code generation) for the latest added parameter.

See also
AddParameter
ExpressionCodeGenerationInformation& gd::ExpressionMetadata::SetFunctionName ( const gd::String functionName)
inline

Set the function that should be called when generating the source code from events.

Parameters
functionNamethe name of the function to call
Note
Shortcut for codeExtraInformation.SetFunctionName.
ExpressionMetadata& gd::ExpressionMetadata::SetHelpPath ( const gd::String path)
inline

Set the help path of the expression, relative to the documentation root.

ExpressionMetadata& gd::ExpressionMetadata::SetParameterLongDescription ( gd::String  longDescription)
inline

Set the long description shown in the editor for the last added parameter.

See also
AddParameter
ExpressionMetadata& gd::ExpressionMetadata::SetPrivate ( )
inline

Set that the instruction is private - it can't be used outside of the object/ behavior that it is attached too.


The documentation for this class was generated from the following files: