Loading...
Searching...
No Matches
GEOSGeometryFactory.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 terralib/geometry/GEOSGeometryFactory.h
22
23 \brief The global factory used by TerraLib in order to create GEOS geometries.
24*/
25
26#ifndef __TERRALIB_GEOMETRY_INTERNAL_GEOSGEOMETRYFACTORY_H
27#define __TERRALIB_GEOMETRY_INTERNAL_GEOSGEOMETRYFACTORY_H
28
29// TerraLib
30#include "Config.h"
31
32// GEOS
33#ifdef TERRALIB_GEOS_ENABLED
34#include <geos/geom/GeometryFactory.h>
35
36namespace te
37{
38 namespace gm
39 {
40 /*!
41 \class GEOSGeometryFactory
42
43 \brief The global factory used by TerraLib in order to create GEOS geometries.
44
45 \sa Geometry
46 */
47 class TEGEOMEXPORT GEOSGeometryFactory
48 {
49 public:
50
51 /*!
52 \brief It returns the global Geometry factory used in TerraLib.
53
54 \return The global Geometry Factory used in TerraLib.
55 */
56 static const geos::geom::GeometryFactory* getGeomFactory();
57
58 /** @name Factory Initialization Methods
59 * Methods to control the startup and finish of the global Geometry Factory.
60 */
61 //@{
62
63 /*! \brief It starts up the global Factory. This method will be automatically called by Geometry Platform class initialization. */
64 static void initialize();
65
66 /*! \brief It terminates the global Factory. This method will be automatically called by Geometry Platform class finalization. */
67 static void finalize();
68
69 //@}
70
71 private:
72
73 /** @name Not Instantiable
74 * You can not create objects from this Class.
75 */
76 //@{
77
78 /*! Private construtor: not instantiable. */
79 GEOSGeometryFactory();
80
81 //@}
82
83 private:
84
85 static const geos::geom::GeometryFactory* sm_gFactory; //!< The global Geometry Factory.
86 };
87
88 inline const geos::geom::GeometryFactory* GEOSGeometryFactory::getGeomFactory()
89 {
90 return sm_gFactory;
91 }
92
93 } // end namespace gm
94} // end namespace te
95
96#endif // TERRALIB_GEOS_ENABLED
97#endif // __TERRALIB_GEOMETRY_INTERNAL_GEOSGEOMETRYFACTORY_H
98
TerraLib.
#define TEGEOMEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:76
Proxy configuration file for TerraView (see terraview_config.h).