Game Develop C++ Platform: ExtensionBase Class Reference

| Game Develop C++ Platform Platform for developing native games based on OpenGL and SFML with Game Develop

- Main Page
- Modules
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Groups Pages
Public Member Functions | List of all members
ExtensionBase Class Reference

Base class for C++ extensions. Extensions can provide : More...

`#include <ExtensionBase.h>`

Inheritance diagram for ExtensionBase:
[legend]
Collaboration diagram for ExtensionBase:
[legend]

## Public Member Functions

void | AddRuntimeObject (gd::ObjectMetadata &object, std::string className, CreateRuntimeObjectFunPtr createFun, DestroyRuntimeObjectFunPtr destroyFun)
| To be called so as to declare the creation and destruction function of a RuntimeObject associated to a gd::Object. More...
CreateRuntimeObjectFunPtr | GetRuntimeObjectCreationFunctionPtr (std::string objectType) const
| Return a function to create the runtime object if the type is handled by the extension.
DestroyRuntimeObjectFunPtr | GetDestroyRuntimeObjectFunction (std::string objectType) const
| Return the function to destroy the runtime object, if the type is handled by the extension. More...
virtual void | SceneLoaded (RuntimeScene &scene)
| Called when a scene is loaded: Useful to initialize some extensions specific objects related to scene.
virtual void | SceneUnloaded (RuntimeScene &scene)
| Called when a scene is unloaded: Useful to destroy some extensions specific objects related to scene.
virtual bool | ToBeNotifiedOnObjectDeletion ()
| Redefine this method to return true if you want the method ObjectDeletedFromScene to be called by RuntimeScene when. More...
virtual void | ObjectDeletedFromScene (RuntimeScene &scene, RuntimeObject *objectDeleted)
| Called by RuntimeScene, if ToBeNotifiedOnObjectDeletion() returns true, when an object is about to be deleted. More...

## Detailed Description

Base class for C++ extensions. Extensions can provide :

- Static functions ( e.g. GetActionFunctionPtr ).
- Objects functions ( e.g. GetObjectActionFunctionPtr )
- New objects, which have a type. The new objects creations/destructions functions are provided by the extension.
- More information when compiled for the IDE.

## Member Function Documentation

void ExtensionBase::AddRuntimeObject | ( | gd::ObjectMetadata & | object,
|  | std::string | className,
|  | CreateRuntimeObjectFunPtr | createFun,
|  | DestroyRuntimeObjectFunPtr | destroyFun
| ) |  |

To be called so as to declare the creation and destruction function of a RuntimeObject associated to a gd::Object.

Parameters

  object | The object associated to the RuntimeObject being declared.
  className | The C++ class name associated to the RuntimeObject.
  createFun | The function used to create the object.
  destroyFun | The function used to destroy the object.

DestroyRuntimeObjectFunPtr ExtensionBase::GetDestroyRuntimeObjectFunction | ( | std::string | objectType) |  | const

Return the function to destroy the runtime object, if the type is handled by the extension.

Used to make sure that the runtime object from an extension is deleted by the same extension.

virtual void ExtensionBase::ObjectDeletedFromScene | ( | RuntimeScene & | scene,
|  | RuntimeObject * | objectDeleted
| ) |  |

inlinevirtual

Called by RuntimeScene, if ToBeNotifiedOnObjectDeletion() returns true, when an object is about to be deleted.

See Also
  ExtensionBase::ObjectDeletedFromScene

virtual bool ExtensionBase::ToBeNotifiedOnObjectDeletion | ( | ) |  |

inlinevirtual

Redefine this method to return true if you want the method ObjectDeletedFromScene to be called by RuntimeScene when.

See Also
  ExtensionBase::ToBeNotifiedOnObjectDeletion

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

- ExtensionBase.h
- ExtensionBase.cpp