first commit
This commit is contained in:
42
include/engine/script/script_binding_interface.h
Normal file
42
include/engine/script/script_binding_interface.h
Normal file
@ -0,0 +1,42 @@
|
||||
/* -----------------------------------------------------------------------------
|
||||
GSFramework
|
||||
Copyright 2001-2013 Emmanuel Julien. All Rights Reserved.
|
||||
----------------------------------------------------------------------------- */
|
||||
|
||||
|
||||
#ifndef __SCRIPTBINDINGINTERFACE__
|
||||
#define __SCRIPTBINDINGINTERFACE__
|
||||
|
||||
|
||||
#include "plugin/plugin_manager.h"
|
||||
|
||||
|
||||
namespace GS {
|
||||
namespace Script {
|
||||
class IVM;
|
||||
|
||||
/// Interface to provide additional script binding to a VM.
|
||||
struct IScriptBinding
|
||||
{
|
||||
/// Return the plugin class.
|
||||
static const char *GetPluginClass() { return "ScriptBinding"; }
|
||||
/*!
|
||||
@short Return the plugin version.
|
||||
|
||||
@note This version number must be increased whenever a modification
|
||||
is made to the base interface in order to prevent an incompatible
|
||||
plugin from being loaded.
|
||||
*/
|
||||
static uint GetPluginVersion() { return 1; }
|
||||
|
||||
/// Register the new script binding code into the VM.
|
||||
virtual void RegisterBinding(IVM &) = 0;
|
||||
};
|
||||
|
||||
typedef PluginManager <IScriptBinding> BindingPluginManager;
|
||||
|
||||
} // Script
|
||||
} // GS
|
||||
|
||||
|
||||
#endif // __SCRIPTBINDINGINTERFACE__
|
||||
Reference in New Issue
Block a user