te::v8::plugin::Plugin Class Reference

A class that handles JavaScript Plugins using Google's V8 engine. More...

#include <Plugin.h>

Inheritance diagram for te::v8::plugin::Plugin:
te::plugin::Plugin te::plugin::AbstractPlugin

Public Member Functions

const PluginInfo & getInfo () const
 It return the information associated to the plugin. More...
 
bool isStarted () const
 It tells if the plugin was started or not. More...
 
bool operator< (const AbstractPlugin &rhs) const
 This overloaded operator can be used to index the plugin in a set. More...
 
 Plugin (const te::plugin::PluginInfo &pInfo)
 It creates a new Java plugin. More...
 
void shutdown () throw (...)
 Do nothing! Just set plugin as stopped. More...
 
void startup () throw (...)
 Do nothing! Just set plugin as started. More...
 
 ~Plugin ()
 Destructor. More...
 

Protected Attributes

bool m_initialized
 A flag that indicates if the plugin was started or not. More...
 
PluginInfo m_pluginInfo
 Information about the plugin. More...
 

Private Attributes

te::v8::common::JsContextm_ctx
 The context used to run this plugin. (note: the manager is the owner of this context!) More...
 
::v8::Persistent<::v8::Object > m_jsplugin
 A reference to an instance of the plugin. More...
 
::v8::Persistent<::v8::Function > m_jspluginFtor
 A reference to plugin's class constructor function. More...
 
::v8::Persistent<::v8::Function > m_shutdown
 A reference to plugin shutdown method. More...
 
::v8::Persistent<::v8::Function > m_startup
 A reference to plugin startup method. More...
 

Friends

class PluginEngine
 

Detailed Description

A class that handles JavaScript Plugins using Google's V8 engine.

See also
te::plugin::Plugin, te::plugin::PluginEngine, te::java::PluginEngine, te::plugin::PluginEngineFactory, te::v8::PluginEngineFactory

Definition at line 52 of file src/terralib/binding/v8/plugin/Plugin.h.

Constructor & Destructor Documentation

Plugin::Plugin ( const te::plugin::PluginInfo pInfo)

It creates a new Java plugin.

Parameters
pInfoBasic plugin information.

Definition at line 31 of file src/terralib/binding/v8/plugin/Plugin.cpp.

Plugin::~Plugin ( )
virtual

Destructor.

Reimplemented from te::plugin::Plugin.

Definition at line 37 of file src/terralib/binding/v8/plugin/Plugin.cpp.

References m_jsplugin, m_jspluginFtor, m_shutdown, and m_startup.

Member Function Documentation

const te::plugin::PluginInfo & Plugin::getInfo ( ) const
virtualinherited

It return the information associated to the plugin.

Returns
The information associated to the plugin.

Implements te::plugin::AbstractPlugin.

Definition at line 29 of file attic/src/plugin/Plugin.cpp.

References te::plugin::Plugin::m_pluginInfo.

bool Plugin::isStarted ( ) const
virtualinherited

It tells if the plugin was started or not.

Returns
True if the plugin is started and false otherwise (it is shutdown).

Implements te::plugin::AbstractPlugin.

Definition at line 34 of file attic/src/plugin/Plugin.cpp.

References te::plugin::Plugin::m_initialized.

bool te::plugin::AbstractPlugin::operator< ( const AbstractPlugin rhs) const
inherited

This overloaded operator can be used to index the plugin in a set.

Parameters
rhsThe right-hand-side plugin.
Returns
True if this plugin name is lexcographical less than the rhs plugin name.

Definition at line 38 of file AbstractPlugin.cpp.

References te::plugin::AbstractPlugin::getInfo().

void Plugin::shutdown ( )
throw (...
)
virtual

Do nothing! Just set plugin as stopped.

Reimplemented from te::plugin::Plugin.

Definition at line 66 of file src/terralib/binding/v8/plugin/Plugin.cpp.

References m_ctx, te::plugin::Plugin::m_initialized, m_jsplugin, and m_shutdown.

void Plugin::startup ( )
throw (...
)
virtual

Do nothing! Just set plugin as started.

Reimplemented from te::plugin::Plugin.

Definition at line 45 of file src/terralib/binding/v8/plugin/Plugin.cpp.

References m_ctx, te::plugin::Plugin::m_initialized, m_jsplugin, and m_startup.

Friends And Related Function Documentation

friend class PluginEngine
friend

Definition at line 78 of file src/terralib/binding/v8/plugin/Plugin.h.

Member Data Documentation

te::v8::common::JsContext* te::v8::plugin::Plugin::m_ctx
private

The context used to run this plugin. (note: the manager is the owner of this context!)

Definition at line 72 of file src/terralib/binding/v8/plugin/Plugin.h.

Referenced by shutdown(), and startup().

::v8::Persistent<::v8::Object> te::v8::plugin::Plugin::m_jsplugin
private

A reference to an instance of the plugin.

Definition at line 74 of file src/terralib/binding/v8/plugin/Plugin.h.

Referenced by shutdown(), startup(), and ~Plugin().

::v8::Persistent<::v8::Function> te::v8::plugin::Plugin::m_jspluginFtor
private

A reference to plugin's class constructor function.

Definition at line 73 of file src/terralib/binding/v8/plugin/Plugin.h.

Referenced by ~Plugin().

PluginInfo te::plugin::Plugin::m_pluginInfo
protectedinherited

Information about the plugin.

Definition at line 78 of file attic/src/plugin/Plugin.h.

Referenced by te::plugin::Plugin::getInfo(), and te::sqlite::Module::startup().

::v8::Persistent<::v8::Function> te::v8::plugin::Plugin::m_shutdown
private

A reference to plugin shutdown method.

Definition at line 76 of file src/terralib/binding/v8/plugin/Plugin.h.

Referenced by shutdown(), and ~Plugin().

::v8::Persistent<::v8::Function> te::v8::plugin::Plugin::m_startup
private

A reference to plugin startup method.

Definition at line 75 of file src/terralib/binding/v8/plugin/Plugin.h.

Referenced by startup(), and ~Plugin().


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