![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /******************************************************************************* 00002 ** Copyright (c) 2004 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 *******************************************************************************/ 00005 /******************************************************************************* 00006 ** $RCSfile: shapeEntry.h,v $ $Revision: 1.11 $ $State: Exp $ 00007 *******************************************************************************/ 00008 #ifndef shapeEntry_H_ 00009 #define shapeEntry_H_ 00010 00011 // \file shapeEntry.h 00012 // \brief Contains the DtShapeEntry class declaration and other related definitions/declarations. 00013 00014 #include "shape/shapeDefines.h" 00015 #include <vlutil/vlFilename.h> 00016 #include <vlutil/vlString.h> 00017 00018 00019 enum DtShapefileEntryType 00020 { 00021 SHAPEFILE_NOTYPE, 00022 SHAPEFILE_FEATURE, 00023 SHAPEFILE_ELEVATIONFIELD, 00024 SHAPEFILE_ELEVATIONDELTA, 00025 SHAPEFILE_ELEVATIONINDATA 00026 }; 00027 00028 00029 // 00030 // The DtShapeEntry class is responsible for holding all the data necessary for 00031 // the shape vector importer to import the specified shape file as a set of vector 00032 // features. 00033 class DT_DLL_shape DtShapeEntry 00034 { 00035 00036 public: 00037 00038 // default constructor. 00039 DtShapeEntry(); 00040 DtShapeEntry(const DtFilename& filename, const DtString& dataString, float factorToMtrs); 00041 DtShapeEntry(const DtFilename& filename, float elevationDelta, float factorToMtrs); 00042 DtShapeEntry(const DtFilename& filename, float factorToMtrs); 00043 DtShapeEntry(const DtFilename& filename, int fccCode); 00044 00045 // Copy constructor 00046 DtShapeEntry(const DtShapeEntry& original); 00047 00048 // Assignment operator 00049 DtShapeEntry& operator=(const DtShapeEntry& original); 00050 00051 00052 // destructor 00053 virtual ~DtShapeEntry(); 00054 00055 virtual void setType(DtShapefileEntryType newType); 00056 virtual DtShapefileEntryType type() const; 00057 00058 // add a filename to the load list 00059 virtual void setFile(const DtFilename& filename); 00060 virtual DtFilename& file(); 00061 virtual const DtFilename& file() const; 00062 00063 virtual void setDataString(const DtString& dataString); 00064 virtual DtString& dataString(); 00065 virtual const DtString& dataString() const; 00066 00067 virtual void setElevationDelta(float stp); 00068 virtual double elevationDelta() const; 00069 00070 virtual void setFactorToMtrs(float factor); 00071 virtual float factorToMtrs() const; 00072 00073 virtual void setFccCode(int fccCod); 00074 virtual int fccCode() const; 00075 00076 virtual void setPath(const DtFilename&); 00077 virtual const DtFilename& path() const; 00078 00079 // Indicates whether or not we should load all attributes 00080 // found in .dbf file. Default is false (only load those 00081 // attributes we specifically ask for through a 00082 // DtVectorDataInitializer object). 00084 virtual void setLoadAllAttributes(bool yesNo); 00085 virtual bool loadAllAttributes() const; 00087 00088 // Indicates whether or not attributes from the sedris map files 00089 // should be loaded when loading this shape file. If yes, the map file 00090 // (specified in setDfadSedrisFile()) will be used to initialize the 00091 // shape attributes based on the FCC code. 00092 // Default is true. 00094 virtual void setLoadSedrisMapAttributes(bool yesNo); 00095 virtual bool loadSedrisMapAttributes() const; 00097 00098 protected: 00099 DtFilename myFilename; 00100 DtFilename myPath; 00101 DtShapefileEntryType myType; 00102 DtString myDataString; 00103 double myElevationDelta; 00104 float myFactorToMtrs; 00105 int myFccCode; 00106 bool myLoadAllAttributes; 00107 bool myLoadSedrisMapAttributes; 00108 }; 00109 00110 #endif 00111