| TerraLib 4.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Examples

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions
SPL::slcPluginServer Class Reference

Plugin server class for linux and other POSIX-based systems. More...

`#include <spl_pluginserver_linux.h>`

Inheritance diagram for SPL::slcPluginServer:

List of all members.

## Public Member Functions

| slcPluginServer (void)
| Default constructor.
virtual | ~slcPluginServer (void)
| Default destructor.
virtual slcPluginInfo | GetPluginInfo (const long a_lIndex)
| Retrieves information about one loaded plugin.
virtual void | GetAllPluginInfos (void)
| Automatically retrieves information about all loaded plugins.
virtual long | LoadAllPlugins (const string &a_strPath, const string &a_strWildcard, bool init_plugin, const slcPluginArgs *a_pPluginArgs=NULL)
| Loads all plugins with a given wildcard in a specified path.
virtual long | LoadPlugin (const string &a_strFileName, bool init_plugin, const slcPluginArgs *a_pPluginArgs=NULL)
| Loads a plugin with the specified file name.
virtual bool | UnloadPlugin (const long a_lIndex, bool shutdown_plugin, const slcPluginArgs *a_pPluginArgs=NULL)
| Unloads a plugin with the given index (0-based).
virtual void | UnloadAllPlugins (const slcPluginArgs *a_pPluginArgs=NULL)
| Unloads all plugins.
virtual bool SPL_API | RunPluginInit (const long a_lIndex, const slcPluginArgs *a_pPluginArgs=NULL)
| Runs the plugin's init function.
virtual bool | RunPlugin (const long a_lIndex, const slcPluginArgs *a_pPluginArgs=NULL)
| Runs a plugin with the given index (0-based) and arguments.
virtual long | RunAllPlugins (const slcPluginArgs *a_pPluginArgs=NULL)
| Runs all plugins with the given arguments.
virtual long | Refresh (const string &a_strPath, const string &a_strWildcard, const slcPluginArgs *a_pPluginShutdownArgs=NULL, const slcPluginArgs *a_pPluginInitArgs=NULL)
| Unloads all plugins and looks for new plugins in the given path.
| slcPluginServer (void)
| Default constructor.
virtual | ~slcPluginServer (void)
| Default destructor.
virtual slcPluginInfo | GetPluginInfo (const long a_lIndex)
| Retrieves information about one loaded plugin.
virtual void | GetAllPluginInfos (void)
| Automatically retrieves information about all loaded plugins.
virtual long | LoadAllPlugins (const string &a_strPath, const string &a_strWildcard, bool init_plugin, const slcPluginArgs *a_pPluginArgs=NULL)
| Loads all plugins with a given wildcard in a specified path.
virtual long | LoadPlugin (const string &a_strFileName, bool init_plugin, const slcPluginArgs *a_pPluginArgs=NULL)
| Loads a plugin with the specified file name.
virtual bool | UnloadPlugin (const long a_lIndex, bool shutdown_plugin, const slcPluginArgs *a_pPluginArgs=NULL)
| Unloads a plugin with the given index (0-based).
virtual void | UnloadAllPlugins (const slcPluginArgs *a_pPluginArgs=NULL)
| Unloads all plugins.
virtual bool SPL_API | RunPluginInit (const long a_lIndex, const slcPluginArgs *a_pPluginArgs=NULL)
| Runs the plugin's init function.
virtual bool | RunPlugin (const long a_lIndex, const slcPluginArgs *a_pPluginArgs=NULL)
| Runs a plugin with the given index (0-based) and arguments.
virtual long | RunAllPlugins (const slcPluginArgs *a_pPluginArgs=NULL)
| Runs all plugins with the given arguments.
virtual long | Refresh (const string &a_strPath, const string &a_strWildcard, const slcPluginArgs *a_pPluginShutdownArgs=NULL, const slcPluginArgs *a_pPluginInitArgs=NULL)
| Unloads all plugins and looks for new plugins in the given path.
SPL_API | slcPluginServer (void)
| Default constructor.
virtual SPL_API | ~slcPluginServer (void)
| Default destructor.
virtual SPL_API slcPluginInfo | GetPluginInfo (const long a_lIndex)
| Retrieves information about one loaded plugin.
virtual void SPL_API | GetAllPluginInfos (void)
| Automatically retrieves information about all loaded plugins.
virtual long SPL_API | LoadAllPlugins (const string &a_strPath, const string &a_strWildcard, bool init_plugin, const slcPluginArgs *a_pPluginArgs=NULL)
| Loads all plugins with a given wildcard in a specified path.
virtual long SPL_API | LoadPlugin (const string &a_strFileName, bool init_plugin, const slcPluginArgs *a_pPluginArgs=NULL)
| Loads a plugin with the specified file name.
virtual bool SPL_API | UnloadPlugin (const long a_lIndex, bool shutdown_plugin, const slcPluginArgs *a_pPluginArgs=NULL)
| Unloads a plugin with the given index (0-based).
virtual void SPL_API | UnloadAllPlugins (const slcPluginArgs *a_pPluginArgs=NULL)
| Unloads all plugins.
virtual bool SPL_API | RunPluginInit (const long a_lIndex, const slcPluginArgs *a_pPluginArgs=NULL)
| Runs the plugin's init function.
virtual bool SPL_API | RunPlugin (const long a_lIndex, const slcPluginArgs *a_pPluginArgs=NULL)
| Runs a plugin with the given index (0-based) and arguments.
virtual long SPL_API | RunAllPlugins (const slcPluginArgs *a_pPluginArgs=NULL)
| Runs all plugins with the given arguments.
virtual long SPL_API | Refresh (const string &a_strPath, const string &a_strWildcard, const slcPluginArgs *a_pPluginShutdownArgs=NULL, const slcPluginArgs *a_pPluginInitArgs=NULL)
| Unloads all plugins and looks for new plugins in the given path.

