Loading...
Searching...
No Matches
Module.h
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 Module.h
22
23 \brief This singleton defines the TerraLib Qt Widgets module entry.
24*/
25
26#ifndef __TERRALIB_QTWIDGETS_INTERNAL_MODULE_H
27#define __TERRALIB_QTWIDGETS_INTERNAL_MODULE_H
28
29// TerraLib
30#include "../../common/Singleton.h"
31#include "../../common/TerraLib.h"
32
33//QT
34#include <QMetaType>
35
36//STL
37#include <memory>
38
39Q_DECLARE_METATYPE(std::string)
40
41namespace te
42{
43 namespace qt
44 {
45 namespace widgets
46 {
47 /*!
48 \class Module
49
50 \brief This singleton defines the TerraLib Qt Widgets module entry.
51 */
52 class Module : public te::common::Singleton<Module>
53 {
54 friend class te::common::Singleton<Module>;
55
56 protected:
57
58 /*! \brief The singleton constructor is not callable outside the class. */
60
61 /* \brief Destructor. */
63
64 private:
65
66 /*!
67 \brief This is the startup function for the TerraLib Qt Widgets module.
68
69 \note This method doesn't perform operations for this module.
70 */
71 static void initialize();
72
73 /*!
74 \brief This is the cleanup function for the TerraLib Qt Widgets module.
75
76 \note This method doesn't perform operations for this module.
77 */
78 static void finalize();
79
80 public:
81
82 static const char* sm_pngFmt;
83 static const char* sm_jpegFmt;
84 static const char* sm_gifFmt;
85 static const char* sm_bmpFmt;
86 static const char* sm_xpmFmt;
87 static const char* sm_xbmFmt;
88 static const char* sm_unknownFmt;
89
90 private:
91
92 static const Module& sm_module; //!< Just to make a static initialization.
93 std::shared_ptr<TerraLib::Module> m_module;
94 };
95
96 } // end namespace widgets
97 } // end namespace qt
98} // end namespace te
99
100#endif // __TERRALIB_QTWIDGETS_INTERNAL_MODULE_H
101
Template support for singleton pattern.
Definition: Singleton.h:101
This singleton defines the TerraLib Qt Widgets module entry.
Definition: Module.h:53
static const char * sm_bmpFmt
Definition: Module.h:85
static void finalize()
This is the cleanup function for the TerraLib Qt Widgets module.
static const char * sm_pngFmt
Definition: Module.h:82
static const char * sm_xbmFmt
Definition: Module.h:87
std::shared_ptr< TerraLib::Module > m_module
Definition: Module.h:93
static void initialize()
This is the startup function for the TerraLib Qt Widgets module.
static const char * sm_gifFmt
Definition: Module.h:84
static const char * sm_xpmFmt
Definition: Module.h:86
static const char * sm_unknownFmt
Definition: Module.h:88
static const char * sm_jpegFmt
Definition: Module.h:83
static const Module & sm_module
Just to make a static initialization.
Definition: Module.h:92
Module()
The singleton constructor is not callable outside the class.
TerraLib.