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/datatype/Module.cpp
22 
23  \brief This singleton defines the TerraLib Data Type module entry.
24 */
25 
26 // TerraLib
27 #include "../common/Logger.h"
28 #include "../common/TerraLib.h"
29 #include "../common/Translator.h"
30 #include "BooleanConverters.h"
31 #include "Config.h"
32 #include "DataConverterManager.h"
33 #include "Enums.h"
34 #include "IntegerConverters.h"
35 #include "Module.h"
36 #include "StringConverters.h"
37 
39 
41 {
45  };
46 
47 // initialize TerraLib singleton
49 }
50 
52 {
54 }
55 
57 {
58  /* Registering data type converters */
59 
61 
62  // Int32
75 
76  // Unsigned Int32
89 
90  // Boolean
103 
104  // String
114 
115  // TO DO: more converters...
116 
117  TE_LOG_TRACE(TE_TR("TerraLib Data Type module initialized!"));
118 }
119 
121 {
123 
124  TE_LOG_TRACE(TE_TR("TerraLib Data Type module finalized!"));
125 }
#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
static void finalize()
This is the cleanup function for the TerraLib DataType module.
Definition: Module.cpp:120
This singleton defines the TerraLib Data Type module entry.
AbstractData * BooleanToStringConverter(AbstractData *d)
It converts an Boolean data value to a string data value.
AbstractData * StringToDoubleConverter(AbstractData *d)
It converts an String data value to a double data value.
AbstractData * StringToUInt32Converter(AbstractData *d)
It converts an String data value to an unsigned Int32 data value.
#define TE_DATATYPE_MODULE_NAME
Definition: Config.h:32
AbstractData * BooleanToInt64Converter(AbstractData *d)
It converts an Boolean data value to a Int64 data value.
AbstractData * StringToUInt16Converter(AbstractData *d)
It converts an String data value to an unsigned Int16 data value.
Module()
The singleton constructor is not callable outside the class.
Definition: Module.cpp:40
AbstractData * BooleanToInt16Converter(AbstractData *d)
It converts an Boolean data value to a Int16 data value.
A singleton for managing the data type converter available in the system.
AbstractData * Int32ToBooleanConverter(AbstractData *d)
It converts an Int32 data value to a boolean data value.
AbstractData * UInt32ToBooleanConverter(AbstractData *d)
It converts an unsigned Int32 data value to a boolean data value.
static void initialize()
This is the startup function for the TerraLib DataType module.
Definition: Module.cpp:56
void add(int src, int dst, DataTypeConverter conv)
It adds a converter to the list of known data type mappings.
AbstractData * UInt32ToStringConverter(AbstractData *d)
It converts an unsigned Int32 data value to a string data value.
AbstractData * Int32ToStringConverter(AbstractData *d)
It converts an Int32 data value to a string data value.
#define TE_TR(message)
It marks a string in order to get translated.
Definition: Translator.h:347
AbstractData * BooleanToDoubleConverter(AbstractData *d)
It converts an Boolean data value to a double data value.
AbstractData * BooleanToUInt16Converter(AbstractData *d)
It converts an Boolean data value to an unsigned Int16 data value.
AbstractData * Int32ToCharConverter(AbstractData *d)
It converts an Int32 data value to a char data value.
AbstractData * UInt32ToUInt16Converter(AbstractData *d)
It converts an unsigned Int32 data value to an unsigned Int16 data value.
AbstractData * BooleanToFloatConverter(AbstractData *d)
It converts an Boolean data value to a float data value.
AbstractData * BooleanToUInt32Converter(AbstractData *d)
It converts an Boolean data value to an unsigned Int32 data value.
AbstractData * Int32ToDoubleConverter(AbstractData *d)
It converts an Int32 data value to a double value.
Configuration flags for the DataType module of TerraLib.
AbstractData * UInt32ToInt32Converter(AbstractData *d)
It converts an unsigned Int32 data value to an Int32 data value.
AbstractData * BooleanToUInt64Converter(AbstractData *d)
It converts an Boolean data value to an unsigned Int64 data value.
AbstractData * StringToFloatConverter(AbstractData *d)
It converts an String data value to a float data value.
AbstractData * StringToInt16Converter(AbstractData *d)
It converts an String data value to a Int16 data value.
static Module & getInstance()
It returns a reference to the singleton instance.
A singleton for managing the data type converter available in the system.
AbstractData * BooleanToNumericConverter(AbstractData *d)
It converts an Boolean data value to a Numeric data value.
AbstractData * BooleanToCharConverter(AbstractData *d)
It converts an Boolean data value to a char data value.
AbstractData * UInt32ToFloatConverter(AbstractData *d)
It converts an unsigned Int32 data value to a float value.
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
AbstractData * UInt32ToNumericConverter(AbstractData *d)
It converts an unsigned Int32 data value to Numeric data value.
AbstractData * Int32ToUInt32Converter(AbstractData *d)
It converts an Int32 data value to an unsigned Int32 data value.
AbstractData * UInt32ToInt16Converter(AbstractData *d)
It converts an unsigned Int32 data value to a Int16 data value.
AbstractData * UInt32ToCharConverter(AbstractData *d)
It converts an unsigned Int32 data value to a char data value.
AbstractData * Int32ToNumericConverter(AbstractData *d)
It converts an Int32 data value to Numeric data value.
void add(const Module &m)
It registers the module in the TerraLib Platform.
Definition: TerraLib.cpp:95
A set of function that convert an Integer type to other types.
AbstractData * Int32ToInt64Converter(AbstractData *d)
It converts an Int32 data value to a Int64 data value.
AbstractData * StringToInt64Converter(AbstractData *d)
It converts an String data value to a Int64 data value.
AbstractData * BooleanToInt32Converter(AbstractData *d)
It converts an Boolean data value to a Int32 data value.
A set of function that convert an Boolean type to other types.
AbstractData * UInt32ToUInt64Converter(AbstractData *d)
It converts an unsigned Int32 data value to an unsigned Int64 data value.
AbstractData * Int32ToFloatConverter(AbstractData *d)
It converts an Int32 data value to a float value.
AbstractData * UInt32ToDoubleConverter(AbstractData *d)
It converts an unsigned Int32 data value to a double value.
General enumerations for the data type module.
This internal structure is used to model the basic information about a TerraLib module.
Definition: TerraLib.h:97
AbstractData * BooleanToUCharConverter(AbstractData *d)
It converts an Boolean data value to an unsigned char data value.
AbstractData * StringToInt32Converter(AbstractData *d)
It converts an String data value to a Int32 data value.
This singleton defines the TerraLib Data Type module entry.
Definition: Module.h:41
AbstractData * Int32ToUInt16Converter(AbstractData *d)
It converts an Int32 data value to an unsigned Int16 data value.
A set of function that convert an String type to other types.
AbstractData * Int32ToInt16Converter(AbstractData *d)
It converts an Int32 data value to a Int16 data value.
AbstractData * StringToUInt64Converter(AbstractData *d)
It converts an String data value to an unsigned Int64 data value.
void clear()
Clear the container.
AbstractData * Int32ToUInt64Converter(AbstractData *d)
It converts an Int32 data value to an unsigned Int64 data value.
AbstractData * UInt32ToUCharConverter(AbstractData *d)
It converts an unsigned Int32 data value to an unsigned char data value.
AbstractData * StringToNumericConverter(AbstractData *d)
It converts an String data value to a Numeric data value.
AbstractData * UInt32ToInt64Converter(AbstractData *d)
It converts an unsigned Int32 data value to a Int64 data value.
AbstractData * Int32ToUCharConverter(AbstractData *d)
It converts an Int32 data value to an unsigned char data value.