A class that formats strings. More...
#include <XMLFormatter.h>
Static Public Member Functions | |
| static void | format (te::map::AbstractLayer *l, const bool &encode) |
| Formats the layer informations. More... | |
| static void | format (te::da::DataSourceInfo *d, const bool &encode) |
| Formats the data source informations. More... | |
| static std::string | format (const std::string &s, const bool &encode) |
| Formats the string. More... | |
| static void | formatDataSourceInfos (const bool &encode) |
| Formats all data source informations registered in the te::da::DataSourceInfoManager object. More... | |
A class that formats strings.
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.
Definition at line 58 of file terralib/qt/af/XMLFormatter.h.
|
static |
Formats the layer informations.
| l | The layer. |
| encode | Pass true to change for XML percentage format and false for human readable format. |
Definition at line 30 of file terralib/qt/af/XMLFormatter.cpp.
References te::common::uri::urisyn::encode(), te::common::TreeItem::getChildren(), te::map::AbstractLayer::getDataSetName(), te::map::AbstractLayer::getTitle(), te::map::AbstractLayer::getType(), te::map::AbstractLayer::setDataSetName(), and te::map::AbstractLayer::setTitle().
Referenced by XMLFormatter::format(), format(), and formatDataSourceInfos().
|
static |
Formats the data source informations.
| d | The data source info. |
| encode | Pass true to change for XML percentage format and false for human readable format. |
Definition at line 51 of file terralib/qt/af/XMLFormatter.cpp.
References te::common::uri::urisyn::encode(), format(), te::da::DataSourceInfo::getConnInfo(), te::da::DataSourceInfo::getDescription(), te::da::DataSourceInfo::getTitle(), te::core::URI::host(), te::core::URI::path(), te::da::DataSourceInfo::setDescription(), and te::da::DataSourceInfo::setTitle().
|
static |
Formats the string.
| s | The string. |
| encode | Pass true to change for XML percentage format and false for human readable format. |
Definition at line 73 of file terralib/qt/af/XMLFormatter.cpp.
|
static |
Formats all data source informations registered in the te::da::DataSourceInfoManager object.
| encode | Pass true to change for XML percentage format and false for human readable format. |
Definition at line 63 of file terralib/qt/af/XMLFormatter.cpp.
References te::common::uri::urisyn::encode(), format(), and te::common::Singleton< DataSourceInfoManager >::getInstance().
Referenced by TerraView::init(), te::qt::af::ApplicationController::initialize(), TerraView::onSaveProjectTriggered(), TerraView::openProject(), and te::qt::af::SaveDataSourcesFile().