26#ifndef __TERRALIB_COMMON_INTERNAL_TERRALIB_H
27#define __TERRALIB_COMMON_INTERNAL_TERRALIB_H
82 typedef void (*StartupFptr)(void);
89 typedef void (*CleanupFptr)(void);
100 Module(std::string name, StartupFptr startFptr, CleanupFptr cleanupFptr)
103 m_startFptr = startFptr;
104 m_cleanupFptr = cleanupFptr;
203 void add(std::weak_ptr<Module> m);
210 void remove(
const std::string& moduleName);
Template support for singleton pattern.
An utility class to control the startup and cleanup of the TerraLib Platform and its resources.
std::size_t getNumRegModules() const
It returns the number of registered modules.
void remove(const std::size_t i)
It removes the i-th module entry.
void initializeTranslations()
This static function is invoked automatically when the application finishes its execution.
TerraLib()
The singleton constructor is not callable outside the class.
std::vector< bool > m_initialized
The list of modules to be initialized when initialize is called.
void remove(const std::string &moduleName)
It removes the module entry identified by the given name.
void initialize()
It initializes the TerraLib Platform.
void finalize()
It finalizes the TerraLib Platform.
const std::string & getModuleName(std::size_t i) const
It return the i-th module name.
void add(std::weak_ptr< Module > m)
It registers the module in the TerraLib Platform.
void initialize(const std::string &moduleName)
It initializes the registered module in the TerraLib Platform.
void finalize(const std::size_t i)
It finalizes the i-th registered module in the TerraLib Platform.
std::size_t getModuleIdx(const std::string &moduleName) const
It returns the module index inside the internal data structure.
std::vector< std::weak_ptr< Module > > m_modules
The list of registered modules.
void initialize(const std::size_t i)
It initializes the i-th registered module in the TerraLib Platform.
void finalize(const std::string &moduleName)
It finalizes the registered module in the TerraLib Platform.
Template support for singleton pattern.
This internal structure is used to model the basic information about a TerraLib module.
Module(std::string name, StartupFptr startFptr, CleanupFptr cleanupFptr)
CleanupFptr m_cleanupFptr
The module finalization routine.
StartupFptr m_startFptr
The module initialization routine.
std::string m_name
The module name: an internal value used to identify the module in the system. Must be a unique value.
#define TECOMMONEXPORT
You can use this macro in order to export/import classes and functions from this module.
Proxy configuration file for TerraView (see terraview_config.h).