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) 2025 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() override;
35 
36  // copy constructor
38 
39  // assignment operator
41 
42  virtual DtPaperMapRecord *clone() override;
43 
44  // Returns the record type.
45  virtual DtString recordTypeName() const override;
46 
47  // Read self from stream.
48  virtual bool get(std::istream &stream) override;
49 
50  // identifies a token or passes it to the parent class
51  virtual bool processToken(std::istream &stream, DtString &token) override;
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 override;
63  virtual bool getAttribute(const DtString attrName, DtString &value,
64  unsigned index = 0) override;
65  virtual bool setToken(const DtString &token, const DtString value) override;
66 
67 protected:
68  // If true (default is false) images, when loaded, will not be unloaded
69  // but rather cached in the system. Set this flag to true when performance
70  // is more of an issue than memory usage.
73 };
74 
76 {
77  myCacheImages = b;
78 }
79 
81 {
82  return myCacheImages;
83 }
84 
85 #endif
86 
static const DtString theParameterCacheImages
Definition: multiResPaperMapRecord.h:72
DtPaperMapRecord & operator=(const DtPaperMapRecord &rhs)
bool cacheImages() const
Definition: multiResPaperMapRecord.h:80
Definition: multiResPaperMapRecord.h:25
bool myCacheImages
Definition: multiResPaperMapRecord.h:71
virtual bool getAttribute(const DtString attrName, DtString &value, unsigned index=0) override
Given the name of a record&#39;s attribute, returns its value in the &#39;value&#39; parameter. Returns True if successful; false otherwise.
Definition: paperMapRecord.h:22
static DtMetafileRecord * create()
virtual DtPaperMapRecord * clone()
#define DT_DLL_terrainDbFactory
Definition: terrainDbFactoryDefines.h:23
voidpf stream
Definition: ioapi.h:39
virtual bool processToken(std::istream &stream, DtString &token) override
identifies a token or passes token the parent class.
Definition: metafileRecord.h:28
virtual bool setToken(const DtString &token, const DtString value) override
identifies a token and returns true if the value can be set to it, false otherwise ...
void setCacheImages(bool)
Definition: multiResPaperMapRecord.h:75
virtual DtString recordTypeName() const override
Returns the type name for the particular record. Descendants should have this method return some stri...
virtual bool writeAttributes(std::ostream &stream) const override
Write attributes to stream. This is called by put(stream)

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)