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 
52  namespace serialize
53  {
54  TEMAPEXPORT te::map::Visibility GetVisibility(const std::string& visible);
55 
56  TEMAPEXPORT std::string GetVisibility(const te::map::Visibility& visible);
57 
58  TEMAPEXPORT te::map::GroupingType GetGroupingType(const std::string& type);
59 
60  TEMAPEXPORT std::string GetGroupingType(const te::map::GroupingType& type);
61 
62  TEMAPEXPORT std::string ReadLayerTitle(te::xml::Reader& reader);
63 
64  TEMAPEXPORT std::string ReadLayerEncoding(te::xml::Reader& reader);
65 
66  TEMAPEXPORT std::string ReadDataSetName(te::xml::Reader& reader);
67 
68  TEMAPEXPORT std::string ReadDataSourceId(te::xml::Reader& reader);
69 
70  TEMAPEXPORT std::string ReadLayerVisibility(te::xml::Reader& reader);
71 
73 
75 
76  TEMAPEXPORT std::auto_ptr<te::map::Chart> ReadLayerChart(te::xml::Reader& reader);
77 
79 
81 
83 
84  } //end namespace serialize
85  } // end namespace map
86 } // end namespace te
87 
88 #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:76
A wdiget used to customize a chart'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)
TEMAPEXPORT te::map::Visibility GetVisibility(const std::string &visible)
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
TEMAPEXPORT std::auto_ptr< te::map::Chart > ReadLayerChart(te::xml::Reader &reader)
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::GroupingType GetGroupingType(const std::string &type)
GroupingType
The grouping type associated to the layer.
Definition: Enums.h:151
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)
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)