#include <xmlserializeable.h>
A class that extends this must implement the abastract methods that handle I/O.
Definition at line 26 of file xmlserializeable.h.
Public Member Functions | |
virtual | ~XMLSerializeable () |
virtual bool | toXML (QDomDocument &doc, QDomElement &elem, std::string id="")=0 |
virtual bool | toXMLFile (std::string fname, std::string docname) |
virtual bool | fromXML (QDomElement &elem)=0 |
virtual bool | fromXMLFile (std::string fname, std::string docname) |
virtual void | setCurrentVersion (std::string versionString) |
virtual void | setCurrentVersion (QDate versionQDate) |
virtual QDate | getCurrentVersion () |
virtual std::string | getCurrentVersionStr () |
Protected Member Functions | |
virtual bool | writeTextTag (QDomDocument &doc, QDomElement &elem, std::string tagName, std::string text, std::string id="") |
virtual bool | writeIntTag (QDomDocument &doc, QDomElement &elem, std::string tagName, int val, std::string id="") |
virtual bool | writeDoubleTag (QDomDocument &doc, QDomElement &elem, std::string tagName, double val, std::string id="") |
virtual std::string | readTextTag (QDomElement elem, std::string tagName="", std::string id="") |
virtual int | readIntTag (QDomElement elem, std::string tagName="", std::string id="") |
virtual double | readDoubleTag (QDomElement elem, std::string tagName="", std::string id="") |
virtual QDomElement | createBaseTag (QDomDocument &doc, QDomElement &elem, std::string id, std::string tagName) |
virtual QDomElement | getElemByTagName (QDomElement &elem, std::string name) |
virtual std::string | qDateToString (const QDate *aQDate) |
virtual bool | stringToQDate (const std::string aStrDate, QDate *aQDate) |
virtual std::string | qDateTimeToString (const QDateTime *aQDateTime) |
virtual bool | stringToQDateTime (const std::string aStrDateTime, QDateTime *aQDateTime) |
Protected Attributes | |
QDate | mCurrentVersion |
virtual XMLSerializeable::~XMLSerializeable | ( | ) | [inline, virtual] |
Definition at line 104 of file xmlserializeable.h.
bool XMLSerializeable::writeTextTag | ( | QDomDocument & | doc, | |
QDomElement & | elem, | |||
std::string | tagName, | |||
std::string | text, | |||
std::string | id = "" | |||
) | [protected, virtual] |
Definition at line 7 of file xmlserializeable.cpp.
Referenced by ViewState::toXML(), Session::toXML(), Plugin::toXML(), LineDef::toXML(), ImageState::toXML(), ImageInf::toXML(), GlacierIDDef::toXML(), and Attr::toXML().
virtual bool XMLSerializeable::writeIntTag | ( | QDomDocument & | doc, | |
QDomElement & | elem, | |||
std::string | tagName, | |||
int | val, | |||
std::string | id = "" | |||
) | [inline, protected, virtual] |
Definition at line 38 of file xmlserializeable.h.
Referenced by ZoomAttr::toXML(), ViewState::toXML(), Session::toXML(), LineDef::toXML(), ImageState::toXML(), GlacierLine::toXML(), and GlacierIDDef::toXML().
virtual bool XMLSerializeable::writeDoubleTag | ( | QDomDocument & | doc, | |
QDomElement & | elem, | |||
std::string | tagName, | |||
double | val, | |||
std::string | id = "" | |||
) | [inline, protected, virtual] |
Definition at line 49 of file xmlserializeable.h.
Referenced by ZoomAttr::toXML(), Rect::toXML(), Node::toXML(), LineDef::toXML(), ImageInf::toXML(), and GlacierIDDef::toXML().
std::string XMLSerializeable::readTextTag | ( | QDomElement | elem, | |
std::string | tagName = "" , |
|||
std::string | id = "" | |||
) | [protected, virtual] |
Definition at line 21 of file xmlserializeable.cpp.
Referenced by ViewState::fromXML(), Session::fromXML(), Plugin::fromXML(), LineDef::fromXML(), ImageState::fromXML(), ImageInf::fromXML(), GlacierIDDef::fromXML(), and Attr::fromXML().
virtual int XMLSerializeable::readIntTag | ( | QDomElement | elem, | |
std::string | tagName = "" , |
|||
std::string | id = "" | |||
) | [inline, protected, virtual] |
Definition at line 65 of file xmlserializeable.h.
Referenced by ZoomAttr::fromXML(), ViewState::fromXML(), Session::fromXML(), LineDef::fromXML(), ImageState::fromXML(), GlacierLine::fromXML(), and GlacierIDDef::fromXML().
virtual double XMLSerializeable::readDoubleTag | ( | QDomElement | elem, | |
std::string | tagName = "" , |
|||
std::string | id = "" | |||
) | [inline, protected, virtual] |
Definition at line 72 of file xmlserializeable.h.
Referenced by ZoomAttr::fromXML(), Rect::fromXML(), Node::fromXML(), LineDef::fromXML(), ImageInf::fromXML(), and GlacierIDDef::fromXML().
virtual QDomElement XMLSerializeable::createBaseTag | ( | QDomDocument & | doc, | |
QDomElement & | elem, | |||
std::string | id, | |||
std::string | tagName | |||
) | [inline, protected, virtual] |
Definition at line 79 of file xmlserializeable.h.
Referenced by ZoomAttr::toXML(), ViewState::toXML(), Session::toXML(), and MainToolbar::toXML().
QDomElement XMLSerializeable::getElemByTagName | ( | QDomElement & | elem, | |
std::string | name | |||
) | [protected, virtual] |
std::string XMLSerializeable::qDateToString | ( | const QDate * | aQDate | ) | [protected, virtual] |
Definition at line 135 of file xmlserializeable.cpp.
Referenced by getCurrentVersionStr(), qDateTimeToString(), and toXMLFile().
bool XMLSerializeable::stringToQDate | ( | const std::string | aStrDate, | |
QDate * | aQDate | |||
) | [protected, virtual] |
Definition at line 170 of file xmlserializeable.cpp.
Referenced by GLIMSProject::fromXML(), setCurrentVersion(), and stringToQDateTime().
std::string XMLSerializeable::qDateTimeToString | ( | const QDateTime * | aQDateTime | ) | [protected, virtual] |
Definition at line 149 of file xmlserializeable.cpp.
References qDateToString().
bool XMLSerializeable::stringToQDateTime | ( | const std::string | aStrDateTime, | |
QDateTime * | aQDateTime | |||
) | [protected, virtual] |
Definition at line 205 of file xmlserializeable.cpp.
References stringToQDate().
virtual bool XMLSerializeable::toXML | ( | QDomDocument & | doc, | |
QDomElement & | elem, | |||
std::string | id = "" | |||
) | [pure virtual] |
Implemented in Attr, GlacierIDDef, GlacierLine, GLIMSDataset, GLIMSGIDData, GLIMSLineData, GLIMSProject, ImageInf, ImageState, LineDef, LineDefSet, MainToolbar, Plugin, PluginSet, Session, Node, Line, Rect, SimpleLineData, SimplePointData, VectorData, ViewState, and ZoomAttr.
Referenced by toXMLFile().
bool XMLSerializeable::toXMLFile | ( | std::string | fname, | |
std::string | docname | |||
) | [virtual] |
Definition at line 87 of file xmlserializeable.cpp.
References mCurrentVersion, qDateToString(), and toXML().
Referenced by MainToolbar::closeEvent(), LineSelectorDlg::exportFile(), PluginSet::importPlugin(), GLIMSProject::save(), GLIMSProject::saveAs(), and MainToolbar::~MainToolbar().
virtual bool XMLSerializeable::fromXML | ( | QDomElement & | elem | ) | [pure virtual] |
Implemented in Attr, GlacierIDDef, GlacierLine, GLIMSDataset, GLIMSGIDData, GLIMSLineData, GLIMSProject, ImageInf, ImageState, LineDef, LineDefSet, MainToolbar, Plugin, PluginSet, Session, Node, Line, Rect, SimpleLineData, SimplePointData, VectorData, ViewState, and ZoomAttr.
Referenced by fromXMLFile().
bool XMLSerializeable::fromXMLFile | ( | std::string | fname, | |
std::string | docname | |||
) | [virtual] |
Definition at line 53 of file xmlserializeable.cpp.
References fromXML().
Referenced by MainToolbar::buildViews(), LineSelectorDlg::importFile(), LineDefSet::LineDefSet(), GLIMSGlobals::loadGlobals(), GLIMSProject::open(), and PluginSet::PluginSet().
void XMLSerializeable::setCurrentVersion | ( | std::string | versionString | ) | [virtual] |
Definition at line 249 of file xmlserializeable.cpp.
References mCurrentVersion, and stringToQDate().
Referenced by MainToolbar::setupProj().
void XMLSerializeable::setCurrentVersion | ( | QDate | versionQDate | ) | [virtual] |
QDate XMLSerializeable::getCurrentVersion | ( | ) | [virtual] |
std::string XMLSerializeable::getCurrentVersionStr | ( | ) | [virtual] |
Definition at line 262 of file xmlserializeable.cpp.
References mCurrentVersion, and qDateToString().
QDate XMLSerializeable::mCurrentVersion [protected] |
Definition at line 29 of file xmlserializeable.h.
Referenced by getCurrentVersion(), getCurrentVersionStr(), setCurrentVersion(), and toXMLFile().
Home |
Search |
Disclaimers & Privacy |
Contact Us GLIMSView Maintainer: dsoltesz@usgs.gov |