Game Develop Core: gd::InstructionMetadata Class Reference

| Game Develop Core Core library for developing platforms and tools compatible with Game Develop.

- Main Page
- Modules
- Classes

- Class List
- Class Index
- Class Hierarchy

All Classes Files Functions Variables Typedefs Enumerations Macros Groups Pages
Classes | Public Member Functions | Public Attributes | List of all members
gd::InstructionMetadata Class Reference
Events ( Classes defining the event system and some tools associated with events )

Contains user-friendly infos about actions/conditions, and members needed to setup an instruction. More...

`#include <InstructionMetadata.h>`

## Classes

class | ExtraInformation
| Defines information about how generate C++ code for an instruction. More...

## Public Member Functions

| InstructionMetadata (const std::string &extensionNamespace, const std::string &name, const std::string &fullname, const std::string &description, const std::string &sentence, const std::string &group, const std::string &icon, const std::string &smallicon)
const std::string & | GetFullName () const
const std::string & | GetDescription () const
const std::string & | GetSentence () const
const std::string & | GetGroup () const
const wxBitmap & | GetBitmapIcon () const
const wxBitmap & | GetSmallBitmapIcon () const
bool | CanHaveSubInstructions () const
InstructionMetadata & | SetCanHaveSubInstructions ()
InstructionMetadata & | SetHidden ()
| Set the instruction to be hidden in the IDE. More...
InstructionMetadata & | SetGroup (const std::string &str)
| Set the group of the instruction in the IDE.
bool | IsHidden () const
| Return true if the instruction must be hidden in the IDE.
InstructionMetadata & | AddParameter (const std::string &type, const std::string &description, const std::string &optionalObjectType="", bool parameterIsOptional=false)
InstructionMetadata & | AddCodeOnlyParameter (const std::string &type, const std::string &supplementaryInformation)
InstructionMetadata & | SetDefaultValue (std::string defaultValue_)
| InstructionMetadata ()
| DefaultConstructor. More...

## Public Attributes

ExtraInformation | codeExtraInformation
| Information about how generate code for the instruction.
std::vector< ParameterMetadata > | parameters

## Detailed Description

Contains user-friendly infos about actions/conditions, and members needed to setup an instruction.

## Constructor & Destructor Documentation

gd::InstructionMetadata::InstructionMetadata | ( | ) |  |

DefaultConstructor.

Please do not use this constructor. Only here to fulfill std::map requirements

## Member Function Documentation

InstructionMetadata & gd::InstructionMetadata::AddCodeOnlyParameter | ( | const std::string & | type,
|  | const std::string & | supplementaryInformation
| ) |  |

Add a parameter not displayed in editor.

Parameters

  type | One of the type handled by Game Develop. This will also determine the type of the argument used when calling the function in C++ code.

See Also
  EventsCodeGenerator::GenerateParametersCodes

Parameters

  supplementaryInformation | Can be used if needed. For example, when type == "inlineCode", the content of supplementaryInformation is inserted in the generated C++ code.

InstructionMetadata & gd::InstructionMetadata::AddParameter | ( | const std::string & | type,
|  | const std::string & | description,
|  | const std::string & | optionalObjectType = `""`,
|  | bool | parameterIsOptional = `false`
| ) |  |

Add a parameter to the instruction ( condition or action ) information class.

Parameters

  type | One of the type handled by Game Develop. This will also determine the type of the argument used when calling the function in C++ code.

See Also
  EventsCodeGenerator::GenerateParametersCodes

Parameters

  description | Description for parameter
  optionalObjectType | If type is "object", this parameter will describe which objects are allowed. If it is empty, all objects are allowed.
  parameterIsOptional | true if the parameter must be optional, false otherwise.

InstructionMetadata& gd::InstructionMetadata::SetCanHaveSubInstructions | ( | ) |  |

inline

Notify that the instruction can have sub instructions.

InstructionMetadata& gd::InstructionMetadata::SetDefaultValue | ( | std::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

InstructionMetadata& gd::InstructionMetadata::SetHidden | ( | ) |  |

inline

Set the instruction to be hidden in the IDE.

Used mainly when an instruction is deprecated.

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

- InstructionMetadata.h
- InstructionMetadata.cpp