## Detailed Description

Plugin server class for linux and other POSIX-based systems.

Plugin server class for Win32.

Plugin server class for solaris.

## Constructor & Destructor Documentation

SPL::slcPluginServer::slcPluginServer | ( | void |  | ) |

Default constructor.

virtual SPL::slcPluginServer::~slcPluginServer | ( | void |  | ) | `[virtual]`

Default destructor.

SPL::slcPluginServer::slcPluginServer | ( | void |  | ) |

Default constructor.

virtual SPL::slcPluginServer::~slcPluginServer | ( | void |  | ) | `[virtual]`

Default destructor.

slcPluginServer::slcPluginServer | ( | void |  | ) |

Default constructor.

slcPluginServer::~slcPluginServer | ( | void |  | ) | `[virtual]`

Default destructor.

## Member Function Documentation

virtual void SPL::slcPluginServer::GetAllPluginInfos | ( | void |  | ) | `[virtual]`

Automatically retrieves information about all loaded plugins.

Implements SPL::slaPluginServer.

void slcPluginServer::GetAllPluginInfos | ( | void |  | ) | `[virtual]`

Automatically retrieves information about all loaded plugins.

Implements SPL::slaPluginServer.

virtual void SPL::slcPluginServer::GetAllPluginInfos | ( | void |  | ) | `[virtual]`

Automatically retrieves information about all loaded plugins.

Implements SPL::slaPluginServer.

virtual slcPluginInfo SPL::slcPluginServer::GetPluginInfo | ( | const long | a_lIndex | ) | `[virtual]`

Retrieves information about one loaded plugin.

Implements SPL::slaPluginServer.

slcPluginInfo slcPluginServer::GetPluginInfo | ( | const long | a_lIndex | ) | `[virtual]`

Retrieves information about one loaded plugin.

Implements SPL::slaPluginServer.

virtual slcPluginInfo SPL::slcPluginServer::GetPluginInfo | ( | const long | a_lIndex | ) | `[virtual]`

Retrieves information about one loaded plugin.

Implements SPL::slaPluginServer.

virtual long SPL_API SPL::slcPluginServer::LoadAllPlugins | ( | const string & | a_strPath,
|  | const string & | a_strWildcard,
|  | bool | init_plugin,
|  | const slcPluginArgs * | a_pPluginArgs = `NULL`
| ) |  | `[virtual]`

Loads all plugins with a given wildcard in a specified path.

Parameters:

  a_strPath | [in] Valid path for searching the plugins.
  a_strWildcard | [in] File wildcard (e.g. *.*, *.dll) for the plugins.
  init_plugin | After plugin loading, run the init function.
  a_pPluginArgs | [in] Pointer to arguments for initializing all plugins after they have been loaded.

Returns:
  Number of successfully loaded plugins.

Implements SPL::slaPluginServer.

virtual long SPL::slcPluginServer::LoadAllPlugins | ( | const string & | a_strPath,
|  | const string & | a_strWildcard,
|  | bool | init_plugin,
|  | const slcPluginArgs * | a_pPluginArgs = `NULL`
| ) |  | `[virtual]`

Loads all plugins with a given wildcard in a specified path.

Parameters:

  a_strPath | [in] Valid path for searching the plugins.
  a_strWildcard | [in] File wildcard (e.g. *.*, *.dll) for the plugins.
  init_plugin | After plugin loading, run the init function.
  a_pPluginArgs | [in] Pointer to arguments for initializing all plugins after they have been loaded.

