All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 ReadLayerVisibility(te::xml::Reader& reader);
65 
67 
69 
70  TEMAPEXPORT std::auto_ptr<te::map::Chart> ReadLayerChart(te::xml::Reader& reader);
71 
73 
75 
77 
78  } //end namespace serialize
79  } // end namespace map
80 } // end namespace te
81 
82 #endif // __TERRALIB_MAPTOOLS_SERIALIZATION_XML_INTERNAL_UTILS_H
TEMAPEXPORT std::string ReadLayerVisibility(te::xml::Reader &reader)
Definition: Utils.cpp:106
TEMAPEXPORT void WriteAbstractLayer(const te::map::AbstractLayer *layer, te::xml::AbstractWriter &writer)
Definition: Utils.cpp:582
TEMAPEXPORT te::map::GroupingItem * ReadGroupingItem(te::xml::Reader &reader)
Definition: Utils.cpp:211
This class models a XML reader object.
Definition: Reader.h:55
This is the base class for layers.
Definition: AbstractLayer.h:76
TEMAPEXPORT std::auto_ptr< te::map::Chart > ReadLayerChart(te::xml::Reader &reader)
Definition: Utils.cpp:290
A wdiget used to customize a chart's style parameters.
TEMAPEXPORT std::string ReadLayerTitle(te::xml::Reader &reader)
Definition: Utils.cpp:93
TEMAPEXPORT void WriteLayerGrouping(te::map::Grouping *g, te::xml::AbstractWriter &writer)
Definition: Utils.cpp:535
This class models a XML writer object.
TEMAPEXPORT te::map::Grouping * ReadLayerGrouping(te::xml::Reader &reader)
Definition: Utils.cpp:119
This class contains the parameters needed for grouping the values of a Property.
Definition: Grouping.h:59
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 te::map::GroupingType GetGroupingType(const std::string &type)
Definition: Utils.cpp:56
#define TEMAPEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:63
TEMAPEXPORT te::map::Visibility GetVisibility(const std::string &visible)
Definition: Utils.cpp:42
GroupingType
The grouping type associated to the layer.
Definition: Enums.h:150
Visibility
Each layer can have three states of visibility.
Definition: Enums.h:138
TEMAPEXPORT void WriteLayerChart(te::map::Chart *chart, te::xml::AbstractWriter &writer)
Definition: Utils.cpp:494
A class that models a XML writer object built on top of Xerces-C++.