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;
140 void initialize(
const std::size_t i);
153 void initialize(
const std::string& moduleName);
180 void finalize(
const std::size_t i);
193 void finalize(
const std::string& moduleName);
203 void add(std::weak_ptr<Module> m);
210 void remove(
const std::string& moduleName);
217 void remove(
const std::size_t i);
224 std::size_t getNumRegModules()
const;
233 std::size_t getModuleIdx(
const std::string& moduleName)
const;
242 const std::string& getModuleName(std::size_t i)
const;
276 #endif // __TERRALIB_COMMON_INTERNAL_TERRALIB_H std::string m_name
The module name: an internal value used to identify the module in the system. Must be a unique value...
std::vector< std::weak_ptr< Module > > m_modules
This static function is invoked automatically when the application finishes its execution.
Configuration flags for the TerraLib Common Runtime module.
CleanupFptr m_cleanupFptr
The module finalization routine.
Module(std::string name, StartupFptr startFptr, CleanupFptr cleanupFptr)
Template support for singleton pattern.
StartupFptr m_startFptr
The module initialization routine.
#define TECOMMONEXPORT
You can use this macro in order to export/import classes and functions from this module.
std::vector< bool > m_initialized
The list of modules to be initialized when initialize is called.
This internal structure is used to model the basic information about a TerraLib module.
An utility class to control the startup and cleanup of the TerraLib Platform and its resources...
Template support for singleton pattern.