ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

plugins.h File Reference

#include "common/array.h"
#include "common/fs.h"
#include "common/str.h"
#include "base/internal_plugins.h"
Include dependency graph for plugins.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  PluginObject
 Abstract base class for the plugin objects which handle plugins instantiation. More...
class  Plugin
 Abstract base class for the plugin system. More...
class  PluginProvider
 Abstract base class for Plugin factories. More...
class  FilePluginProvider
 Abstract base class for Plugin factories which load binary code from files. More...
class  PluginManager
 Singleton class which manages all plugins, including loading them, managing all Plugin class instances, and unloading them. More...
class  PluginManagerUncached
 Uncached version of plugin manager Keeps only one dynamic plugin in memory at a time. More...

Defines

#define INCLUDED_FROM_BASE_PLUGINS_H
#define PLUGIN_VERSION   1
 Global Plugin API version.
#define PLUGIN_TYPE_ENGINE_VERSION   1
#define PLUGIN_TYPE_MUSIC_VERSION   1
#define PLUGIN_DYNAMIC_DSO_HANDLE
#define PLUGIN_DYNAMIC_BUILD_DATE
#define REGISTER_PLUGIN_STATIC(ID, TYPE, PLUGINCLASS)
 REGISTER_PLUGIN_STATIC is a convenience macro which is used to declare the plugin interface for static plugins.
#define REGISTER_PLUGIN_DYNAMIC(ID, TYPE, PLUGINCLASS)
 REGISTER_PLUGIN_DYNAMIC is a convenience macro which is used to declare the plugin interface for dynamically loadable plugins.
#define PluginMan   PluginManager::instance()

Typedefs

typedef Common::Array< Plugin * > PluginList
 List of Plugin instances.

Enumerations

enum  PluginType { PLUGIN_TYPE_ENGINE = 0, PLUGIN_TYPE_MUSIC, PLUGIN_TYPE_MAX }

Variables

int pluginTypeVersions [PLUGIN_TYPE_MAX]

Define Documentation

#define INCLUDED_FROM_BASE_PLUGINS_H

Definition at line 31 of file plugins.h.

#define PLUGIN_DYNAMIC_BUILD_DATE

Definition at line 92 of file plugins.h.

#define PLUGIN_DYNAMIC_DSO_HANDLE

Definition at line 85 of file plugins.h.

#define PLUGIN_TYPE_ENGINE_VERSION   1

Definition at line 72 of file plugins.h.

#define PLUGIN_TYPE_MUSIC_VERSION   1

Definition at line 73 of file plugins.h.

#define PLUGIN_VERSION   1

Global Plugin API version.

Definition at line 60 of file plugins.h.

#define PluginMan   PluginManager::instance()

Definition at line 287 of file plugins.h.

#define REGISTER_PLUGIN_DYNAMIC (   ID,
  TYPE,
  PLUGINCLASS 
)
Value:
extern "C" { \
        PLUGIN_DYNAMIC_DSO_HANDLE \
        PLUGIN_DYNAMIC_BUILD_DATE \
        PLUGIN_EXPORT int32 PLUGIN_getVersion() { return PLUGIN_VERSION; } \
        PLUGIN_EXPORT int32 PLUGIN_getType() { return TYPE; } \
        PLUGIN_EXPORT int32 PLUGIN_getTypeVersion() { return TYPE##_VERSION; } \
        PLUGIN_EXPORT PluginObject *PLUGIN_getObject() { \
            return new PLUGINCLASS(); \
        } \
    } \
    void dummyFuncToAllowTrailingSemicolon()

REGISTER_PLUGIN_DYNAMIC is a convenience macro which is used to declare the plugin interface for dynamically loadable plugins.

Code (such as game engines) which needs to implement a dynamic plugin can simply invoke this macro with a plugin ID, plugin type and PluginObject subclass, and the correct wrapper code will be inserted.

See also:
REGISTER_PLUGIN_STATIC

Definition at line 122 of file plugins.h.

#define REGISTER_PLUGIN_STATIC (   ID,
  TYPE,
  PLUGINCLASS 
)
Value:
PluginType g_##ID##_type = TYPE; \
    PluginObject *g_##ID##_getObject() { \
        return new PLUGINCLASS(); \
    } \
    void dummyFuncToAllowTrailingSemicolon()

REGISTER_PLUGIN_STATIC is a convenience macro which is used to declare the plugin interface for static plugins.

Code (such as game engines) which needs to implement a static plugin can simply invoke this macro with a plugin ID, plugin type and PluginObject subclass, and the correct wrapper code will be inserted.

See also:
REGISTER_PLUGIN_DYNAMIC

Definition at line 104 of file plugins.h.


Typedef Documentation

List of Plugin instances.

Definition at line 202 of file plugins.h.


Enumeration Type Documentation

enum PluginType
Enumerator:
PLUGIN_TYPE_ENGINE 
PLUGIN_TYPE_MUSIC 
PLUGIN_TYPE_MAX 

Definition at line 62 of file plugins.h.


Variable Documentation

int pluginTypeVersions[PLUGIN_TYPE_MAX]

Definition at line 36 of file plugins.cpp.



Generated on Sat Aug 17 2019 05:00:59 for ResidualVM by doxygen 1.7.1
curved edge   curved edge