![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /******************************************************************************* 00002 ** Copyright (c) 2006 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 *******************************************************************************/ 00005 /******************************************************************************* 00006 ** $RCSfile: terrainDescriptorRec.h,v $ $Revision: 1.1 $ $State: Exp $ 00007 ** Created: 3/24/06 MEM, Updated: 4/24/06 00008 *******************************************************************************/ 00009 #ifndef terrainDescriptorRec_H_ 00010 #define terrainDescriptorRec_H_ 00011 00012 #include "terrainDbFactory/terrainDbFactoryDefines.h" 00013 #include "terrainDbFactory/mfRec.h" 00014 00015 00016 // The DtTerrainDescriptor record specifies the gdb file to load and whether the 00017 // gdb has been altered since it was created. 00018 class DT_DLL_terrainDbFactory DtTerrainDescriptorRecord : public DtMetafileRecord 00019 { 00020 00021 public: 00022 00023 // default constructor. 00024 DtTerrainDescriptorRecord(); 00025 00026 // destructor 00027 virtual ~DtTerrainDescriptorRecord(); 00028 00029 // copy constructor 00030 DtTerrainDescriptorRecord(const DtTerrainDescriptorRecord& orig); 00031 00032 // assignment operator 00033 DtTerrainDescriptorRecord& operator=(const DtTerrainDescriptorRecord& orig); 00034 00035 // Returns "mtd". 00036 virtual DtString recordTypeName() const; 00037 00038 // Returns DtConfigTerrainDescriptorType 00039 virtual DtConfigCategoryType recordCategory() const; 00040 00041 // Returns filename of database 00042 virtual const DtFilename& filename() const; 00043 virtual void setFilename(const DtFilename & name); 00044 00045 // If true the terrain has been altered--soil types changed, color changed.... 00046 // from the configuration used to initially build it. 00047 virtual bool terrainAltered() const; 00048 virtual void setTerrainAltered(bool altered); 00049 00050 virtual bool loadMtdFile(const DtFilename& name); 00051 00052 // Read self from stream. 00053 virtual bool get(std::istream& stream); 00054 00055 // identifies a token or passes it to the parent class. 00056 virtual bool processToken(std::istream& stream, DtString& token); 00057 00058 static DtMetafileRecord* create(); 00059 00060 protected: 00061 // Write self to stream 00062 virtual bool writeAttributes(std::ostream& stream) const; 00063 virtual bool getAttribute(const DtString attrName, DtString& value, unsigned index=0); 00064 virtual bool setToken(const DtString& token, const DtString value); 00065 protected: 00066 00067 static const DtString theParameterFile; 00068 static const DtString theTerrainHasBeenAltered; 00069 00070 bool myTerrainHasBeenAltered; 00071 DtFilename myFile; 00072 00073 }; 00074 00075 #endif 00076