VR-Forces 4.5 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
paperMapRecord.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 1998 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 /*******************************************************************************
6 ** $RCSfile: pprMapRec.h,v $ $Revision: 1.21 $ $State: Exp $
7 *******************************************************************************/
8 #ifndef paperMapRecord_H_
9 #define paperMapRecord_H_
10 
15 #include <vlutil/vlFilename.h>
16 
17 
18 //
19 // Instances of this class are accessors to Mak terrain database metafiles.
20 // Certain database formats require the use of a metafile as the top-level
21 // file. Example: gdf, dted
23 {
24 
25 public:
26 
27  // default constructor.
29 
30  // destructor
31  virtual ~DtPaperMapRecord();
32 
33  // copy constructor
35 
36  // assignment operator
38 
39  virtual DtPaperMapRecord* clone();
40 
41  // Returns "paper".
42  virtual DtString recordTypeName() const;
43 
44  // Returns DtConfigImageType;
45  virtual DtConfigCategoryType recordCategory() const;
46 
47  // Returns the name specified in the
48  virtual const DtString& name() const;
49  virtual void setName(const DtString & name);
50 
51  // Returns the filename of the bitmap to load for this papermap.
52  virtual void setFilename(const DtFilename& filename);
53  virtual const DtFilename& filename() const;
54 
55  // Returns the level of transparency (0 - opaque, 100 - full transparent)
56  virtual void setTransparencyLevel(int i);
57  virtual int transparencyLevel() const;
58 
59  // Returns the coordinate system used by this papermap.
60  virtual void setCoordinateSystem(DtPaperMap::DtCoordinateSystem cs);
61  virtual DtPaperMap::DtCoordinateSystem coordinateSystem() const;
62 
63  virtual DtPaperMap::AlphaMode alphaMode() const;
64  virtual void setAlphaMode(DtPaperMap::AlphaMode mode);
65 
66  // Read self from stream.
67  virtual bool get(std::istream& stream);
68 
69  // identifies a token or passes it to the parent class.
70  virtual bool processToken(std::istream& stream, DtString& token);
71 
72  static DtMetafileRecord * create();
73 
74  // Converts to and from the enum and string representation of the
75  // PvCoordinateSystem enumeration.
76  virtual DtString coordSysEnumToString(const DtPaperMap::DtCoordinateSystem coordsys) const;
77  virtual DtPaperMap::DtCoordinateSystem stringToCoordSysEnum(const DtString& string) const;
78 
79  // Converts to and from the enum and string representation of the
80  // AlphaMode enumeration.
81  virtual DtString alphaEnumToString(const DtPaperMap::AlphaMode alphaMode) const;
82  virtual DtPaperMap::AlphaMode stringToAlphaEnum(const DtString& string) const;
83 
84 protected:
85 
86  // Write self to stream.
87  virtual bool writeAttributes(std::ostream& stream) const;
88  virtual bool getAttribute(const DtString attrName, DtString& value, unsigned index=0);
89  virtual bool setToken(const DtString& token, const DtString value);
90 
91 protected:
92 
94  DtFilename myFilename;
97 
99 
105  static const int theNumOfParameters;
106 
107 };
108 
109 #endif
110 

Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (www.mak.com)