GLIMSView Source Code Documentation

LineDef Class Reference

#include <linedef.h>

Inheritance diagram for LineDef:

Inheritance graph
[legend]

List of all members.


Detailed Description

This is a glacier outline line definition that holds all information about the attributes of a glacier outline that are described in the GLIMS specifications.

Each line has a reference to zero or one of these.

History:
2007-06-14 Deborah Lee Soltesz - Confirmed all the information required by the GLIMS database is being captured and stored. Wrote validation function to confirm metadata is provided by user.
What's New:
2007-06-14 Deborah Lee Soltesz - Validation function checks for required metadata, and reports to ValidationReport. Provides warning for non-required invalid/missing items, and errors for required items.

Definition at line 27 of file linedef.h.


Public Member Functions

 LineDef ()
 Constructor.
virtual bool fromXML (QDomElement &elem)
virtual bool toXML (QDomDocument &doc, QDomElement &elem, std::string id="")
bool operator== (LineDef &ldf)
bool operator!= (LineDef &ldf)
bool validate (ValidationReport *valRep)
 Check that this line definition has required metadata.
virtual bool toXMLFile (std::string fname, std::string docname)
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 ()

Public Attributes

int mGlacType
int mType
int mLabel
int mLMat
int mRMat
float mLXUncert
float mLYUncert
float mGXUncert
float mGYUncert
int mLFeature
int mRFeature
int mColor
int mStyle
int mWidth
char * mName

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

Constructor & Destructor Documentation

LineDef::LineDef (  )  [inline]

Constructor.

History:
2007-06-14 dls - modified to set floats to -999.0 as recommended by Bruce Raup to make validation by GLIMSView and the ingestion procedure easier.

Definition at line 47 of file linedef.h.

References mColor, mGlacType, mGXUncert, mGYUncert, mLabel, mLFeature, mLMat, mLXUncert, mLYUncert, mName, mRFeature, mRMat, mStyle, mType, and mWidth.


Member Function Documentation

virtual bool LineDef::fromXML ( QDomElement &  elem  )  [inline, virtual]

virtual bool LineDef::toXML ( QDomDocument &  doc,
QDomElement &  elem,
std::string  id = "" 
) [inline, virtual]

bool LineDef::operator== ( LineDef ldf  )  [inline]

Definition at line 115 of file linedef.h.

References mGlacType, mGXUncert, mGYUncert, mLabel, mLFeature, mLMat, mLXUncert, mLYUncert, mName, mRFeature, mRMat, and mType.

bool LineDef::operator!= ( LineDef ldf  )  [inline]

Definition at line 133 of file linedef.h.

bool LineDef::validate ( ValidationReport valRep  )  [inline]

Check that this line definition has required metadata.

Returns:
bool true if line definition is valid, and false if not

Todo:
2007-06-13 dls LineDef::mName in validation -- What is this and is it needed/required???

Definition at line 144 of file linedef.h.

References mGlacType, mGXUncert, mGYUncert, mLabel, mLFeature, mLMat, mLXUncert, mLYUncert, mRFeature, mRMat, mType, ValidationReport::reportError(), and ValidationReport::reportWarning().

Here is the call graph for this function:

bool XMLSerializeable::writeTextTag ( QDomDocument &  doc,
QDomElement &  elem,
std::string  tagName,
std::string  text,
std::string  id = "" 
) [protected, virtual, inherited]

virtual bool XMLSerializeable::writeIntTag ( QDomDocument &  doc,
QDomElement &  elem,
std::string  tagName,
int  val,
std::string  id = "" 
) [inline, protected, virtual, inherited]

virtual bool XMLSerializeable::writeDoubleTag ( QDomDocument &  doc,
QDomElement &  elem,
std::string  tagName,
double  val,
std::string  id = "" 
) [inline, protected, virtual, inherited]

std::string XMLSerializeable::readTextTag ( QDomElement  elem,
std::string  tagName = "",
std::string  id = "" 
) [protected, virtual, inherited]

virtual int XMLSerializeable::readIntTag ( QDomElement  elem,
std::string  tagName = "",
std::string  id = "" 
) [inline, protected, virtual, inherited]

virtual double XMLSerializeable::readDoubleTag ( QDomElement  elem,
std::string  tagName = "",
std::string  id = "" 
) [inline, protected, virtual, inherited]

virtual QDomElement XMLSerializeable::createBaseTag ( QDomDocument &  doc,
QDomElement &  elem,
std::string  id,
std::string  tagName 
) [inline, protected, virtual, inherited]

QDomElement XMLSerializeable::getElemByTagName ( QDomElement &  elem,
std::string  name 
) [protected, virtual, inherited]

Definition at line 119 of file xmlserializeable.cpp.

Referenced by GlacierIDDef::fromXML().

std::string XMLSerializeable::qDateToString ( const QDate *  aQDate  )  [protected, virtual, inherited]

bool XMLSerializeable::stringToQDate ( const std::string  aStrDate,
QDate *  aQDate 
) [protected, virtual, inherited]

std::string XMLSerializeable::qDateTimeToString ( const QDateTime *  aQDateTime  )  [protected, virtual, inherited]

Definition at line 149 of file xmlserializeable.cpp.

References XMLSerializeable::qDateToString().

Here is the call graph for this function:

bool XMLSerializeable::stringToQDateTime ( const std::string  aStrDateTime,
QDateTime *  aQDateTime 
) [protected, virtual, inherited]

Definition at line 205 of file xmlserializeable.cpp.

References XMLSerializeable::stringToQDate().

Here is the call graph for this function:

bool XMLSerializeable::toXMLFile ( std::string  fname,
std::string  docname 
) [virtual, inherited]

bool XMLSerializeable::fromXMLFile ( std::string  fname,
std::string  docname 
) [virtual, inherited]

void XMLSerializeable::setCurrentVersion ( std::string  versionString  )  [virtual, inherited]

Definition at line 249 of file xmlserializeable.cpp.

References XMLSerializeable::mCurrentVersion, and XMLSerializeable::stringToQDate().

Referenced by MainToolbar::setupProj().

Here is the call graph for this function:

void XMLSerializeable::setCurrentVersion ( QDate  versionQDate  )  [virtual, inherited]

Definition at line 254 of file xmlserializeable.cpp.

References XMLSerializeable::mCurrentVersion.

QDate XMLSerializeable::getCurrentVersion (  )  [virtual, inherited]

Definition at line 258 of file xmlserializeable.cpp.

References XMLSerializeable::mCurrentVersion.

std::string XMLSerializeable::getCurrentVersionStr (  )  [virtual, inherited]

Definition at line 262 of file xmlserializeable.cpp.

References XMLSerializeable::mCurrentVersion, and XMLSerializeable::qDateToString().

Here is the call graph for this function:


Member Data Documentation

Definition at line 39 of file linedef.h.

Referenced by fromXML(), LineDef(), operator==(), and toXML().

QDate XMLSerializeable::mCurrentVersion [protected, inherited]


The documentation for this class was generated from the following file:

Home | Search | Disclaimers & Privacy | Contact Us
GLIMSView Maintainer: dsoltesz@usgs.gov