src/terralib/common/Module.cpp
Go to the documentation of this file.
1 /* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2 
3  This file is part of the TerraLib - a Framework for building GIS enabled applications.
4 
5  TerraLib is free software: you can redistribute it and/or modify
6  it under the terms of the GNU Lesser General Public License as published by
7  the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  TerraLib is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public License
16  along with TerraLib. See COPYING. If not, write to
17  TerraLib Team at <terralib-team@terralib.org>.
18  */
19 
20 /*!
21  \file terralib/common/Module.cpp
22 
23  \brief This singleton defines an entry in the Platform for the TerraLib Common Runtime module.
24 */
25 
26 // TerraLib
27 #include "Enums.h"
28 #include "../core/lib/LibraryManager.h"
29 #include "../core/logger/Logger.h"
30 #include "Module.h"
31 #include "PlatformUtils.h"
32 #include "TerraLib.h"
33 #include "../core/translator/Translator.h"
34 #include "UnitsOfMeasureManager.h"
35 
36 // STL
37 #include <cstdlib>
38 
39 
41 
43 {
47  };
48 
49 // initialize TerraLib singleton
51 
52 // let's start all singletons in the right order and other stuffs that must be in the static initialization!
53 
54 // initialize the translator singleton and the common runtime multilanguage support
55 // TE_ADD_TEXT_DOMAIN("terralib_mod_common");
56 
57 // initialize the singleton LibraryManager
58 // LibraryManager::getInstance();
59 
60 // initialize the singleton UnitsOfMeasureManager
62 }
63 
65 {
67 }
68 
70 {
71 #ifdef TERRALIB_AUTOMATIC_INITIALIZATION
73 #endif
74 
75  TE_LOG_TRACE(TE_TR("TerraLib Common Runtime initialized!"));
76 }
77 
79 {
80  TE_LOG_TRACE(TE_TR("TerraLib Common Runtime finalized!"));
81 
82 #ifdef TERRALIB_AUTOMATIC_INITIALIZATION
84 #endif
85 }
86 
87 
Module()
The singleton constructor will make some initializations.
An utility class to control the startup and cleanup of the TerraLib Platform and its resources...
This file is a wrapper around platform specific include files.
void init()
It initializes the list of well kown units of measure.
A singleton class for dealing with units-of-measure.
This singleton defines an entry in the Platform for the TerraLib Common Runtime module.
void clear()
Removes all units from the catalogue.
#define TE_TR(message)
It marks a string in order to get translated.
Definition: Translator.h:242
const te::common::Module & sm_module
static void finalize()
This is the cleanup function for the TerraLib Common Runtime module.
static Module & getInstance()
It returns a reference to the singleton instance.
void remove(const std::string &moduleName)
It removes the module entry identified by the given name.
#define TE_COMMON_MODULE_NAME
void add(const Module &m)
It registers the module in the TerraLib Platform.
General enumerations.
#define TE_LOG_TRACE(message)
Use this tag in order to log a message to the TerraLib default logger with the TRACE level...
Definition: Logger.h:293
This singleton defines an entry in the Platform for the TerraLib Common Runtime module.
This internal structure is used to model the basic information about a TerraLib module.
static void initialize()
This is the startup function for the TerraLib Common Runtime module.