LibraryManager.h File Reference

A singleton that can be used to observe the available shared libraries in the system. More...

#include "../Config.h"
#include <string>
#include <boost/function.hpp>

Go to the source code of this file.

Classes

struct  te::core::LibraryEntry
 
class  te::core::LibraryManager
 A singleton that can be used to observe the available libraries in the system. More...
 

Namespaces

 te
 URI C++ Library.
 
 te::core
 

Macros

#define TERRALIB_LIBRARY_BEGIN(library_name)
 
#define TERRALIB_LIBRARY_END(library_name)
 
#define TERRALIB_LIBRARY_SHUTDOWN   void shutdown()
 
#define TERRALIB_LIBRARY_STARTUP   void startup()
 

Typedefs

typedef boost::function0< void > te::core::CleanupFnct
 
typedef boost::function0< void > te::core::StartupFnct
 

Detailed Description

A singleton that can be used to observe the available shared libraries in the system.

Author
Gilberto Ribeiro de Queiroz
Matheus Cavassan Zaglia

Definition in file LibraryManager.h.

Macro Definition Documentation

#define TERRALIB_LIBRARY_BEGIN (   library_name)
Value:
class library_ ## library_name \
{ \
public: \
\
library_ ## library_name() \
{ \
LibraryEntry le = {#library_name, \
startup, \
shutdown \
}; \
\
te::core::LibraryManager::instance().insert(le); \
} \
\
~library_ ## library_name() \
{\
if(te::core::LibraryManager::instance().exists(#library_name))\
{\
te::core::LibraryManager::instance().get(#library_name).shutdown();\
te::core::LibraryManager::instance().remove(#library_name);\
}\
}
static LibraryManager & instance()
It returns a reference to the singleton instance.

Definition at line 162 of file LibraryManager.h.

#define TERRALIB_LIBRARY_END (   library_name)
Value:
}; \
\
static library_ ## library_name s_lib;

Definition at line 193 of file LibraryManager.h.

#define TERRALIB_LIBRARY_SHUTDOWN   void shutdown()

Definition at line 190 of file LibraryManager.h.

#define TERRALIB_LIBRARY_STARTUP   void startup()

Definition at line 187 of file LibraryManager.h.