VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
terrainDescriptorRecord.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2025 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 /*******************************************************************************
6 ** $RCSfile: terrainDescriptorRec.h,v $ $Revision: 1.1 $ $State: Exp $
7 ** Created: 3/24/06 MEM, Updated: 4/24/06
8 *******************************************************************************/
9 #ifndef terrainDescriptorRecord_H_
10 #define terrainDescriptorRecord_H_
11 
14 
15 
16 // The DtTerrainDescriptor record specifies the gdb file to load and whether the
17 // gdb has been altered since it was created.
19 {
20 
21 public:
22 
23  // default constructor.
25 
26  // destructor
27  virtual ~DtTerrainDescriptorRecord() override;
28 
29  // copy constructor
31 
32  // assignment operator
34 
35  // Returns "mtd".
36  virtual DtString recordTypeName() const override;
37 
38  // Returns DtConfigTerrainDescriptorType
39  virtual DtConfigCategoryType recordCategory() const override;
40 
41  // Returns filename of database
42  virtual const DtFilename& filename() const;
43  virtual void setFilename(const DtFilename & name);
44 
45  // If true the terrain has been altered--soil types changed, color changed....
46  // from the configuration used to initially build it.
47  virtual bool terrainAltered() const;
48  virtual void setTerrainAltered(bool altered);
49 
50  virtual bool loadMtdFile(const DtFilename& name);
51 
52  // Read self from stream.
53  virtual bool get(std::istream &stream) override;
54 
55  // identifies a token or passes it to the parent class.
56  virtual bool processToken(std::istream &stream, DtString &token) override;
57 
58  static DtMetafileRecord* create();
59 
60 protected:
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 protected:
67 
68  static const DtString theParameterFile;
70 
72  DtFilename myFile;
73 
74 };
75 
76 #endif
77 
DtConfigCategoryType
Definition: terrainDefines.h:19
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's attribute, returns True if the record has the attribute (the value is re...
virtual DtString recordTypeName() const =0
Returns the type name for the particular record. Descendants should have this method return some stri...
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)
static const DtString theTerrainHasBeenAltered
Definition: terrainDescriptorRecord.h:69
static const DtString theParameterFile
Definition: terrainDescriptorRecord.h:68
virtual DtConfigCategoryType recordCategory() const =0
Each record should have a category of configuration they represent. I.e does this record configure te...
bool myTerrainHasBeenAltered
Definition: terrainDescriptorRecord.h:71
#define DT_DLL_terrainDbFactory
Definition: terrainDbFactoryDefines.h:23
DtFilename myFile
Definition: terrainDescriptorRecord.h:72
voidpf stream
Definition: ioapi.h:39
Definition: metafileRecord.h:28
Definition: terrainDescriptorRecord.h:18
DtMetafileRecord & operator=(const DtMetafileRecord &orig)
assignment operator

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)