All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
te::ogr::Module Class Reference

The TerraLib OGR driver is a plugin. More...

#include <Module.h>

Inheritance diagram for te::ogr::Module:
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...
 
 Module (const te::plugin::PluginInfo &pluginInfo)
 Plugin constructor. More...
 
bool operator< (const AbstractPlugin &rhs) const
 This overloaded operator can be used to index the plugin in a set. More...
 
void shutdown ()
 It finalizes all TerraLib OGR driver support. More...
 
void startup ()
 It initializes all TerraLib OGR driver support. More...
 
 ~Module ()
 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...
 

Detailed Description

The TerraLib OGR driver is a plugin.

Definition at line 42 of file Module.h.

Constructor & Destructor Documentation

te::ogr::Module::Module ( const te::plugin::PluginInfo pluginInfo)

Plugin constructor.

Parameters
pInfoBasic information provided to initialize this module through the plugin API.

Definition at line 46 of file Module.cpp.

te::ogr::Module::~Module ( )

Destructor.

Definition at line 51 of file Module.cpp.

Member Function Documentation

const te::plugin::PluginInfo & te::plugin::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 Plugin.cpp.

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

bool te::plugin::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 Plugin.cpp.

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 te::ogr::Module::shutdown ( )
virtual

It finalizes all TerraLib OGR driver support.

Exceptions
ExceptionIt may throws an exception.
Note
This function must be called in your program at least the same times you have called initialize. In general this must be the last call to TerraLib API. As in case of the initialize method, this routine can be called at the end of the main routine of your application.
Warning
Not thread safe!
If this method throws an exception we recommend you to quit the program, don't try to resume it because you can have intermittent errors!

Reimplemented from te::plugin::Plugin.

Definition at line 107 of file Module.cpp.

References te::common::Singleton< DataSourceManager >::getInstance(), OGR_DRIVER_IDENTIFIER, te::da::DataSourceFactory::remove(), te::ogr::DataSource::setDialect(), TE_LOG_TRACE, and TE_TR.

void te::ogr::Module::startup ( )
virtual

It initializes all TerraLib OGR driver support.

The initialization includes:

  • Multilanguage support
  • OGRRegisterAll
Exceptions
ExceptionIt may throws an exception.
Note
This function must be called at least once in your program. The best place to call it is inside the main routine of your application.
Warning
Not thread safe!
If this method throws an exception we recommend you to quit the program, don't try to resume it because you can have intermittent errors!

Reimplemented from te::plugin::Plugin.

Definition at line 55 of file Module.cpp.

References te::da::DataSourceFactory::add(), te::ogr::Build(), OGR_DRIVER_IDENTIFIER, TE_LOG_TRACE, and TE_TR.

Member Data Documentation

bool te::plugin::Plugin::m_initialized
protectedinherited

A flag that indicates if the plugin was started or not.

Definition at line 79 of file Plugin.h.

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

Information about the plugin.

Definition at line 78 of file Plugin.h.

Referenced by te::plugin::Plugin::getInfo().


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