VR-Forces 4.3 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
rwHazardAreaInformation.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 2013 MaK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 
8 
9 #pragma once
10 
11 #include "vrfutil/vrfutilDefines.h"
14 #include "vrfutil/readerWriter.h"
15 #include "vrfutil/rwEntityType.h"
17 #include "vrfutil/rwString.h"
18 #include "vrfutil/rwInt.h"
19 
27 
29 class DtRwHazardType;
31 
34 {
35 public:
36 
39 
41  DtRwHazardType(const DtString& name, DtReaderWriterRegistry* const parentRegistry = NULL);
42 
44  virtual ~DtRwHazardType();
45 
47  DtRwHazardType(const DtString& name,
48  const DtRwHazardType& orig,
49  DtReaderWriterRegistry* const parentRegistry = NULL);
50 
53 
54  virtual void setHazardType(const DtEntityType&);
55  virtual const DtEntityType& hazardType() const;
56 
57  virtual void setDescription(const DtString&);
58  virtual const DtString& description() const;
59 
60  virtual void setDamagePerSecond(int);
61  virtual const int damagePerSecond() const;
62 
63  virtual void setMinimumMOPP(int);
64  virtual const int minimumMOPP() const;
65 
69  virtual const char* readerWriterType() const;
70 
72  static const char* theXmlType();
73 
74  virtual const char* xmlType() const
75  {
76  return theXmlType();
77  }
78 
80  bool operator==(const DtRwHazardType&) const;
81  bool operator!=(const DtRwHazardType& rhs) const { return !(*this == rhs); };
82 
83 protected:
84  DtRwEntityType myHazardType;
88 };
89 
90 class DT_DLL_vrfutil DtRwHazardTypes : public DtRwTemplatedListPtr<DtRwHazardType,true>
91 {
92 public:
93 
96 
98  DtRwHazardTypes(const DtString& name, DtReaderWriterRegistry* parentRegistry = NULL);
99  DtRwHazardTypes(const DtSymbolString& name, DtReaderWriterRegistry* parentRegistry = NULL);
100 
101 public:
103  virtual void removeHazardType(DtRwHazardType*);
104 
107  virtual DtListItem* add(DtReaderWriter* data);
108 
111  virtual DtListItem* addWithAlternateName(DtReaderWriter* data, const DtString& name);
112 
115  virtual DtListItem* addToStart(DtReaderWriter* data);
116 
119  virtual DtListItem* addToEnd(DtReaderWriter* data);
120 };
121 
123 {
124 public:
125 
128 
130  DtRwHazardAreaInformation(const DtString& name, DtReaderWriterRegistry* const parentRegistry = NULL);
131 
133  virtual ~DtRwHazardAreaInformation();
134 
136  DtRwHazardAreaInformation(const DtString& name,
137  const DtRwHazardAreaInformation& orig,
138  DtReaderWriterRegistry* const parentRegistry = NULL);
139 
142 
144  bool operator==(const DtRwHazardAreaInformation&) const;
145  bool operator!=(const DtRwHazardAreaInformation& rhs) const { return !(*this == rhs); };
146 
148  virtual void clear();
149 
152  virtual bool load(const DtFilename&);
153 
155  virtual bool save() const;
156 
158  virtual bool save(const DtFilename&) const;
159 
163  virtual const char* readerWriterType() const;
164 
166  static const char* theXmlType();
167 
168  virtual const char* xmlType() const
169  {
170  return theXmlType();
171  }
172 
175  virtual const DtRwHazardTypes& hazardTypes() const;
176  virtual DtRwHazardTypes& hazardTypes();
178 
180  const std::vector<DtRwHazardType> hazardTypesFor(const DtEntityType&) const;
181 
183  virtual DtString mapAgentTypeToDescription(const DtEntityType& t, const DtString& agentType) const;
184 
187  virtual const DtRwTemplatedStringList& terrainTypes() const;
188  virtual DtRwTemplatedStringList& terrainTypes();
189 
191  virtual DtString mapTerrainTypeToDescription(const DtString& type) const;
193 
196  virtual const DtRwTemplatedStringList& topographyTypes() const;
197  virtual DtRwTemplatedStringList& topographyTypes();
198 
200  virtual DtString mapTopographyTypeToDescription(const DtString& type) const;
202 
205  virtual const DtRwTemplatedStringList& vegetationTypes() const;
206  virtual DtRwTemplatedStringList& vegetationTypes();
207 
209  virtual DtString mapVegetationTypeToDescription(const DtString& type) const;
211 
212 protected:
217 
218  DtFilename myFilename;
219 };

Document ID: Generated on Wed Mar 11 21:20:57 EDT 2015 from SVN revision 150940
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)