Returns:
  Number of successfully loaded plugins.

Implements SPL::slaPluginServer.

virtual long SPL::slcPluginServer::LoadAllPlugins | ( | const string & | a_strPath,
|  | const string & | a_strWildcard,
|  | bool | init_plugin,
|  | const slcPluginArgs * | a_pPluginArgs = `NULL`
| ) |  | `[virtual]`

Loads all plugins with a given wildcard in a specified path.

Parameters:

  a_strPath | [in] Valid path for searching the plugins.
  a_strWildcard | [in] File wildcard (e.g. *.*, *.dll) for the plugins.
  init_plugin | After plugin loading, run the init function.
  a_pPluginArgs | [in] Pointer to arguments for initializing all plugins after they have been loaded.

Returns:
  Number of successfully loaded plugins.

Implements SPL::slaPluginServer.

virtual long SPL::slcPluginServer::LoadPlugin | ( | const string & | a_strFileName,
|  | bool | init_plugin,
|  | const slcPluginArgs * | a_pPluginArgs = `NULL`
| ) |  | `[virtual]`

Loads a plugin with the specified file name.

Parameters:

  a_strFileName | [in] The plugin's file name.
  init_plugin | After plugin loading, run the init function.
  a_pPluginArgs | [in] Pointer to plugin's start function arguments.

Returns:
  The method returns one of the following values:

Return values:

  -2 | | Plugin was not found.
  -1 | | Plugin's initialize function was not found.
  0 | | Error while executing the intialisation function.
  1 | | Plugin was successfully loaded.

Implements SPL::slaPluginServer.

virtual long SPL_API SPL::slcPluginServer::LoadPlugin | ( | const string & | a_strFileName,
|  | bool | init_plugin,
|  | const slcPluginArgs * | a_pPluginArgs = `NULL`
| ) |  | `[virtual]`

Loads a plugin with the specified file name.

Parameters:

  a_strFileName | [in] The plugin's file name.
  init_plugin | After plugin loading, run the init function.
  a_pPluginArgs | [in] Pointer to plugin's start function arguments.

Returns:
  The method returns one of the following values:

Return values:

  -2 | | Plugin was not found.
  -1 | | Plugin's initialize function was not found.
  0 | | Error while executing the intialisation function.
  1 | | Plugin was successfully loaded.

Implements SPL::slaPluginServer.

virtual long SPL::slcPluginServer::LoadPlugin | ( | const string & | a_strFileName,
|  | bool | init_plugin,
|  | const slcPluginArgs * | a_pPluginArgs = `NULL`
| ) |  | `[virtual]`

Loads a plugin with the specified file name.

Parameters:

  a_strFileName | [in] The plugin's file name.
  init_plugin | After plugin loading, run the init function.
  a_pPluginArgs | [in] Pointer to plugin's start function arguments.

Returns:
  The method returns one of the following values:

Return values:

  -2 | | Plugin was not found.
  -1 | | Plugin's initialize function was not found.
  0 | | Error while executing the intialisation function.
  1 | | Plugin was successfully loaded.

Implements SPL::slaPluginServer.

virtual long SPL::slcPluginServer::Refresh | ( | const string & | a_strPath,
|  | const string & | a_strWildcard,
|  | const slcPluginArgs * | a_pPluginShutdownArgs = `NULL`,
|  | const slcPluginArgs * | a_pPluginInitArgs = `NULL`
| ) |  | `[virtual]`

Unloads all plugins and looks for new plugins in the given path.

Parameters:

  a_strPath | [in] Valid path for searching the plugins.
  a_strWildcard | [in] File wildcard (e.g. *.*, *.dll) for the plugins.
  a_pPluginShutdownArgs | [in] Pointer to arguments for shutting down all plugins before they will be unloaded.
  a_pPluginInitArgs | [in] Pointer to arguments for initializing all plugins after they have been loaded.

Returns:
  Number of successfully loaded plugins.

Implements SPL::slaPluginServer.

virtual long SPL::slcPluginServer::Refresh | ( | const string & | a_strPath,
|  | const string & | a_strWildcard,
|  | const slcPluginArgs * | a_pPluginShutdownArgs = `NULL`,
|  | const slcPluginArgs * | a_pPluginInitArgs = `NULL`
| ) |  | `[virtual]`

Unloads all plugins and looks for new plugins in the given path.

Parameters:

  a_strPath | [in] Valid path for searching the plugins.
  a_strWildcard | [in] File wildcard (e.g. *.*, *.dll) for the plugins.
  a_pPluginShutdownArgs | [in] Pointer to arguments for shutting down all plugins before they will be unloaded.
  a_pPluginInitArgs | [in] Pointer to arguments for initializing all plugins after they have been loaded.

