GLIMSView Source Code Documentation

LineDefSet Class Reference

#include <linedefset.h>

Inheritance diagram for LineDefSet:

Inheritance graph
[legend]

List of all members.


Detailed Description

This contains a set of line definitions to allow easier serialization within glimsview as well as a more convenient way of accessing them.

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 31 of file linedefset.h.


Public Member Functions

 LineDefSet ()
virtual bool toXML (QDomDocument &doc, QDomElement &elem, std::string id="")
 Write out line definition to project file.
virtual bool fromXML (QDomElement &elem)
 Read in line definition info from project file.
LineDefoperator[] (int ildf)
 [] operator makes line definition set behave like an array
void add (LineDef &ldf)
 Add a line definition to the set.
unsigned int size ()
 How many line definitions are in the set?
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 ()

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

std::vector< LineDefmLDFSet
QDate mCurrentVersion

Constructor & Destructor Documentation

LineDefSet::LineDefSet (  ) 

Definition at line 3 of file linedefset.cpp.

References XMLSerializeable::fromXMLFile(), GLIMSGlobals::GLDF_FILE, and mLDFSet.

Here is the call graph for this function:


Member Function Documentation

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

Write out line definition to project file.

Implements XMLSerializeable.

Definition at line 8 of file linedefset.cpp.

References mLDFSet.

Referenced by GLIMSLineData::toXML().

bool LineDefSet::fromXML ( QDomElement &  elem  )  [virtual]

Read in line definition info from project file.

Implements XMLSerializeable.

Definition at line 21 of file linedefset.cpp.

References LineDef::fromXML(), and mLDFSet.

Referenced by GLIMSLineData::fromXML().

Here is the call graph for this function:

LineDef& LineDefSet::operator[] ( int  ildf  )  [inline]

[] operator makes line definition set behave like an array

Definition at line 56 of file linedefset.h.

References mLDFSet.

void LineDefSet::add ( LineDef ldf  )  [inline]

Add a line definition to the set.

Definition at line 64 of file linedefset.h.

References mLDFSet.

Referenced by GLIMSLineData::addLDF(), and LineDefDlg::butOkPress().

unsigned int LineDefSet::size (  )  [inline]

bool LineDefSet::validate ( ValidationReport valRep  ) 

Check that this line definition has required metadata.

Check that all line definitions have required metadata.

Returns:
bool true if glacier id is valid, and false if not

bool true if line definitions are valid, and false if not

Definition at line 48 of file linedefset.cpp.

References GLIMSGlobals::AVAILCOLORSTR, GLIMSGlobals::mGlbGlacTypes, mLDFSet, ValidationReport::subsectionBegin(), and ValidationReport::subsectionEnd().

Referenced by GLIMSLineData::validate().

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

std::vector<LineDef> LineDefSet::mLDFSet [protected]

Definition at line 33 of file linedefset.h.

Referenced by add(), fromXML(), LineDefSet(), operator[](), size(), toXML(), and validate().

QDate XMLSerializeable::mCurrentVersion [protected, inherited]


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

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