te::v8::plugin::PluginEngine Class Reference

A plugin engine for plugins written in JavaScript using Google's V8 engine. More...

#include <PluginEngine.h>

Inheritance diagram for te::v8::plugin::PluginEngine:
te::plugin::AbstractPluginEngine

Public Member Functions

te::plugin::AbstractPluginload (const te::plugin::PluginInfo &pInfo) throw (...)
 It try to create and load the informed plugin. More...
 
 PluginEngine ()
 
void unload (te::plugin::AbstractPlugin *plugin) throw (...)
 It try to unload the informed plugin. More...
 
 ~PluginEngine ()
 Virtual destructor. More...
 

Detailed Description

A plugin engine for plugins written in JavaScript using Google's V8 engine.

See also
te::plugin::Plugin, te::plugin::PluginInfo, te::plugin::PluginEngineFactory, te::plugin::PluginEngine, te::v8::Plugin, te::v8::PluginFactory

Definition at line 46 of file PluginEngine.h.

Constructor & Destructor Documentation

te::v8::plugin::PluginEngine::PluginEngine ( )
inline

Default construtor.

Definition at line 51 of file PluginEngine.h.

te::v8::plugin::PluginEngine::~PluginEngine ( )
inline

Virtual destructor.

Definition at line 54 of file PluginEngine.h.

Member Function Documentation

te::plugin::AbstractPlugin * te::v8::plugin::PluginEngine::load ( const te::plugin::PluginInfo pInfo)
throw (...
)
virtual

It try to create and load the informed plugin.

Parameters
pInfoThe information needed to create and load the plugin.
Returns
It returns a loaded plugin. The caller will take the ownership of the returned plugin.
Exceptions
ExceptionIt throws an exception if the plugin can not be loaded.
Note
If the parameter PluginInfo::m_folder does not contains the required plugin it may be searched and loaded using a set of default paths.

Implements te::plugin::AbstractPluginEngine.

Definition at line 49 of file PluginEngine.cpp.

References te::v8::common::Cache(), te::common::Singleton< JsContextManager >::getInstance(), te::v8::common::Print(), te::v8::common::ReadFile(), te::v8::jsi::RegisterModule(), and TR_V8PLUGIN.

void te::v8::plugin::PluginEngine::unload ( te::plugin::AbstractPlugin plugin)
throw (...
)
virtual

It try to unload the informed plugin.

On success the informed plugin will be also destroyed and its pointer will be invalidated.

Parameters
pluginThe plugin to be unloaded.
Exceptions
ExceptionIt throws an exception if the plugin can not be unloaded.

Implements te::plugin::AbstractPluginEngine.

Definition at line 155 of file PluginEngine.cpp.

References TE_V8_PLUGIN_ENGINE_CODE.


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