All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 "CharEncodingConv.h"
28 #include "Enums.h"
29 #include "LibraryManager.h"
30 #include "Logger.h"
31 #include "Module.h"
32 #include "PlatformUtils.h"
33 #include "TerraLib.h"
34 #include "Translator.h"
35 #include "UnitsOfMeasureManager.h"
36 
37 // STL
38 #include <cstdlib>
39 
40 #if TE_USE_GNU_TEXT_UTILITIES
41 // GNU Text Utilities -> it is not true for now!
42 #include <locale.h>
43 #endif
44 
46 
48 {
52  };
53 
54 // initialize TerraLib singleton
56 
57 // let's start all singletons in the right order and other stuffs that must be in the static initialization!
58 
59 // initialize the translator singleton and the common runtime multilanguage support
61 
62 // initialize the singleton LibraryManager
64 
65 // initialize the singleton UnitsOfMeasureManager
67 }
68 
70 {
72 }
73 
75 {
76 #ifdef TERRALIB_AUTOMATIC_INITIALIZATION
78 #endif
79 
81 
82  TE_LOG_TRACE(TE_TR("TerraLib Common Runtime initialized!"));
83 }
84 
86 {
87  TE_LOG_TRACE(TE_TR("TerraLib Common Runtime finalized!"));
88 
89 #ifdef TERRALIB_AUTOMATIC_INITIALIZATION
91 #endif
92 }
93 
94 
#define TE_LOG_TRACE(msg)
Use this tag in order to log a message to a specified logger with the TRACE level.
Definition: Logger.h:137
Module()
The singleton constructor will make some initializations.
Definition: Module.cpp:47
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.
#define TERRALIB_TEXT_DOMAIN_DIR
It contains the translation catalog directory.
Definition: Translator.h:291
This singleton defines an entry in the Platform for the TerraLib Common Runtime module.
static void initialize()
It initializes the CharEncoding Converter.
This singleton defines an entry in the Platform for the TerraLib Common Runtime module.
Definition: Module.h:50
void clear()
Removes all units from the catalogue.
#define TE_TR(message)
It marks a string in order to get translated.
Definition: Translator.h:347
static void finalize()
This is the cleanup function for the TerraLib Common Runtime module.
Definition: Module.cpp:85
static Module & getInstance()
It returns a reference to the singleton instance.
#define TE_ADD_TEXT_DOMAIN(domain, domaindir, codeset)
It adds the given text domain located at domain-dir with the given codeset to the multilingual system...
Definition: Translator.h:310
General enumerations.
void remove(const std::string &moduleName)
It removes the module entry identified by the given name.
Definition: TerraLib.cpp:101
const te::addressgeocoding::Module & sm_module
Definition: Module.cpp:33
A singleton that can be used to observe the available libraries in the system.
void add(const Module &m)
It registers the module in the TerraLib Platform.
Definition: TerraLib.cpp:95
A class that deals with character encoding/decoding.
This class is designed for dealing with multi-language text translation in TerraLib.
#define TE_COMMON_MODULE_NAME
Definition: Config.h:34
This class is designed to manage the log of information in TerraLib.
This internal structure is used to model the basic information about a TerraLib module.
Definition: TerraLib.h:97
#define TERRALIB_TEXT_DOMAIN
It contains the name of the text domain used in the translation of messages in TerraLib.
Definition: Translator.h:284
static void initialize()
This is the startup function for the TerraLib Common Runtime module.
Definition: Module.cpp:74