XMLFormatter.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/qt/af/XMLFormatter.h
22  *
23  * \brief A class for xml serialization formatting strings.
24  */
25 
26 #ifndef TE_TERRAVIEW_XMLFORMATTER_H
27 #define TE_TERRAVIEW_XMLFORMATTER_H
28 
29 #include "Config.h"
30 
32 
33 //STL
34 #include <list>
35 #include <string>
36 
37 namespace te {
38 
39  //Forward declarations
40  namespace da
41  {
42  class DataSourceInfo;
43  }
44 }
45 
46 struct ProjectMetadata;
47 
48 /*!
49  \class XMLFormatter
50 
51  \brief A class that formats strings.
52 
53  Use this class for changing strings, contained in some TerraLib objects, to XML percentage encode format and/or to human readable format. Use XML formatting before serializing the object to a XML file, for example, and human readable format after read the object from a XML.
54 
55  \ingroup af
56  */
58 {
59 public:
60 
61  /*!
62  \brief Formats the project informations.
63 
64  \param p The project.
65 
66  \param encode \a Pass true to change for XML percentage format and \a false for human readable format.
67  */
68  static void format(ProjectMetadata* p, const std::list<te::map::AbstractLayerPtr>& layers, const bool& encode);
69 
70 };
71 
72 #endif // TE_TERRAVIEW_XMLFORMATTER_H
This is the base class for Layers.
A class that formats strings.
Definition: XMLFormatter.h:57
std::string TECOMMONEXPORT encode(const traits &ts, const std::string &comp)
Encode the URI (sub) component.
URI C++ Library.
Proxy configuration file for TerraView (see terraview_config.h).
static void format(ProjectMetadata *p, const std::list< te::map::AbstractLayerPtr > &layers, const bool &encode)
Formats the project informations.