VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
rwTerrainCategoryMask.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2024 MaK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
9 #pragma once
10 
12 #include "vrfutil/vrfutilDefines.h"
13 
15 
18 {
24 };
25 
27 using DtTerrainCategoryMask = unsigned int;
28 
32 {
33 public:
35  DtRwTerrainCategoryMask(const DtString& name = DtString::nullString(),
36  DtReaderWriterRegistry* parentRegistry = nullptr);
37 
39  DtReaderWriterRegistry* parentRegistry = nullptr);
40 
43 
44  virtual ~DtRwTerrainCategoryMask() override;
45 
47 
48  virtual operator DtTerrainCategoryMask() const;
49 
50 
52 
53  virtual DtTerrainCategoryMask value() const;
54  virtual void setValue(const DtTerrainCategoryMask value);
55 
56  virtual void putData(std::string& fp, int indentLevel = 0) override;
57  virtual DtlObjPtr getData(DtlObjPtr args, const DtReaderWriter::SearchPaths& searchPaths,
58  const DtVariableBindingsList& variableBindings) override;
59 
63  virtual const char* readerWriterType() const override;
64 
65  virtual bool operator==(const DtRwTerrainCategoryMask&) const;
66  virtual bool operator!=(const DtRwTerrainCategoryMask&) const;
67 
68  static DtString terrainCategoryToString(DtTerrainCategory tc);
69  static DtTerrainCategory stringToTerrainCategory(const DtString& s);
70 
71  virtual DtString prettyPrint() const override;
72 
75  virtual void putData(DtEnvironmentSP, DtEnvValueSP parent) const override;
76  virtual void getData(const DtEnvironmentSP, const DtEnvValueSP value,
78  const DtVariableBindingsList& bindings = DtVariableBindingsList()) override;
79 
81  static const char* theXmlType();
82 
83  virtual const char* xmlType() const override
84  {
85  return theXmlType();
86  }
88 
89 protected:
90 
92  DtString stringValue() const;
93 
94 protected:
96 };
bool operator==(const DtReaderWriter &) const
Equivalence operator.
No category. No terrain should have this value.
Definition: rwTerrainCategoryMask.h:20
virtual const char * readerWriterType() const
Used to supply a string type that this reader writer type is. This can be used in place of dynamic-ca...
This class allows one to collect and compare strings using an index number instead of having to do st...
Definition: symbolString.h:27
DtTerrainCategory
This enumeration is a set of values that can be used in a bitfield that define different "categories"...
Definition: rwTerrainCategoryMask.h:17
Definition: rwTerrainCategoryMask.h:19
virtual DtlObjPtr getData(DtlObjPtr args, const SearchPaths &searchPaths, const DtVariableBindingsList &variableBindings)
Deriving class overrides these to get/put class specific data.
Definition: readerWriter.h:85
typedef int(ZCALLBACK *close_file_func) OF((voidpf opaque
Definition: readerWriterRegistry.h:39
virtual DtString prettyPrint() const
Routine to return a human readable form of the reader/writer variable. Not all reader/writer classes ...
bool operator!=(const DtReaderWriter &rhs) const
Definition: readerWriter.h:121
std::list< const DtRwVariableBindings * > DtVariableBindingsList
Definition: readerWriterRegistry.h:29
std::vector< DtFilename > SearchPaths
Definition: readerWriter.h:92
DtTerrainCategoryMask myValue
Definition: rwTerrainCategoryMask.h:95
A DtReaderWriter subclass for DtTerrainCategoryMask. This accepts the mask names as both symbols and ...
Definition: rwTerrainCategoryMask.h:31
Terrain which represents buildings and other structures. There should be terrain skin under these...
Definition: rwTerrainCategoryMask.h:23
Terrain that includes the surface of the ground/water that entities will typically drive/stand on...
Definition: rwTerrainCategoryMask.h:21
virtual void putData(std::string &fp, int indentLevel=0)
Deriving class overrides these to get/put class specific data.
unsigned int DtTerrainCategoryMask
This bitmask is made using DtTerrainCategory values.
Definition: rwTerrainCategoryMask.h:27
#define DT_DLL_vrfutil
This file is used to determine how to build Disable inconsistent dll linkage warning Visual Studio 6...
Definition: vrfutilDefines.h:34
const DtReaderWriter & operator=(const DtReaderWriter &orig)
assignment operator
static const char * theXmlType()
The type that is used when archiving to an XML stream.
Terrain which represents vegetation (trees, etc). There should be terrain skin under these...
Definition: rwTerrainCategoryMask.h:22
DT_DLL_readerWriter std::shared_ptr< DtEnvironment > DtEnvironmentSP
Definition: readerWriter.h:30
virtual const char * xmlType() const override
Routines to archive/dearchive from an XML Environment.
Definition: rwTerrainCategoryMask.h:83

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)