![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /******************************************************************************* 00002 ** Copyright (c) 1998 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 *******************************************************************************/ 00005 /******************************************************************************* 00006 ** $RCSfile: pprMapRec.h,v $ $Revision: 1.21 $ $State: Exp $ 00007 *******************************************************************************/ 00008 #ifndef pprMapRec_H_ 00009 #define pprMapRec_H_ 00010 00011 #include "terrainDbFactory/terrainDbFactoryDefines.h" 00012 #include "terrainDbFactory/mfRec.h" 00013 #include "terrainDbFactory/pprMap.h" 00014 #include "terrainDbFactory/terrainDefines.h" 00015 #include <vlutil/vlFilename.h> 00016 00017 00018 // 00019 // Instances of this class are accessors to Mak terrain database metafiles. 00020 // Certain database formats require the use of a metafile as the top-level 00021 // file. Example: gdf, dted 00022 class DT_DLL_terrainDbFactory DtPaperMapRecord : public DtMetafileRecord 00023 { 00024 00025 public: 00026 00027 // default constructor. 00028 DtPaperMapRecord(); 00029 00030 // destructor 00031 virtual ~DtPaperMapRecord(); 00032 00033 // copy constructor 00034 DtPaperMapRecord(const DtPaperMapRecord& orig); 00035 00036 // assignment operator 00037 DtPaperMapRecord& operator=(const DtPaperMapRecord& rhs); 00038 00039 virtual DtPaperMapRecord* clone(); 00040 00041 // Returns "paper". 00042 virtual DtString recordTypeName() const; 00043 00044 // Returns DtConfigImageType; 00045 virtual DtConfigCategoryType recordCategory() const; 00046 00047 // Returns the name specified in the 00048 virtual const DtString& name() const; 00049 virtual void setName(const DtString & name); 00050 00051 // Returns the filename of the bitmap to load for this papermap. 00052 virtual void setFilename(const DtFilename& filename); 00053 virtual const DtFilename& filename() const; 00054 00055 // Returns the level of transparency (0 - opaque, 100 - full transparent) 00056 virtual void setTransparencyLevel(int i); 00057 virtual int transparencyLevel() const; 00058 00059 // Returns the coordinate system used by this papermap. 00060 virtual void setCoordinateSystem(DtPaperMap::DtCoordinateSystem cs); 00061 virtual DtPaperMap::DtCoordinateSystem coordinateSystem() const; 00062 00063 virtual DtPaperMap::AlphaMode alphaMode() const; 00064 virtual void setAlphaMode(DtPaperMap::AlphaMode mode); 00065 00066 // Read self from stream. 00067 virtual bool get(std::istream& stream); 00068 00069 // identifies a token or passes it to the parent class. 00070 virtual bool processToken(std::istream& stream, DtString& token); 00071 00072 static DtMetafileRecord * create(); 00073 00074 // Converts to and from the enum and string representation of the 00075 // PvCoordinateSystem enumeration. 00076 virtual DtString coordSysEnumToString(const DtPaperMap::DtCoordinateSystem coordsys) const; 00077 virtual DtPaperMap::DtCoordinateSystem stringToCoordSysEnum(const DtString& string) const; 00078 00079 // Converts to and from the enum and string representation of the 00080 // AlphaMode enumeration. 00081 virtual DtString alphaEnumToString(const DtPaperMap::AlphaMode alphaMode) const; 00082 virtual DtPaperMap::AlphaMode stringToAlphaEnum(const DtString& string) const; 00083 00084 protected: 00085 00086 // Write self to stream. 00087 virtual bool writeAttributes(std::ostream& stream) const; 00088 virtual bool getAttribute(const DtString attrName, DtString& value, unsigned index=0); 00089 virtual bool setToken(const DtString& token, const DtString value); 00090 00091 protected: 00092 00093 DtString myName; 00094 DtFilename myFilename; 00095 DtPaperMap::AlphaMode myAlphaMode; 00096 int myTransparencyLevel; 00097 00098 DtPaperMap::DtCoordinateSystem myCoordinateSystem; 00099 00100 static const DtString theParameterName; 00101 static const DtString theParameterFilename; 00102 static const DtString theParameterCoordinateSystem; 00103 static const DtString theParameterAlphaMode; 00104 static const DtString theParameterTransparencyLevel; 00105 static const int theNumOfParameters; 00106 00107 }; 00108 00109 #endif 00110