| TerraLib 4.1

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

- File List
- File Members

E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/drivers/spl/PluginsManager.h
Go to the documentation of this file.

    00001 /************************************************************************************
    00002 TerraView - visualization and exploration of geographical databases
    00003 using TerraLib.
    00004 Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
    00005 This file is part of TerraView. TerraView is free software; you can redistribute it
    00006 and/or modify it under the terms of the GNU General Public License as published by
    00007 the Free Software Foundation; either version 2 of the License, or
    00008 (at your option) any later version.
    00009
    00010 You should have received a copy of the GNU General Public License
    00011 along with TerraView.
    00012 The authors reassure the license terms regarding the warranties.
    00013 They specifically disclaim any warranties, including, but not limited to,
    00014 the implied warranties of merchantability and fitness for a particular purpose.
    00015 The software provided hereunder is on an "as is" basis, and the authors have no
    00016 obligation to provide maintenance, support, updates, enhancements, or modifications.
    00017 In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
    00018 indirect, special, incidental, or consequential damages arising out of the use of
    00019 this program and its documentation.
    00020 *************************************************************************************/
    00021
    00022 #ifndef PLUGINSMANAGER_H
    00023   #define PLUGINSMANAGER_H
    00024
    00025   #include "../../../libspl/spl.h"
    00026   #include "PluginInfo.h"
    00027   #include "PluginParameters.h"
    00028
    00029   #include <string>
    00030   #include <vector>
    00031
    00032   #include "TeSPLDefines.h"
    00033
    00034 /* This is to enable the error messages when loading plugins for debug mode  */
    00035 #ifndef NDEBUG
    00036   #if SPL_PLATFORM == SPL_PLATFORM_WIN32
    00037     #include <windows.h>
    00038   #elif SPL_PLATFORM == SPL_PLATFORM_LINUX
    00039     #include <dlfcn.h>
    00040   #else
    00041     #error "Unsuported Plataform"
    00042   #endif
    00043 #endif
    00044
    00049   class TLSPL_DLL PluginsManager
    00050   {
    00051     public :
    00052
    00056       PluginsManager();
    00057
    00061       virtual ~PluginsManager();
    00062
    00067       virtual void setDefaultPluginsParameters( const PluginParameters& pp );
    00068
    00075       virtual unsigned int loadPlugins( const std::string& path );
    00076
    00080       virtual void unloadPlugins();
    00081
    00087       virtual bool runPlugin( const PluginInfo& pinfo ) const;
    00088
    00094       virtual void getValidPluginsList( std::vector< PluginInfo >& plist ) const;
    00095
    00101       virtual void getInvalidPluginsList( std::vector< PluginInfo >& plist ) const;
    00102
    00103     protected :
    00104
    00109       typedef std::pair< PluginInfo, long > SPLPluginInfoT;
    00110
    00114       void* pluginServerHandlerPtr_;
    00115
    00119       std::vector< SPLPluginInfoT > valid_plugins_;
    00120
    00124       std::vector< SPLPluginInfoT > invalid_plugins_;
    00125
    00130       PluginParameters default_pp_;
    00131   };
    00132
    00133 #endif

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines