![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /******************************************************************************* 00002 ** Copyright (c) 1998 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 *******************************************************************************/ 00005 /******************************************************************************* 00006 ** $RCSfile: shapeVectorMfRec.h,v $ $Revision: 1.16 $ $State: Exp $ 00007 *******************************************************************************/ 00008 00009 #ifndef DtShapeVectorMetafileRecord_H_ 00010 #define DtShapeVectorMetafileRecord_H_ 00011 00012 #include "terrainDbFactory/terrainDbFactoryDefines.h" 00013 #include "terrainDbFactory/vectorDataRec.h" 00014 #include <vlutil/vlFilename.h> 00015 #include <iosfwd> 00016 00017 // 00018 // The shape metafile record has a list of individual shape files for 00019 // feature data. 00020 class DT_DLL_terrainDbFactory DtShapeVectorMetafileRecord : public DtVectorDataRecord 00021 { 00022 00023 public: 00024 00025 // default constructor. 00026 DtShapeVectorMetafileRecord(); 00027 00028 // destructor 00029 virtual ~DtShapeVectorMetafileRecord(); 00030 00031 // copy constructor 00032 DtShapeVectorMetafileRecord(const DtShapeVectorMetafileRecord& orig); 00033 00034 // assignment operator 00035 DtShapeVectorMetafileRecord& operator=(const DtShapeVectorMetafileRecord& orig); 00036 00037 // Returns "shape". 00038 virtual DtString recordTypeName() const; 00039 00040 // Clears the vector files from the vector initializer list 00041 virtual void resetFileLists(); 00042 00043 // Read self from stream. 00044 virtual bool get(std::istream& stream); 00045 00046 // identifies a token or passes it to the parent class. 00047 virtual bool processToken(std::istream& stream, DtString& token); 00048 00049 static DtMetafileRecord* create(); 00050 00051 protected: 00052 00053 // Write self to stream. 00054 virtual bool writeAttributes(std::ostream& stream) const; 00055 virtual bool getAttribute(const DtString attrName, DtString& value, unsigned index=0); 00056 virtual bool setToken(const DtString& token, const DtString value); 00057 00058 protected: 00059 00060 static const DtString theIsFeatureDataFile; 00061 static const DtString theOrigin; 00062 00063 static const DtString theFccType; 00064 static const DtString theAttribute; 00065 // Maps numerical type to the feature it represents. ie load in a shape file 00066 // road.shp. Type is assigned to 240. The sedris map matches that 240 with the 00067 // feature of road and it's associated attributes. 00068 static const DtString theSedrisMapFile; 00069 // Maps a shape feature to a color 00070 static const DtString theSedrisColorMapFile; // 00071 }; 00072 00073 #endif 00074