Utils.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 src/terralib/maptools/serialization/xml/Utils.h
22 
23  \brief Auxiliary functions to read layer information from a XML document.
24 */
25 
26 #ifndef __TERRALIB_MAPTOOLS_SERIALIZATION_XML_INTERNAL_UTILS_H
27 #define __TERRALIB_MAPTOOLS_SERIALIZATION_XML_INTERNAL_UTILS_H
28 
29 // TerraLib
30 #include "../../Enums.h"
31 #include "../../Config.h"
32 
33 // STL
34 #include <string>
35 #include <memory>
36 
37 namespace te
38 {
39  namespace xml
40  {
41  class AbstractWriter;
42  class Reader;
43  }
44 
45  namespace map
46  {
47  class AbstractLayer;
48  class Chart;
49  class Grouping;
50  class GroupingItem;
51  class RasterContrast;
52 
53  namespace serialize
54  {
55  TEMAPEXPORT te::map::Visibility GetVisibility(const std::string& visible);
56 
57  TEMAPEXPORT std::string GetVisibility(const te::map::Visibility& visible);
58 
59  TEMAPEXPORT te::map::GroupingType GetGroupingType(const std::string& type);
60 
61  TEMAPEXPORT std::string GetGroupingType(const te::map::GroupingType& type);
62 
63  TEMAPEXPORT std::string ReadLayerTitle(te::xml::Reader& reader);
64 
65  TEMAPEXPORT std::string ReadLayerEncoding(te::xml::Reader& reader);
66 
67  TEMAPEXPORT std::string ReadDataSetName(te::xml::Reader& reader);
68 
69  TEMAPEXPORT std::string ReadDataSourceId(te::xml::Reader& reader);
70 
71  TEMAPEXPORT std::string ReadLayerVisibility(te::xml::Reader& reader);
72 
74 
76 
78 
79  TEMAPEXPORT std::unique_ptr<te::map::Chart> ReadLayerChart(te::xml::Reader& reader);
80 
82 
84 
86 
88 
90 
91  TEMAPEXPORT void WriteSRIDValue(const int& srid, te::xml::AbstractWriter& writer);
92 
93  } //end namespace serialize
94  } // end namespace map
95 } // end namespace te
96 
97 #endif // __TERRALIB_MAPTOOLS_SERIALIZATION_XML_INTERNAL_UTILS_H
TEMAPEXPORT std::string ReadLayerVisibility(te::xml::Reader &reader)
This class models a XML reader object.
Definition: Reader.h:55
This is the base class for layers.
Definition: AbstractLayer.h:77
A wdiget used to customize a chart&#39;s style parameters.
TEMAPEXPORT void WriteLayerGrouping(te::map::Grouping *g, te::xml::AbstractWriter &writer)
This class models a XML writer object.
TEMAPEXPORT te::map::GroupingItem * ReadGroupingItem(te::xml::Reader &reader)
TEMAPEXPORT std::string ReadDataSourceId(te::xml::Reader &reader)
This class contains the parameters needed for grouping the values of a Property.
Definition: Grouping.h:59
TEMAPEXPORT te::map::Grouping * ReadLayerGrouping(te::xml::Reader &reader)
This class represents the informations needed to build map charts.
Definition: Chart.h:51
A GroupingItem contains information about a grouping item associated to a layer.
Definition: GroupingItem.h:48
TEMAPEXPORT std::string ReadLayerTitle(te::xml::Reader &reader)
URI C++ Library.
#define TEMAPEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:60
TEMAPEXPORT te::map::RasterContrast * ReadLayerRasterContrast(te::xml::Reader &reader)
This class contains the parameters needed to apply dynamic contrast over a raster.
TEMAPEXPORT void WriteSRIDValue(const int &srid, te::xml::AbstractWriter &writer)
TEMAPEXPORT std::unique_ptr< te::map::Chart > ReadLayerChart(te::xml::Reader &reader)
TEMAPEXPORT void WriteLayerRasterContrast(te::map::RasterContrast *rc, te::xml::AbstractWriter &writer)
GroupingType
The grouping type associated to the layer.
Definition: Enums.h:151
TEMAPEXPORT std::string GetGroupingType(const te::map::GroupingType &type)
TEMAPEXPORT int ReadSRIDValue(te::xml::Reader &reader)
TEMAPEXPORT void WriteLayerChart(te::map::Chart *chart, te::xml::AbstractWriter &writer)
Visibility
Each layer can have three states of visibility.
Definition: Enums.h:139
TEMAPEXPORT void WriteAbstractLayer(const te::map::AbstractLayer *layer, te::xml::AbstractWriter &writer)
TEMAPEXPORT std::string GetVisibility(const te::map::Visibility &visible)
A class that models a XML writer object built on top of Xerces-C++.
TEMAPEXPORT std::string ReadLayerEncoding(te::xml::Reader &reader)
TEMAPEXPORT std::string ReadDataSetName(te::xml::Reader &reader)