VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
changeWeatherCommand.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2021 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 
11 #pragma once
12 
13 #include "vrfplan/simCommand.h"
14 #include "vrfplan/vrfplanDefines.h"
16 #include <readerWriter/rwReal.h>
17 #include <readerWriter/rwInt.h>
18 #include <readerWriter/rwBoolean.h>
19 #include <readerWriter/rwString.h>
20 #include "readerWriter/rwVector.h"
21 #include "vrfutil/rwWindLevels.h"
22 #include "vrfutil/rwUUID.h"
23 
30 {
31 public:
32 
35 
37  DtChangeWeatherCommand(const DtString& writeName,
38  DtReaderWriterRegistry* parentRegistry = NULL);
39 
41  DtChangeWeatherCommand(const DtString & writeName, const DtChangeWeatherCommand& orig,
42  DtReaderWriterRegistry* parentRegistry = NULL);
43 
45  virtual ~DtChangeWeatherCommand();
46 
49 
51  virtual const DtSimCommandMessageType& type() const;
52 
54  virtual DtSimCommand * clone(const DtString & name, DtReaderWriterRegistry *
55  parentRegistry = 0) const;
56 
57  virtual int netRepSize() const;
58  virtual bool setFromNet(const char* contentBuffer,
59  unsigned contentSize);
60  virtual bool setToNet();
61 
63 
64  virtual void setAmbientAirTemperature(double celsius);
65  virtual double ambientAirTemperature() const;
67  virtual bool ambientAirTemperatureSpecified() const;
69  virtual void clearAmbientAirTemperature();
71 
73 
74  virtual void setAmbientAirPressure(double factor);
75  virtual double ambientAirPressure() const;
77  virtual bool ambientAirPressureSpecified() const;
79  virtual void clearAmbientAirPressure();
81 
83 
84  virtual void setAirPressureAltitude(double factor);
85  virtual double airPressureAltitude() const;
87  virtual bool airPressureAltitudeSpecified() const;
89  virtual void clearAirPressureAltitude();
91 
93 
94  virtual void setAirTemperatureAltitude(double factor);
95  virtual double airTemperatureAltitude() const;
97  virtual bool airTemperatureAltitudeSpecified() const;
99  virtual void clearAirTemperatureAltitude();
101 
103 
104  virtual void setAirPressureAltitudeIsSeaLevel(bool seaLevel);
105  virtual bool airPressureAltitudeIsSeaLevel() const;
107  virtual bool airPressureAltitudeIsSeaLevelSpecified() const;
109  virtual void clearAirPressureAltitudeIsSeaLevel();
111 
113 
114  virtual void setAirTemperatureAltitudeIsSeaLevel(bool seaLevel);
115  virtual bool airTemperatureAltitudeIsSeaLevel() const;
117  virtual bool airTemperatureAltitudeIsSeaLevelSpecified() const;
119  virtual void clearAirTemperatureAltitudeIsSeaLevel();
121 
123 
124  virtual void setSeaLevelWaterConcentration(double factor);
125  virtual double seaLevelWaterConcentration() const;
127  virtual bool seaLevelWaterConcentrationSpecified() const;
129  virtual void clearSeaLevelWaterConcentration();
131 
133 
134  virtual void setPrecipitationIntensity(double factor);
135  virtual double precipitationIntensity() const;
137  virtual bool precipitationIntensitySpecified() const;
139  virtual void clearPrecipitationIntensity();
141 
143 
144  virtual void setPrecipitationType(DtVrfWeatherPrecipitationType type);
145  virtual DtVrfWeatherPrecipitationType precipitationType() const;
147  virtual bool precipitationTypeSpecified() const;
149  virtual void clearPrecipitationType();
151 
153 
154  virtual void setVisibility(double distance);
155  virtual double visibility() const;
157 
159 
160  virtual void setWindDirection(double radians);
161  virtual double windDirection() const;
163 
165 
166  virtual void setWindSpeed(double value);
167  virtual double windSpeed() const;
169 
171 
172  virtual void setAirTurbulence(int value);
173  virtual int airTurbulence() const;
175  virtual bool airTurbulenceSpecified() const;
177  virtual void clearAirTurbulence();
179 
180 
181 
183 
184  virtual void setUnderwaterVisibility(double underwaterVisibility);
185  virtual double underwaterVisibility() const;
188  virtual bool underwaterVisibilitySpecified() const;
190  virtual void clearUnderwaterVisibility();
192 
194 
195  virtual void setSurfaceTransparency(double transparency);
196  virtual double surfaceTransparency() const;
199  virtual bool surfaceTransparencySpecified() const;
201  virtual void clearSurfaceTransparency();
203 
205 
206  virtual void setWaterCurrentSpeed(double waterCurrentSpeed);
207  virtual double waterCurrentSpeed() const;
209  virtual bool waterCurrentSpeedSpecified() const;
211  virtual void clearWaterCurrentSpeed();
213 
215 
216  virtual void setWaterCurrentDirection(double waterCurrentDirection);
217  virtual double waterCurrentDirection() const;
219  virtual bool waterCurrentDirectionSpecified() const;
221  virtual void clearWaterCurrentDirection();
223 
225 
226  virtual void setAmbientWaterTemperature(double waterTemperature);
227  virtual double ambientWaterTemperature() const;
230  virtual bool ambientWaterTemperatureSpecified() const;
232  virtual void clearAmbientWaterTemperature();
234 
236 
237  virtual void setTidalOffset(double tidalOffset);
238  virtual double tidalOffset() const;
240  virtual bool tidalOffsetSpecified() const;
242  virtual void clearTidalOffset();
244 
246 
247  virtual void setSwellState(unsigned int state);
248  virtual unsigned int swellState() const;
249  virtual bool swellStateSpecified() const;
250  virtual void clearSwellState();
252 
254 
255  virtual void setSwellStateDirection(double direction);
256  virtual double swellStateDirection() const;
257  virtual bool swellStateDirectionSpecified() const;
258  virtual void clearSwellStateDirection();
260 
262 
263  virtual void setSeaState(unsigned int state);
264  virtual unsigned int seaState() const;
265  virtual bool seaStateSpecified() const;
266  virtual void clearSeaState();
268 
270 
271  virtual void setSeaStateDirection(double direction);
272  virtual double seaStateDirection() const;
273  virtual bool seaStateDirectionSpecified() const;
274  virtual void clearSeaStateDirection();
276 
279  virtual void setWindDrivenSeaStateEnabled(bool enabled);
280  virtual bool windDrivenSeaStateEnabled() const;
281  virtual bool windDrivenSeaStateEnabledSpecified() const;
282  virtual void clearWindDrivenSeaStateEnabled();
284 
286 
287  virtual void setChoppiness(double choppiness);
288  virtual double choppiness() const;
289  virtual bool choppinessSpecified() const;
290  virtual void clearChoppiness();
292 
294 
295  virtual void setSurgeDepth(double depth);
296  virtual double surgeDepth() const;
297  virtual bool surgeDepthSpecified() const;
298  virtual void clearSurgeDepth();
300 
302 
303  virtual void setFogHeight(double depth);
304  virtual double fogHeight() const;
305  virtual bool fogHeightSpecified() const;
306  virtual void clearFogHeight();
308 
310 
311  virtual void setFogColor(const DtVector&);
312  virtual const DtVector& fogColor() const;
313  virtual bool fogColorSpecified() const;
314  virtual void clearFogColor();
316 
318 
319  virtual void setSnowAccumulation(double snow);
320  virtual double snowAccumulation() const;
321  virtual bool snowAccumulationSpecified() const;
322  virtual void clearSnowAccumulation();
324 
326 
327  virtual void setSnowMinimumAltitude(double snow);
328  virtual double snowMinimumAltitude() const;
329  virtual bool snowMinimumAltitudeSpecified() const;
330  virtual void clearSnowMinimumAltitude();
332 
334 
335  virtual void setSnowRoadAccumulation(double snow);
336  virtual double snowRoadAccumulation() const;
337  virtual bool snowRoadAccumulationSpecified() const;
338  virtual void clearSnowRoadAccumulation();
340 
342 
343  virtual void setRainAccumulation(double rain);
344  virtual double rainAccumulation() const;
345  virtual bool rainAccumulationSpecified() const;
346  virtual void clearRainAccumulation();
348 
351 
352  virtual void setThermoclineLayer1Depth(double depth);
353  virtual double thermoclineLayer1Depth() const;
354  virtual bool thermoclineLayer1DepthSpecified() const;
355  virtual void clearThermoclineLayer1Depth();
356  virtual void setThermoclineLayer1Permeability(double depth);
357  virtual double thermoclineLayer1Permeability() const;
358  virtual bool thermoclineLayer1PermeabilitySpecified() const;
359  virtual void clearThermoclineLayer1Permeability();
360 
361  virtual void setThermoclineLayer2Depth(double depth);
362  virtual double thermoclineLayer2Depth() const;
363  virtual bool thermoclineLayer2DepthSpecified() const;
364  virtual void clearThermoclineLayer2Depth();
365  virtual void setThermoclineLayer2Permeability(double depth);
366  virtual double thermoclineLayer2Permeability() const;
367  virtual bool thermoclineLayer2PermeabilitySpecified() const;
368  virtual void clearThermoclineLayer2Permeability();
369 
370  virtual void setThermoclineLayer3Depth(double depth);
371  virtual double thermoclineLayer3Depth() const;
372  virtual bool thermoclineLayer3DepthSpecified() const;
373  virtual void clearThermoclineLayer3Depth();
374  virtual void setThermoclineLayer3Permeability(double depth);
375  virtual double thermoclineLayer3Permeability() const;
376  virtual bool thermoclineLayer3PermeabilitySpecified() const;
377  virtual void clearThermoclineLayer3Permeability();
378 
379  virtual void setThermoclineLayer4Depth(double depth);
380  virtual double thermoclineLayer4Depth() const;
381  virtual bool thermoclineLayer4DepthSpecified() const;
382  virtual void clearThermoclineLayer4Depth();
383  virtual void setThermoclineLayer4Permeability(double depth);
384  virtual double thermoclineLayer4Permeability() const;
385  virtual bool thermoclineLayer4PermeabilitySpecified() const;
386  virtual void clearThermoclineLayer4Permeability();
387 
388  virtual void setThermoclineLayer5Depth(double depth);
389  virtual double thermoclineLayer5Depth() const;
390  virtual bool thermoclineLayer5DepthSpecified() const;
391  virtual void clearThermoclineLayer5Depth();
392  virtual void setThermoclineLayer5Permeability(double depth);
393  virtual double thermoclineLayer5Permeability() const;
394  virtual bool thermoclineLayer5PermeabilitySpecified() const;
395  virtual void clearThermoclineLayer5Permeability();
397 
399 
400  virtual void setLightningPresent(bool isPresent);
401  virtual bool lightningPresent() const;
402  virtual bool lightningPresentSpecified() const;
403  virtual void clearLightningPresent();
405 
411 
412  virtual void setGeneratedByRemoteWeatherSetter(bool value);
413  virtual bool generatedByRemoteWeatherSetter() const;
415 
417  virtual DtString stringRep() const;
418 
419  static DtSimCommand* creator();
420 
422  virtual void setUUID(const DtUUID&);
423  virtual const DtUUID& uuid() const;
424 
426  virtual void setPriority(int p);
427  virtual int priority() const;
428  virtual bool prioritySpecified() const;
429  virtual void clearPriority();
430 
435  virtual void clearWindLevels();
436  virtual bool windLevelsSpecified() const;
437  virtual void clearWindLevelsSpecified();
438 
440  virtual void setWindLevels(const DtRwWindLevels&);
441 
442  virtual const DtRwWindLevels& windLevels() const;
443  virtual DtRwWindLevels& windLevels();
445 
446  virtual bool operator==(const DtChangeWeatherCommand&) const;
447  virtual bool operator!=(const DtChangeWeatherCommand& rhs) const
448  {
449  return !(*this == rhs);
450  }
451 
453  virtual void setAllValuesSpecified(bool);
454 
456  virtual bool fromXml(const DtString& s);
457  virtual bool fromXmlFile(const DtFilename& s);
458 
460  virtual void getSelf(DtlObjPtr args, const DtReaderWriter::SearchPaths& searchPaths,
461  const DtVariableBindingsList& variableBindings);
462 
463 protected:
498 
501 
505 
507 
509 
511 
513 
515 };
516 
bool operator==(const DtReaderWriter &) const
Equivalence operator.
DtRwInt myAirTurbulence
Definition: changeWeatherCommand.h:473
UUID is a unique ID wrapper class.
Definition: uuid.h:59
DtVrfWeatherPrecipitationType
Definition: vrfWeatherStateEnums.h:13
DtRwReal myThermoclineLayer1Depth
Definition: changeWeatherCommand.h:487
DtRwBoolean myLightningPresent
Definition: changeWeatherCommand.h:514
DtRwReal mySeaLevelWaterConcentration
Definition: changeWeatherCommand.h:470
DtRwReal myAmbientAirPressure
Definition: changeWeatherCommand.h:465
DtRwUUID myUUID
Definition: changeWeatherCommand.h:510
DtRwReal myThermoclineLayer3Permeability
Definition: changeWeatherCommand.h:492
DtRwReal mySurfaceTransparency
Definition: changeWeatherCommand.h:475
virtual bool fromXmlFile(const DtFilename &)
Restores object from given xml file.
DtRwReal myRainAccumulation
Definition: changeWeatherCommand.h:506
DtRwReal myThermoclineLayer2Depth
Definition: changeWeatherCommand.h:489
virtual bool setToNet()
Calls netRep() to create the network buffer. Casts the resulting myNetRep to type DtNetSimSimCommand*...
DtRwReal myThermoclineLayer4Permeability
Definition: changeWeatherCommand.h:494
DtRwReal myThermoclineLayer2Permeability
Definition: changeWeatherCommand.h:490
DtRwReal myThermoclineLayer5Depth
Definition: changeWeatherCommand.h:495
DtRwReal myThermoclineLayer4Depth
Definition: changeWeatherCommand.h:493
DtRwReal myTidalOffset
Definition: changeWeatherCommand.h:479
virtual DtString stringRep() const =0
Returns a human-readable string representation of the command. This string representation is used to ...
Definition: readerWriterRegistry.h:39
Contains the DtUUID class declaration.
DtRwReal myWaterCurrentDirection
Definition: changeWeatherCommand.h:477
DtRwReal mySnowAccumulation
Definition: changeWeatherCommand.h:502
DtRwInt myPriority
Definition: changeWeatherCommand.h:497
DtRwReal mySurgeDepth
Definition: changeWeatherCommand.h:486
virtual bool fromXml(const DtString &)
Restores object from given xml string. Returns true if valid.
uuid class
Definition: rwUUID.h:26
DtRwReal myWaterCurrentSpeed
Definition: changeWeatherCommand.h:476
DtRwReal myPrecipitationIntensity
Definition: changeWeatherCommand.h:471
DtRwReal myThermoclineLayer3Depth
Definition: changeWeatherCommand.h:491
Definition: rwVector.h:23
DtRwReal mySeaStateDirection
Definition: changeWeatherCommand.h:483
DT_DLL_VRVCORE double distance(const makVrv::DtCoordinateSystem &, const DtVector &from, const DtVector &to)
Returns the distance from the two points. Coordinates are in local database coordinates The coordinat...
DtRwReal myThermoclineLayer1Permeability
Definition: changeWeatherCommand.h:488
DtRwVector myFogColor
Definition: changeWeatherCommand.h:500
virtual int netRepSize() const
Returns the size in bytes of the network representation of the class. This is the size in bytes of th...
DtRwReal mySnowRoadAccumulation
Definition: changeWeatherCommand.h:504
std::list< const DtRwVariableBindings * > DtVariableBindingsList
Definition: readerWriterRegistry.h:29
virtual bool setFromNet(const char *contentBuffer, unsigned contentSize)
Sets mySubsimCommand member from the incoming contentBuffer (cast to type DtNetSimSimCommand). Derived classes should call down to this function first, and then extract their own data starting at the location contentBuffer + DtSimCommand::netRepSize().
Description: Readable, Writable int.
Definition: rwInt.h:25
std::vector< DtFilename > SearchPaths
Definition: readerWriter.h:92
DtRwReal myAmbientAirTemperature
Definition: changeWeatherCommand.h:464
const DtSimCommand & operator=(const DtSimCommand &orig)
assignment operator; same as copy constructor
DtRwReal mySnowMinimumAltitude
Definition: changeWeatherCommand.h:503
DtRwReal myAirTemperatureAltitude
Definition: changeWeatherCommand.h:466
DtSimCommand is an abstract base class from which commands can derive. It manages the read/write capa...
Definition: simCommand.h:32
A DtSimCommand subclass which specifies a change to the weather settings for the specified weather ar...
Definition: changeWeatherCommand.h:29
DtRwReal myUnderwaterVisibility
Definition: changeWeatherCommand.h:474
virtual void getSelf(DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &variableBindings=nullVariableReference())
Top level to read itself from an input stream. searchPath is passed down to all DtReaderWriter member...
DtRwReal myFogHeight
Definition: changeWeatherCommand.h:499
DtRwReal myThermoclineLayer5Permeability
Definition: changeWeatherCommand.h:496
DtRwInt myPrecipitationType
Definition: changeWeatherCommand.h:472
Description: Readable, Writable DtReal (double)
Definition: rwReal.h:27
DtRwReal myChoppiness
Definition: changeWeatherCommand.h:485
DtRwReal myAirPressureAltitude
Definition: changeWeatherCommand.h:467
virtual DtSimCommand * clone() const
Version of clone that preserves the existing name, and assigns a null parent registry.
DtRwBoolean myGeneratedByRemoteWeatherSetter
Definition: changeWeatherCommand.h:508
Description: Readable, Writable bool.
Definition: rwBoolean.h:26
DtRwReal mySwellStateDirection
Definition: changeWeatherCommand.h:481
virtual const DtSimCommandMessageType & type() const =0
#define DT_DLL_vrfplan
This file is used to determine how to build.
Definition: vrfplanDefines.h:28
virtual bool operator!=(const DtChangeWeatherCommand &rhs) const
Definition: changeWeatherCommand.h:447
DtRwInt mySwellState
Definition: changeWeatherCommand.h:480
Definition: rwWindLevels.h:17
DtRwBoolean myAirPressureAltitudeIsSeaLevel
Definition: changeWeatherCommand.h:469
DtRwBoolean myWindDrivenSeaStateEnabled
Definition: changeWeatherCommand.h:484
DtRwBoolean myAirTemperatureAltitudeIsSeaLevel
Definition: changeWeatherCommand.h:468
DtRwReal myAmbientWaterTemperature
Definition: changeWeatherCommand.h:478
DtRwInt mySeaState
Definition: changeWeatherCommand.h:482
DtRwWindLevels myWindLevels
Definition: changeWeatherCommand.h:512
File: rwVector.h.

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)