VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties 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 
DtPaperMap::AlphaMode myAlphaMode
Definition: paperMapRecord.h:95
static const DtString theParameterName
Definition: paperMapRecord.h:100
static const DtString theParameterCoordinateSystem
Definition: paperMapRecord.h:102
DtConfigCategoryType
Definition: terrainDefines.h:19
static const DtString theParameterFilename
Definition: paperMapRecord.h:101
DtString myName
Definition: paperMapRecord.h:93
static const DtString theParameterTransparencyLevel
Definition: paperMapRecord.h:104
const char * filename
Definition: ioapi.h:38
virtual bool setToken(const DtString &token, const DtString value)
identifies a token and returns true if the value can be set to it, false otherwise ...
virtual bool getAttribute(const DtString attrName, DtString &value, DtString &type, unsigned index=0)
Given the name of a record&#39;s attribute, returns True if the record has the attribute (the value is re...
int myTransparencyLevel
Definition: paperMapRecord.h:96
virtual DtString recordTypeName() const =0
Returns the type name for the particular record.
static const int theNumOfParameters
Definition: paperMapRecord.h:105
virtual bool processToken(std::istream &stream, DtString &token)
identifies a token or passes token the parent class.
virtual bool writeAttributes(std::ostream &stream) const
Write attributes to stream. This is called by put(stream)
Definition: paperMapRecord.h:22
DtPaperMap::DtCoordinateSystem myCoordinateSystem
Definition: paperMapRecord.h:98
DtCoordinateSystem
Definition: paperMap.h:36
virtual DtConfigCategoryType recordCategory() const =0
Each record should have a category of configuration they represent.
#define DT_DLL_terrainDbFactory
Definition: terrainDbFactoryDefines.h:23
AlphaMode
Definition: paperMap.h:46
voidpf stream
Definition: ioapi.h:39
DtFilename myFilename
Definition: paperMapRecord.h:94
Definition: metafileRecord.h:28
const char int mode
Definition: ioapi.h:38
DtMetafileRecord & operator=(const DtMetafileRecord &orig)
assignment operator
static const DtString theParameterAlphaMode
Definition: paperMapRecord.h:103

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)