00001 #ifndef __GLACIERLINE_H 00002 #define __GLACIERLINE_H 00003 00004 #include "windows_defs.h" 00005 #include "shape.h" 00006 00014 class GV_EXPORT GlacierLine : public Line { 00015 public: 00016 int mGID; 00017 int mLDF; 00018 00022 GlacierLine( ) 00023 : mGID( -1 ), mLDF( -1 ) {;} 00024 00030 GlacierLine( int igid, int ildf ) 00031 : mGID( igid ), mLDF( ildf ) {;} 00032 00038 virtual bool fromXML( QDomElement &elem ) { 00039 if ( std::string( "GlacierLine" ).compare( (const char*)elem.tagName() ) ) 00040 return false; 00041 00042 mGID = readIntTag( elem, "GID" ); 00043 mLDF = readIntTag( elem, "LDF" ); 00044 nodesetFromXML( elem ); 00045 00046 return true; 00047 } 00048 00056 virtual bool toXML( QDomDocument &doc, 00057 QDomElement &elem, 00058 std::string id = "" ) { 00059 QDomElement base = doc.createElement( "GlacierLine" ); 00060 if ( id != "" ) 00061 base.setAttribute( "id", (char*)id.c_str() ); 00062 elem.appendChild( base ); 00063 00064 writeIntTag( doc, base, "GID", mGID ); 00065 writeIntTag( doc, base, "LDF", mLDF ); 00066 nodesetToXML( doc, base ); 00067 return true; 00068 } 00069 00074 void operator=( const GlacierLine &gline ) { 00075 for ( int inode=0; inode < (int)gline.size(); inode++ ) { 00076 mNodeSet.push_back( gline[inode] ); 00077 } 00078 mLDF = gline.mLDF; 00079 mGID = gline.mGID; 00080 mAttr = gline.mAttr; 00081 } 00082 }; 00083 00084 #endif 00085 00086 00087
Home |
Search |
Disclaimers & Privacy |
Contact Us GLIMSView Maintainer: dsoltesz@usgs.gov |