Returns:
  Number of successfully loaded plugins.

Implements SPL::slaPluginServer.

virtual long SPL_API SPL::slcPluginServer::Refresh | ( | const string & | a_strPath,
|  | const string & | a_strWildcard,
|  | const slcPluginArgs * | a_pPluginShutdownArgs = `NULL`,
|  | const slcPluginArgs * | a_pPluginInitArgs = `NULL`
| ) |  | `[virtual]`

Unloads all plugins and looks for new plugins in the given path.

Parameters:

  a_strPath | [in] Valid path for searching the plugins.
  a_strWildcard | [in] File wildcard (e.g. *.*, *.dll) for the plugins.
  a_pPluginShutdownArgs | [in] Pointer to arguments for shutting down all plugins before they will be unloaded.
  a_pPluginInitArgs | [in] Pointer to arguments for initializing all plugins after they have been loaded.

Returns:
  Number of successfully loaded plugins.

Implements SPL::slaPluginServer.

virtual long SPL::slcPluginServer::RunAllPlugins | ( | const slcPluginArgs * | a_pPluginArgs = `NULL` | ) | `[virtual]`

Runs all plugins with the given arguments.

Parameters:

  a_pPluginArgs | [in] Pointer to plugin's run function arguments.

Returns:
  Number of successfully executed plugins.

Implements SPL::slaPluginServer.

virtual long SPL::slcPluginServer::RunAllPlugins | ( | const slcPluginArgs * | a_pPluginArgs = `NULL` | ) | `[virtual]`

Runs all plugins with the given arguments.

Parameters:

  a_pPluginArgs | [in] Pointer to plugin's run function arguments.

Returns:
  Number of successfully executed plugins.

Implements SPL::slaPluginServer.

virtual long SPL_API SPL::slcPluginServer::RunAllPlugins | ( | const slcPluginArgs * | a_pPluginArgs = `NULL` | ) | `[virtual]`

Runs all plugins with the given arguments.

Parameters:

  a_pPluginArgs | [in] Pointer to plugin's run function arguments.

Returns:
  Number of successfully executed plugins.

Implements SPL::slaPluginServer.

virtual bool SPL::slcPluginServer::RunPlugin | ( | const long | a_lIndex,
|  | const slcPluginArgs * | a_pPluginArgs = `NULL`
| ) |  | `[virtual]`

Runs a plugin with the given index (0-based) and arguments.

Parameters:

  a_lIndex | [in] The plugin's index.
  a_pPluginArgs | [in] Pointer to plugin's run function arguments.

Returns:
  The method returns one of the following values:

Return values:

  true | | The plugin execution was successful.
  false | | An error occured while executing the plugin.

Implements SPL::slaPluginServer.

virtual bool SPL::slcPluginServer::RunPlugin | ( | const long | a_lIndex,
|  | const slcPluginArgs * | a_pPluginArgs = `NULL`
| ) |  | `[virtual]`

Runs a plugin with the given index (0-based) and arguments.

Parameters:

  a_lIndex | [in] The plugin's index.
  a_pPluginArgs | [in] Pointer to plugin's run function arguments.

Returns:
  The method returns one of the following values:

Return values:

  true | | The plugin execution was successful.
  false | | An error occured while executing the plugin.

Implements SPL::slaPluginServer.

virtual bool SPL_API SPL::slcPluginServer::RunPlugin | ( | const long | a_lIndex,
|  | const slcPluginArgs * | a_pPluginArgs = `NULL`
| ) |  | `[virtual]`

Runs a plugin with the given index (0-based) and arguments.

Parameters:

  a_lIndex | [in] The plugin's index.
  a_pPluginArgs | [in] Pointer to plugin's run function arguments.

Returns:
  The method returns one of the following values:

Return values:

  true | | The plugin execution was successful.
  false | | An error occured while executing the plugin.

Implements SPL::slaPluginServer.

virtual bool SPL_API SPL::slcPluginServer::RunPluginInit | ( | const long | a_lIndex,
|  | const slcPluginArgs * | a_pPluginArgs = `NULL`
| ) |  | `[virtual]`

Runs the plugin's init function.

Parameters:

  a_lIndex | [in] The plugin's index.
  a_pPluginArgs | [in] Pointer to plugin's run function arguments.

Returns:
  The method returns one of the following values:

Return values:

  true | | The plugin execution was successful.
  false | | An error occured while executing the plugin.

Implements SPL::slaPluginServer.

