Main Page
Modules
Namespaces
Classes
Files
File List
File Members
src/terralib/binding/v8/plugin/Plugin.h
Go to the documentation of this file.
1
/* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2
3
This file is part of the TerraLib - a Framework for building GIS enabled applications.
4
5
TerraLib is free software: you can redistribute it and/or modify
6
it under the terms of the GNU Lesser General Public License as published by
7
the Free Software Foundation, either version 3 of the License,
8
or (at your option) any later version.
9
10
TerraLib is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
GNU Lesser General Public License for more details.
14
15
You should have received a copy of the GNU Lesser General Public License
16
along with TerraLib. See COPYING. If not, write to
17
TerraLib Team at <terralib-team@terralib.org>.
18
*/
19
20
/*!
21
\file CppPlugin.h
22
23
\brief A class that handles JavaScript Plugins using Google's V8 engine.
24
*/
25
26
#ifndef __TERRALIB_BINDING_V8_PLUGIN_INTERNAL_PLUGIN_H
27
#define __TERRALIB_BINDING_V8_PLUGIN_INTERNAL_PLUGIN_H
28
29
// TerraLib
30
#include "../../../plugin/Plugin.h"
31
#include "
Config.h
"
32
33
// Google V8
34
#include <v8.h>
35
36
namespace
te
37
{
38
namespace
v8
39
{
40
// Forward declaration
41
namespace
common {
class
JsContext; }
42
43
namespace
plugin
44
{
45
/*!
46
\class Plugin
47
48
\brief A class that handles JavaScript Plugins using Google's V8 engine.
49
50
\sa te::plugin::Plugin, te::plugin::PluginEngine, te::java::PluginEngine, te::plugin::PluginEngineFactory, te::v8::PluginEngineFactory
51
*/
52
class
TEV8PLUGINEXPORT
Plugin
:
public
te::plugin::Plugin
53
{
54
public
:
55
56
/*!
57
\brief It creates a new Java plugin.
58
59
\param pInfo Basic plugin information.
60
*/
61
Plugin
(
const
te::plugin::PluginInfo
& pInfo);
62
63
/*! \brief Destructor. */
64
~
Plugin
();
65
66
void
startup()
throw
(...) ;
67
68
void
shutdown()
throw
(...) ;
69
70
private
:
71
72
te::v8::common::JsContext
*
m_ctx
;
//!< The context used to run this plugin. (note: the manager is the owner of this context!)
73
::v8::Persistent<::v8::Function>
m_jspluginFtor
;
//!< A reference to plugin's class constructor function.
74
::v8::Persistent<::v8::Object>
m_jsplugin
;
//!< A reference to an instance of the plugin.
75
::v8::Persistent<::v8::Function>
m_startup
;
//!< A reference to plugin startup method.
76
::v8::Persistent<::v8::Function>
m_shutdown
;
//!< A reference to plugin shutdown method.
77
78
friend
class
PluginEngine
;
79
};
80
81
}
// end namespace plugin
82
}
// end namespace v8
83
}
// end namespace te
84
85
#endif // __TERRALIB_BINDING_V8_PLUGIN_INTERNAL_PLUGIN_H
86
te::v8::plugin::Plugin::m_jspluginFtor
::v8::Persistent<::v8::Function > m_jspluginFtor
A reference to plugin's class constructor function.
Definition:
src/terralib/binding/v8/plugin/Plugin.h:73
te::v8::plugin::PluginEngine
A plugin engine for plugins written in JavaScript using Google's V8 engine.
Definition:
PluginEngine.h:46
Config.h
te::v8::common::JsContext
A class for keeping reference to a persistent context.
Definition:
JsContext.h:54
te::v8::plugin::Plugin::m_startup
::v8::Persistent<::v8::Function > m_startup
A reference to plugin startup method.
Definition:
src/terralib/binding/v8/plugin/Plugin.h:75
te
URI C++ Library.
Definition:
Attributes.h:37
TEV8PLUGINEXPORT
#define TEV8PLUGINEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition:
src/terralib/binding/v8/plugin/Config.h:111
te::plugin::Plugin
A base class for plugin types.
Definition:
attic/src/plugin/Plugin.h:50
te::v8::plugin::Plugin::m_shutdown
::v8::Persistent<::v8::Function > m_shutdown
A reference to plugin shutdown method.
Definition:
src/terralib/binding/v8/plugin/Plugin.h:76
te::v8::plugin::Plugin::m_ctx
te::v8::common::JsContext * m_ctx
The context used to run this plugin. (note: the manager is the owner of this context!) ...
Definition:
src/terralib/binding/v8/plugin/Plugin.h:72
te::plugin::PluginInfo
The basic information about a plugin.
Definition:
attic/src/plugin/PluginInfo.h:61
te::v8::plugin::Plugin::m_jsplugin
::v8::Persistent<::v8::Object > m_jsplugin
A reference to an instance of the plugin.
Definition:
src/terralib/binding/v8/plugin/Plugin.h:74
te::v8::plugin::Plugin
A class that handles JavaScript Plugins using Google's V8 engine.
Definition:
src/terralib/binding/v8/plugin/Plugin.h:52
terralib5_src
src
terralib
binding
v8
plugin
Plugin.h
Generated on Wed Jun 6 2018 12:16:11 for TerraLib by
1.8.11