VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
multiResPaperMapRecord.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 1998 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 /*******************************************************************************
6 ** $RCSfile: mResPprMapRec.h,v $ $Revision: 1.12 $ $State: Exp $
7 *******************************************************************************/
8 
9 #ifndef DtMultiResPaperMapRecord_H_
10 #define DtMultiResPaperMapRecord_H_
11 
14 
15 #include "geometry/point.h"
16 
17 #include <iosfwd>
18 
19 // class DtMultiResPaperMapRecord:
20 //
21 // Instances of this class are accessors to Mak terrain database metafiles.
22 // This record points to a mtl file which contains the information for
23 // form a paper map out of a set of pageable raster images.
24 
26 {
27 
28 public:
29 
30  // default constructor.
32 
33  // destructor
34  virtual ~DtMultiResPaperMapRecord();
35 
36  // copy constructor
38 
39  // assignment operator
41 
42  virtual DtPaperMapRecord* clone();
43 
44  // Returns the record type.
45  virtual DtString recordTypeName() const;
46 
47  // Read self from stream.
48  virtual bool get(std::istream& stream);
49 
50  // identifies a token or passes it to the parent class
51  virtual bool processToken(std::istream& stream, DtString& token);
52 
53  static DtMetafileRecord * create();
54 
55  void setCacheImages(bool);
56 
57  bool cacheImages() const;
58 
59 protected:
60 
61  // Write self to stream.
62  virtual bool writeAttributes(std::ostream& stream) const;
63  virtual bool getAttribute(const DtString attrName, DtString& value, unsigned index=0);
64  virtual bool setToken(const DtString& token, const DtString value);
65 
66 protected:
67  // If true (default is false) images, when loaded, will not be unloaded
68  // but rather cached in the system. Set this flag to true when performance
69  // is more of an issue than memory usage.
72 };
73 
75 {
76  myCacheImages = b;
77 }
78 
80 {
81  return myCacheImages;
82 }
83 
84 #endif
85 
static const DtString theParameterCacheImages
Definition: multiResPaperMapRecord.h:71
DtPaperMapRecord & operator=(const DtPaperMapRecord &rhs)
bool cacheImages() const
Definition: multiResPaperMapRecord.h:79
virtual bool processToken(std::istream &stream, DtString &token)
identifies a token or passes token the parent class.
Definition: multiResPaperMapRecord.h:25
bool myCacheImages
Definition: multiResPaperMapRecord.h:70
virtual bool getAttribute(const DtString attrName, DtString &value, unsigned index=0)
Given the name of a record&#39;s attribute, returns its value in the &#39;value&#39; parameter. Returns True if successful; false otherwise.
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 ...
Definition: paperMapRecord.h:22
virtual DtString recordTypeName() const
Returns the type name for the particular record. Descendants should have this method return some stri...
static DtMetafileRecord * create()
virtual DtPaperMapRecord * clone()
virtual bool writeAttributes(std::ostream &stream) const
Write attributes to stream. This is called by put(stream)
#define DT_DLL_terrainDbFactory
Definition: terrainDbFactoryDefines.h:23
voidpf stream
Definition: ioapi.h:39
Definition: metafileRecord.h:28
void setCacheImages(bool)
Definition: multiResPaperMapRecord.h:74

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)