VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
fireForEffectTask.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2021 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
14 #pragma once
15 
16 #include <vlutil/vlMachineTypes.h>
17 
18 #include "vrftasks/simTask.h"
19 #include <readerWriter/rwString.h>
20 #include "vrfutil/rwEntityType.h"
21 #include <readerWriter/rwInt.h>
22 #include <readerWriter/rwReal.h>
23 #include <readerWriter/rwBoolean.h>
24 #include "vrfutil/rwTaitBryan.h"
25 
33 {
34 
35 protected:
38 
42  parentRegistry = nullptr);
43 
45  DtFireForEffectTask(const DtString & writeName, const DtFireForEffectTask &
46  orig, DtReaderWriterRegistry * parentRegistry = nullptr);
47 
50 
51 public:
52  virtual ~DtFireForEffectTask();
53 
56  virtual void addWeapon(const DtString& weap);
58  virtual const DtRwStringList& weaponNames() const;
60  virtual DtRwStringList& weaponNames();
62  virtual void setWeaponNames(const DtRwStringList& weapons);
63 
73  virtual bool getWeaponOnList(const DtString& weaponName, DtString& weapon) const;
74 
77 
78  virtual void setWeaponId(const DtString& weaponId);
79  virtual DtString weaponId() const;
81  virtual bool weaponIdSpecified() const;
84 
86 
87  virtual void setAmmoType(const DtString& ammoType);
88  virtual DtString ammoType() const;
90  virtual bool ammoTypeSpecified() const;
92 
94  //virtual void setAmmoTypeSpecified(bool specified);
95  //virtual bool ammoTypeSpecified() const;
96 
97  virtual void setNumberOfRounds(int rounds);
98  virtual int numberOfRounds() const;
99  virtual bool numberOfRoundsSpecified() const;
100 
101  virtual void setDispersionRadius(DtReal radius);
102  virtual DtReal dispersionRadius() const;
103  virtual bool dispersionRadiusSpecified() const;
104 
105  virtual void setHeightAboveTerrain(DtReal height);
106  virtual DtReal heightAboveTerrain() const;
107  virtual bool heightAboveTerrainSpecified() const;
108 
109  virtual void setMuzzleSpeed(DtReal v);
110  virtual DtReal muzzleSpeed() const;
111  virtual bool muzzleSpeedSpecified() const;
112 
113  virtual void setMuzzleOrientation(DtTaitBryan & orient);
114  virtual const DtRwTaitBryan & muzzleOrientation() const;
115  virtual bool muzzleOrientationSpecified() const;
116 
118  virtual void setFuseType(int i);
119  virtual bool fuseTypeSpecified() const;
120  virtual DtDetonatorFuze fuseType() const;
121 
122  virtual void setGenerateKnownTargetPoint(bool);
123  virtual bool generateKnownTargetPoint() const;
124 
128  virtual void setKnownTargetPointName(const DtString&);
129  virtual const DtString& knownTargetPointName() const;
130 
131  virtual void setContinuousFire(bool);
132  virtual bool continuousFire() const;
133 
134  virtual void setFireMissionIndex(unsigned int);
135  virtual unsigned int fireMissionIndex() const;
136 
137 
140  virtual int netRepSize() const override;
141 
143  virtual bool setFromNet(const char* contentBuffer,
144  unsigned contentSize) override;
145 
148  virtual bool setToNet() override;
149 
154  virtual DtString parameterStringRep() const;
155 
156 protected:
161 
167 
172 
175 
179 
182 
186 
189 };
190 
DtRwBoolean myContinuousFire
Whether or not the firing will be continuous until a cease fire task is received. ...
Definition: fireForEffectTask.h:181
DtRwReal myMuzzleSpeed
In some circumstances like a hand tossed grenade the user may want to temper the force with which the...
Definition: fireForEffectTask.h:170
DtRwInt myFuseType
Definition: fireForEffectTask.h:165
DtRwString myAmmoType
Indicates the ammo type to be fired.
Definition: fireForEffectTask.h:188
DtRwTaitBryan myMuzzleOrientation
Definition: fireForEffectTask.h:171
DtRwString myWeaponId
Weapon ID string for the weapon that should be used. Replaces myWeaponNames in VRF 5...
Definition: fireForEffectTask.h:185
DtRwReal myHeightAboveTerrain
Definition: fireForEffectTask.h:164
Description: Readable, Writable DtString Variable substitutions are done on this object when it is re...
Definition: rwString.h:20
Description: Readable, Writable DtTaitBryan.
Definition: rwTaitBryan.h:20
Definition: readerWriterRegistry.h:39
DtRwBoolean myGenerateKnownTargetPoint
On detonation create a known target point of first two letters of shooters name plus 4 random numbers...
Definition: fireForEffectTask.h:174
Contains the DtRwTaitBryan class declaration.
DtRwString myKnownTargetPointName
If generating a known point, set this text to be the name of the known point rather than having the s...
Definition: fireForEffectTask.h:178
virtual bool setFromNet(const char *contentBuffer, unsigned contentSize)
Sets mySubtask member from the incoming contentBuffer (cast to type DtNetSimTask). Derived classes should call down to this function first, and then extract their own data starting at the location contentBuffer + DtSimTask::netRepSize().
Description: Readable, Writable int.
Definition: rwInt.h:25
virtual bool setToNet()
Calls netRep() to create the network buffer. Casts the resulting myNetRep to type DtNetSimTask*...
#define DT_DLL_vrftasks
This file is used to determine how to build.
Definition: vrftasksDefines.h:26
Description: Readable, Writable DtReal (double)
Definition: rwReal.h:27
DtRwReal myDispersionRadius
Definition: fireForEffectTask.h:163
Description: Readable, Writable bool.
Definition: rwBoolean.h:26
DtRwStringList myWeaponNames
Definition: fireForEffectTask.h:160
DtSimTask is an abstract base class from which real tasks can derive. It manages the read/write capab...
Definition: simTask.h:30
const DtSimTask & operator=(const DtSimTask &orig)
assignment operator; same as copy constructor
DtRwInt myNumberOfRounds
Definition: fireForEffectTask.h:162
Definition: rwStringList.h:20
DtRwInt myFireMissionIndex
Definition: fireForEffectTask.h:166
File: fireForEff.h.
Definition: fireForEffectTask.h:32
virtual int netRepSize() const
Returns the size in bytes of the network representation of the class. This is the size in bytes of th...

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)