Game Develop Core: gd::PlatformLoader 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
Static Public Member Functions | List of all members
gd::PlatformLoader Class Reference

Load a gd::Platform in memory from a file and add it to the manager. More...

`#include <PlatformLoader.h>`

## Static Public Member Functions

static void | LoadAllPlatformsInManager (std::string dir)
static boost::shared_ptr < gd::Platform > | LoadPlatformInManager (std::string fullpath)

## Detailed Description

Load a gd::Platform in memory from a file and add it to the manager.

Platforms are expected to be compiled into shared library. The shared library must provides the two C functions CreateGDPlatform and DestroyGDPlatform :

extern "C" gd::Platform * GD_API CreateGDPlatform();
extern "C" void GD_API DestroyGDPlatform();

Platforms are expected to be singletons, so the DestroyGDPlatform is not passing any pointer as argument.

## Member Function Documentation

void gd::PlatformLoader::LoadAllPlatformsInManager | ( | std::string | dir) |  |

static

Load all the platforms available in a directory.

Parameters

  dir | The directory where platforms must be searched for.

Todo:
  For now, only GDCpp.dll and GDJS.dll are loaded.

boost::shared_ptr< gd::Platform > gd::PlatformLoader::LoadPlatformInManager | ( | std::string | fullpath) |  |

static

Load a specific platform.

Parameters

  fullpath | The path to the platform file.

Returns
  Smart pointer to the loaded platform. Can be NULL ( if loading failed ).

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

- PlatformLoader.h
- PlatformLoader.cpp