marble
#include <GeoWriter.h>
Public Member Functions | |
GeoWriter () | |
void | setDocumentType (const QString &documentType) |
bool | write (QIODevice *device, const GeoNode *feature) |
void | writeElement (const QString &namespaceUri, const QString &key, const QString &value) |
void | writeElement (const QString &key, const QString &value) |
void | writeOptionalElement (const QString &key, const QString &value, const QString &defaultValue=QString()) |
Detailed Description
Standard Marble way of writing XML This class is intended to be a standardised way of writing XML for marble.
It works with the GeoData classes and writes XML based on the type of output format that the writer is currently working with.
Definition at line 28 of file GeoWriter.h.
Constructor & Destructor Documentation
Marble::GeoWriter::GeoWriter | ( | ) |
Definition at line 22 of file GeoWriter.cpp.
Member Function Documentation
void Marble::GeoWriter::setDocumentType | ( | const QString & | documentType | ) |
Set the current document type.
The current Document Type defines which set of handlers are to be used when writing the GeoDocument. This string should correspond with the string used to register the required Tag Writers in
- See also
- GeoTagWriter
Definition at line 79 of file GeoWriter.cpp.
bool Marble::GeoWriter::write | ( | QIODevice * | device, |
const GeoNode * | feature | ||
) |
The main API call to use the XML writer.
To use the XML writer you need to provide an IODevice to write the XML to and a QList of GeoDataFeatures which contains the data you wish to write. To define the type of XML document that is to be written you need to set the current Document Type for this GeoWriter. See
- See also
- setDocumentType()
Definition at line 28 of file GeoWriter.cpp.
void Marble::GeoWriter::writeElement | ( | const QString & | namespaceUri, |
const QString & | key, | ||
const QString & | value | ||
) |
Convenience method to write <key>value</key> with key prefixed format namespaceUri
.
Definition at line 84 of file GeoWriter.cpp.
void Marble::GeoWriter::writeElement | ( | const QString & | key, |
const QString & | value | ||
) |
Convenience method to write <key>value</key>
Definition at line 91 of file GeoWriter.cpp.
void Marble::GeoWriter::writeOptionalElement | ( | const QString & | key, |
const QString & | value, | ||
const QString & | defaultValue = QString() |
||
) |
Convenience method to write <key>value</key> if value is not equal to defaultValue.
Otherwise, nothing is written.
Definition at line 98 of file GeoWriter.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:38:56 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.