26#ifndef __TERRALIB_COMMON_INTERNAL_TERRALIB_H
27#define __TERRALIB_COMMON_INTERNAL_TERRALIB_H
203 void add(std::weak_ptr<Module> m);
210 void remove(
const std::string& moduleName);
Template support for singleton pattern.
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(* StartupFptr)(void)
This is the type for call back functions that makes the startup of a module.
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.
void(* CleanupFptr)(void)
This is the type for call back functions that makes the cleanup of a module.
Template support for singleton pattern.
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.
Configuration flags for the TerraLib Common Runtime module.
#define TECOMMONEXPORT
You can use this macro in order to export/import classes and functions from this module.