00001 #ifndef __GLIMSGLOBALS_H 00002 #define __GLIMSGLOBALS_H 00003 00004 #include "attr.h" 00005 #include "linedefset.h" 00006 #include <vector> 00007 #include <string> 00008 #include <qcolor.h> 00009 #include <qfile.h> 00010 #include <qdom.h> 00011 00012 class LineDefSet; 00013 00023 class GLIMSGlobals { 00024 public: 00025 static bool mGlbsLoaded; 00026 00027 // LINE ATTRIBUTES 00028 static std::vector<Attr> mGlbGlacTypes; 00029 static std::vector<Attr> mGlbMDF; 00030 static std::vector<Attr> mGlbTypes; 00031 static std::vector<Attr> mGlbFtrs; 00032 static std::vector<Attr> mGlbLbls; 00033 00034 // GLACIER ATTRIBUTES 00035 static std::vector<Attr> mGlbPrimCsfn; 00036 static std::vector<Attr> mGlbForm; 00037 static std::vector<Attr> mGlbFrntChar; 00038 static std::vector<Attr> mGlbLonChar; 00039 static std::vector<Attr> mGlbDomMassSrc; 00040 static std::vector<Attr> mGlbTongueAct; 00041 00042 // GLOBAL ATTRIBUTE FILE NAMES 00043 static const std::string GLDF_FILE; // LINE DEFINITIONS 00044 static const std::string GMDF_FILE; // SEGMENT MATERIALS 00045 static const std::string GTYPE_FILE; // SEGMENT TYPES 00046 static const std::string GLBL_FILE; // SEGMENT LABELS 00047 static const std::string GFTR_FILE; // SEGMENT FEATURES 00048 static const std::string GCAT_FILE; // SEGMENT CATAGORIES 00049 static const std::string GPCLASS_FILE; // GLACIER PRIMARY CLASSIFICATIONS 00050 static const std::string GFORM_FILE; // GLACIER FORMATION 00051 static const std::string GFCHAR_FILE; // GLACIER FRONTAL CHARACTERISTICS 00052 static const std::string GLCHAR_FILE; // GLACIER LONGITUDINAL CHARACTERISTICS 00053 static const std::string GDOMMS_FILE; // GLACIER DOMINANT MASS SOURCE 00054 static const std::string GTGACT_FILE; // GLACIER TONGUE ACTIVITY 00055 00056 static LineDefSet mGlbLDFSet; 00057 00058 static std::vector<QColor> AVAILCOLORS; 00059 static std::vector<std::string> AVAILCOLORSTR; 00060 00061 static void loadGlobals( ); 00062 static void readAttrFile( std::vector<Attr> &, std::string fname ); 00063 00064 00065 // get the ID of an attribute for a given value 00066 static std::string getIDOf (const std::vector<Attr> glacierAttribute, const std::string attributeValue) ; 00067 static int getIntIDOf (const std::vector<Attr> glacierAttribute, const std::string attributeValue) ; 00068 00069 // get the index where this value is stored in the vector 00070 static int getNdxOfValue (const std::vector<Attr> glacierAttribute, const std::string attributeValue) ; 00071 static int getNdxOfID (const std::vector<Attr> glacierAttribute, const int attributeID) ; 00072 static int getNdxOfID (const std::vector<Attr> glacierAttribute, const std::string attributeID) ; 00073 }; 00074 00075 #endif 00076 00077
Home |
Search |
Disclaimers & Privacy |
Contact Us GLIMSView Maintainer: dsoltesz@usgs.gov |