VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
vrfWeaponPSR.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2015 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
14 
15 #pragma once
16 
18 
19 #include <readerWriter/rwString.h>
20 #include <readerWriter/rwBoolean.h>
21 #include <readerWriter/rwReal.h>
23 #include <vrfutil/rwUUID.h>
25 #include <vrfobjcore/simObject.h>
30 
32 {
33 
34 protected:
35 
37 
38 public:
39 
40  DtVrfWeaponPSR(DtLocalObject* vrfObject,
41  const DtString& rwName = DtString::nullString(),
42  DtReaderWriterRegistry* parentRegistry = nullptr);
43 
44  DtVrfWeaponPSR(const DtVrfWeaponPSR& orig,
45  const DtString& rwName = DtString::nullString(),
46  DtReaderWriterRegistry* parentRegistry = nullptr);
47 
48  const DtVrfWeaponPSR& operator=(
49  const DtVrfWeaponPSR& orig);
50 
51  virtual ~DtVrfWeaponPSR();
52 
54  const DtString& rwName = DtString::nullString(),
55  DtReaderWriterRegistry* parentRegistry = nullptr) const override;
56 
58  virtual DtString type() const override;
59 
63  virtual void setUserTargetOverride(bool userTargetOverride);
64  virtual bool userTargetOverride() const;
65 
68  virtual void setCurrentTarget(const DtUUID&,
69  bool targetOverride = false);
70 
72  virtual DtSimObjectReference currentTarget() const;
73 
77  virtual void setCurrentLocationTarget(const DtVector& locationTarget,
78  bool targetOverride = false);
79 
81  virtual DtVector currentLocationTarget() const;
82 
84  virtual const DtVrfMunitionLoader& munitionLoader() const;
85  virtual DtVrfMunitionLoader& munitionLoader();
86 
88  virtual void setCurrentMunitionName(const DtString& currentMunitionName);
90  virtual const DtString& currentMunitionName() const;
91 
93  virtual bool targetAcquired() const;
94  virtual void setTargetAcquired(bool targetAcquired);
95 
97  virtual bool weaponAimed() const;
98  virtual void setWeaponAimed(bool aimed);
99 
101  static DtVrfProcessStateRepository* creator(const DtString& name,
102  DtLocalObject* vrfObject, DtReaderWriterRegistry* parentRegistry);
103 
106  virtual void addActiveMissile(const DtUUID&);
107  virtual void removeActiveMissile(const DtUUID&);
108  virtual const DtRwSimObjectReferenceList& activeMissiles() const;
109  virtual DtSimObjectReference lastMissileFired() const;
110  virtual bool stillTargeting(const DtUUID&) const;
112 
115  virtual void setRoundsFiredUponTarget(const int& roundsFired);
116  virtual const int roundsFiredUponTarget() const;
118 
120 
121  virtual void setIsExplicitlyTasked(const bool& explicitlyTasked);
122  virtual const bool isExplicitlyTasked() const;
124 
126 
127  virtual void setIsInFiringCycle(const bool);
128  virtual bool isInFiringCycle()const;
130 
132 
133  virtual void setWeaponStatus(const int weaponStatus);
134  virtual const int weaponStatus() const;
135 
139  virtual void addWeaponStatus(const DtBaseWeaponComponentInterface::DtWeaponStatus weaponStatus);
140 
145  virtual void removeWeaponStatus(const DtBaseWeaponComponentInterface::DtWeaponStatus weaponStatus);
147 
148  virtual void setWeaponStowed(bool v);
149  virtual bool weaponStowed() const;
150 
152 
153  virtual void setWorkingTargetPoint(const DtUUID& id);
154  virtual DtSimObjectReference workingTargetPoint() const;
156 
157 protected:
159  virtual void missileRemoved(const DtUUID&);
160 
161 protected:
162 
168 
173 
176 
180 
185 
190 
192 
194 
195  boost::signals2::connection myActiveMissilesListConnection;
196 };
UUID is a unique ID wrapper class.
Definition: uuid.h:59
DtRwSimObjectReferenceList myActiveMissiles
Definition: vrfWeaponPSR.h:171
If you use a list of object names to archive which objects are part of a controller (or any object) u...
Definition: simObjectReferenceList.h:118
The DtSimObjectReference is a shared pointer that can be used amongst many object for access to the u...
Definition: simObjectReference.h:26
DtRwInt myWeaponStatus
Current status of the weapon, is it able to fire or not. This value is a bit field composed of the va...
Definition: vrfWeaponPSR.h:189
Description: Readable, Writable DtString Variable substitutions are done on this object when it is re...
Definition: rwString.h:20
DtRwSimObjectReference myWorkingTargetPoint
Definition: vrfWeaponPSR.h:193
Definition: readerWriterRegistry.h:39
Contains the DtUUID class declaration.
File: weaponPSR.h.
Definition: vrfWeaponPSR.h:31
DtVrfMunitionLoader myMunitionLoader
Definition: vrfWeaponPSR.h:169
DtRwBoolean myWeaponAimed
Definition: vrfWeaponPSR.h:170
Definition: rwVector.h:23
Specialized reader/writer version of the shared object reference that will encapsulate the actual sha...
Definition: rwSimObjectReference.h:21
#define DT_DLL_vrfobjcore
This file is used to determine how to build.
Definition: vrfobjcoreDefines.h:24
DtRwSimObjectReference myCurrentTarget
Definition: vrfWeaponPSR.h:164
Description: Readable, Writable int.
Definition: rwInt.h:25
virtual DtVrfProcessStateRepository * clone(const DtString &rwName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0) const =0
DtRwBoolean myIsInFiringCycle
Indicates that the weapon is in its firing cycle, which may mean is still firing a burst...
Definition: vrfWeaponPSR.h:184
DtRwNLengthUUIDVector myMissileFireOrder
Definition: vrfWeaponPSR.h:172
Class DtVrfMunitionLoader:
Definition: vrfMunitionLoader.h:22
DtWeaponStatus
The status items below are used as bit fields. To set a state, OR the enumerated value into the weapo...
Definition: baseWeaponComponentInterface.h:34
DtRwBoolean myTargetAcquired
Definition: vrfWeaponPSR.h:163
DtRwNLengthUUIDVector is a named, readable/writable vector of DtUUIDs. Can be used in place of a NLen...
Definition: rwNLengthUUIDVector.h:30
Class DtVrfProcessStateRepository: Abstract base class for all process state repositories. Process state repositories represent (potentially) shared, savable information for one or more components functioning together to achieve some process or set of processes; such as aiming and firing a weapon; moving an object; or just waiting a specified amount of time.
Definition: vrfProcessStateRepository.h:45
Description: Readable, Writable bool.
Definition: rwBoolean.h:26
DtRwVector myCurrentLocationTarget
Definition: vrfWeaponPSR.h:165
DtRwBoolean myWeaponStowed
Definition: vrfWeaponPSR.h:191
virtual DtString type() const =0
Returns the string type of the repository, as defined in procSRTypes.h.
DtRwString myCurrentMunitionName
Definition: vrfWeaponPSR.h:167
DtRwBoolean myUserTargetOverride
Definition: vrfWeaponPSR.h:166
DtRwBoolean myIsExplicitlyTasked
Tracks whether the weapon system has been explicitly tasked as opposed to a target being automaticall...
Definition: vrfWeaponPSR.h:179
DtRwInt myRoundsFiredUponTarget
Tracks rounds fired upon current target.
Definition: vrfWeaponPSR.h:175
const DtVrfProcessStateRepository & operator=(const DtVrfProcessStateRepository &orig)
A locally simulated VRF object. Holds all internal and external data for the object, and provides access to both the current frame and next frame state data for the object. All current frame data is read-only, and next-frame data can be written to. No thread safety guarantees are made on this object during the simulation frame and it should only be accessed by the thread that is simulating the object.
Definition: localObject.h:86
boost::signals2::connection myActiveMissilesListConnection
Definition: vrfWeaponPSR.h:195

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)