te::v8::plugin::PluginEngineFactory Class Reference

This is the concrete factory for JavaScript plugin engines. More...

#include <PluginEngineFactory.h>

Inheritance diagram for te::v8::plugin::PluginEngineFactory:
te::plugin::PluginEngineFactory te::common::AbstractFactory< AbstractPluginEngine, std::string >

Public Types

typedef FactoryDictionary< AbstractFactory< AbstractPluginEngine, std::string, std::less< std::string > >, std::string, std::less< std::string > > dictionary_type
 
typedef AbstractFactory factory_type
 

Public Member Functions

const std::string & getKey () const
 It returns the factory key associated to the concreate factory. More...
 

Static Public Member Functions

static const factory_typefind (const std::string &factoryKey)
 
static dictionary_typegetDictionary ()
 It returns a reference to the internal dictionary of concrete factories. More...
 
static AbstractPluginEngine * make (const std::string &factoryKey)
 It creates an object with the appropriated factory. More...
 

Protected Member Functions

te::plugin::AbstractPluginEnginebuild ()
 It creates a new plugin engine for Java. More...
 
 PluginEngineFactory ()
 
 ~PluginEngineFactory ()
 Destructor. More...
 

Static Protected Member Functions

static void finalize ()
 It finalizes the factory: the singleton instance will be destroyed and will be unregistered from the abstract factory PluginEngineFactory. More...
 
static void initialize ()
 It initializes the factory: the singleton instance will be registered in the abstract factory PluginEngineFactory. More...
 

Protected Attributes

std::string m_factoryKey
 The key that identifies the concrete factory: it will be used for unregistering the factory during destruction. More...
 

Static Private Attributes

static PluginEngineFactorysm_factory
 The plugin engine factory. More...
 

Friends

class Module
 

Detailed Description

This is the concrete factory for JavaScript plugin engines.

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

Definition at line 49 of file src/terralib/binding/v8/plugin/PluginEngineFactory.h.

Member Typedef Documentation

typedef FactoryDictionary<AbstractFactory<AbstractPluginEngine , std::string , std::less<std::string > >, std::string , std::less<std::string > > te::common::AbstractFactory< AbstractPluginEngine , std::string , std::less<std::string > >::dictionary_type
inherited

Definition at line 73 of file AbstractFactory.h.

typedef AbstractFactory te::common::AbstractFactory< AbstractPluginEngine , std::string , std::less<std::string > >::factory_type
inherited

Definition at line 77 of file AbstractFactory.h.

Constructor & Destructor Documentation

te::v8::plugin::PluginEngineFactory::PluginEngineFactory ( )
protected

It register the factory in the abstract dictionary.

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

Referenced by initialize().

te::v8::plugin::PluginEngineFactory::~PluginEngineFactory ( )
protectedvirtual

Destructor.

Reimplemented from te::plugin::PluginEngineFactory.

Definition at line 42 of file src/terralib/binding/v8/plugin/PluginEngineFactory.cpp.

Member Function Documentation

te::plugin::AbstractPluginEngine * te::v8::plugin::PluginEngineFactory::build ( )
protectedvirtual

It creates a new plugin engine for Java.

Returns
It returns plugin engine for Java.

Implements te::common::AbstractFactory< AbstractPluginEngine, std::string >.

Definition at line 32 of file src/terralib/binding/v8/plugin/PluginEngineFactory.cpp.

void te::v8::plugin::PluginEngineFactory::finalize ( )
staticprotected

It finalizes the factory: the singleton instance will be destroyed and will be unregistered from the abstract factory PluginEngineFactory.

Definition at line 52 of file src/terralib/binding/v8/plugin/PluginEngineFactory.cpp.

References sm_factory.

Referenced by initialize(), and te::v8::plugin::Module::shutdown().

static const factory_type* te::common::AbstractFactory< AbstractPluginEngine , std::string , std::less<std::string > >::find ( const std::string &  factoryKey)
staticinherited
static dictionary_type& te::common::AbstractFactory< AbstractPluginEngine , std::string , std::less<std::string > >::getDictionary ( )
staticinherited

It returns a reference to the internal dictionary of concrete factories.

The dictionary is a singleton.

Returns
A reference to the internal dictionary.
const std::string & te::common::AbstractFactory< AbstractPluginEngine , std::string , std::less<std::string > >::getKey ( ) const
inherited

It returns the factory key associated to the concreate factory.

Returns
The factory key associated to the concreate factory.
void te::v8::plugin::PluginEngineFactory::initialize ( )
staticprotected

It initializes the factory: the singleton instance will be registered in the abstract factory PluginEngineFactory.

Definition at line 46 of file src/terralib/binding/v8/plugin/PluginEngineFactory.cpp.

References finalize(), PluginEngineFactory(), and sm_factory.

Referenced by te::v8::plugin::Module::startup().

static AbstractPluginEngine * te::common::AbstractFactory< AbstractPluginEngine , std::string , std::less<std::string > >::make ( const std::string &  factoryKey)
staticinherited

It creates an object with the appropriated factory.

Parameters
factoryKeyA key that identifies the factory used to build the object.
Returns
It returns a new object created by the given factory.
Exceptions
ExceptionIf the concrete factory is not specified or the object can not be built for any reason this methiod may throws an exception.
Note
The caller of this method will take the ownership of the returned object.

Referenced by te::plugin::PluginManager::load(), and te::plugin::PluginManager::unload().

Friends And Related Function Documentation

friend class Module
friend

Member Data Documentation

std::string te::common::AbstractFactory< AbstractPluginEngine , std::string , std::less<std::string > >::m_factoryKey
protectedinherited

The key that identifies the concrete factory: it will be used for unregistering the factory during destruction.

Definition at line 136 of file AbstractFactory.h.

te::v8::plugin::PluginEngineFactory * te::v8::plugin::PluginEngineFactory::sm_factory
staticprivate

The plugin engine factory.

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

Referenced by finalize(), and initialize().


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