Game Develop Core: gd::InstructionMetadata::ExtraInformation 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 Types | Public Member Functions | Public Attributes | List of all members
gd::InstructionMetadata::ExtraInformation Class Reference

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

`#include <InstructionMetadata.h>`

## Classes

class | CustomCodeGenerator
| Class used to redefine instruction code generation. More...

## Public Types

enum | AccessType { Reference, MutatorAndOrAccessor }

## Public Member Functions

ExtraInformation & | SetFunctionName (const std::string &cppCallingName_)
ExtraInformation & | SetManipulatedType (const std::string &type_)
ExtraInformation & | SetAssociatedGetter (const std::string &getter)
ExtraInformation & | SetIncludeFile (const std::string &optionalIncludeFile_)
ExtraInformation & | SetCustomCodeGenerator (boost::shared_ptr< CustomCodeGenerator > codeGenerator)

## Public Attributes

std::string | functionCallName
std::string | type
AccessType | accessType
std::string | optionalAssociatedInstruction
std::string | optionalIncludeFile
boost::shared_ptr < CustomCodeGenerator > | optionalCustomCodeGenerator

## Detailed Description

Defines information about how generate C++ code for an instruction.

## Member Function Documentation

ExtraInformation& gd::InstructionMetadata::ExtraInformation::SetAssociatedGetter | ( | const std::string & | getter) |  |

inline

If InstructionMetadata::ExtraInformation::SetManipulatedType was called with "number" or "string", this function will tell the code generator the name of the getter function used to retrieve the data value.

Usage example:

obj.AddAction("String",
_("Change the string"),
_("Change the string of a text"),
_("Do _PARAM1__PARAM2_ to the string of _PARAM0_"),
_("Text"),
"CppPlatform/Extensions/text24.png",
"CppPlatform/Extensions/text.png");
.AddParameter("object", _("Object"), "Text", false)
.AddParameter("operator", _("Modification operator"))
.AddParameter("string", _("String"))
.codeExtraInformation.SetFunctionName("SetString").SetManipulatedType("string").SetAssociatedGetter("GetString").SetIncludeFile("MyExtension/TextObject.h");
DECLARE_END_OBJECT_ACTION()

ExtraInformation& gd::InstructionMetadata::ExtraInformation::SetFunctionName | ( | const std::string & | cppCallingName_) |  |

inline

Set the C++ function name which will be used when generating the C++ code.

ExtraInformation& gd::InstructionMetadata::ExtraInformation::SetIncludeFile | ( | const std::string & | optionalIncludeFile_) |  |

inline

Set that the function is located in a specific include file

ExtraInformation& gd::InstructionMetadata::ExtraInformation::SetManipulatedType | ( | const std::string & | type_) |  |

inline

Declare if the instruction ( condition or action ) being declared is manipulating something in a standard way.

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

- InstructionMetadata.h