virtual bool SPL_API SPL::slcPluginServer::RunPluginInit | ( | const long | a_lIndex,
|  | const slcPluginArgs * | a_pPluginArgs = `NULL`
| ) |  | `[virtual]`

Runs the plugin's init function.

Parameters:

  a_lIndex | [in] The plugin's index.
  a_pPluginArgs | [in] Pointer to plugin's run function arguments.

Returns:
  The method returns one of the following values:

Return values:

  true | | The plugin execution was successful.
  false | | An error occured while executing the plugin.

Implements SPL::slaPluginServer.

virtual bool SPL_API SPL::slcPluginServer::RunPluginInit | ( | const long | a_lIndex,
|  | const slcPluginArgs * | a_pPluginArgs = `NULL`
| ) |  | `[virtual]`

Runs the plugin's init function.

Parameters:

  a_lIndex | [in] The plugin's index.
  a_pPluginArgs | [in] Pointer to plugin's run function arguments.

Returns:
  The method returns one of the following values:

Return values:

  true | | The plugin execution was successful.
  false | | An error occured while executing the plugin.

Implements SPL::slaPluginServer.

virtual void SPL_API SPL::slcPluginServer::UnloadAllPlugins | ( | const slcPluginArgs * | a_pPluginArgs = `NULL` | ) | `[virtual]`

Unloads all plugins.

Parameters:

  a_pPluginArgs | [in] Arguments for shutting down all plugins after they have been unloaded.

Implements SPL::slaPluginServer.

virtual void SPL::slcPluginServer::UnloadAllPlugins | ( | const slcPluginArgs * | a_pPluginArgs = `NULL` | ) | `[virtual]`

Unloads all plugins.

Parameters:

  a_pPluginArgs | [in] Arguments for shutting down all plugins after they have been unloaded.

Implements SPL::slaPluginServer.

virtual void SPL::slcPluginServer::UnloadAllPlugins | ( | const slcPluginArgs * | a_pPluginArgs = `NULL` | ) | `[virtual]`

Unloads all plugins.

Parameters:

  a_pPluginArgs | [in] Arguments for shutting down all plugins after they have been unloaded.

Implements SPL::slaPluginServer.

virtual bool SPL::slcPluginServer::UnloadPlugin | ( | const long | a_lIndex,
|  | bool | shutdown_plugin,
|  | const slcPluginArgs * | a_pPluginArgs = `NULL`
| ) |  | `[virtual]`

Unloads a plugin with the given index (0-based).

Parameters:

  a_lIndex | [in] The plugin's index.
  shutdown_plugin | Run the plugin's shutdown function before unloading it.
  a_pPluginArgs | [in] Pointer to plugin's shutdown function arguments.

Returns:
  The method returns one of the following values:

Return values:

  true | | The plugin was unloaded successfully.
  false | | Could not unload plugin.

Implements SPL::slaPluginServer.

virtual bool SPL::slcPluginServer::UnloadPlugin | ( | const long | a_lIndex,
|  | bool | shutdown_plugin,
|  | const slcPluginArgs * | a_pPluginArgs = `NULL`
| ) |  | `[virtual]`

Unloads a plugin with the given index (0-based).

Parameters:

  a_lIndex | [in] The plugin's index.
  shutdown_plugin | Run the plugin's shutdown function before unloading it.
  a_pPluginArgs | [in] Pointer to plugin's shutdown function arguments.

Returns:
  The method returns one of the following values:

Return values:

  true | | The plugin was unloaded successfully.
  false | | Could not unload plugin.

Implements SPL::slaPluginServer.

virtual bool SPL_API SPL::slcPluginServer::UnloadPlugin | ( | const long | a_lIndex,
|  | bool | shutdown_plugin,
|  | const slcPluginArgs * | a_pPluginArgs = `NULL`
| ) |  | `[virtual]`

Unloads a plugin with the given index (0-based).

Parameters:

  a_lIndex | [in] The plugin's index.
  shutdown_plugin | Run the plugin's shutdown function before unloading it.
  a_pPluginArgs | [in] Pointer to plugin's shutdown function arguments.

Returns:
  The method returns one of the following values:

Return values:

  true | | The plugin was unloaded successfully.
  false | | Could not unload plugin.

Implements SPL::slaPluginServer.

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

- E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/libspl/include/spl_pluginserver_linux.h
- E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/libspl/include/spl_pluginserver_solaris.h
- E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/libspl/include/spl_pluginserver_win32.h
- E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/libspl/source/spl_pluginserver_linux.cpp
- E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/libspl/source/spl_pluginserver_solaris.cpp
- E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/libspl/source/spl_pluginserver_win32.cpp

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines