VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
laserLauncherPSR.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 #include "vrfobjcore/simObject.h"
19 
20 #include <readerWriter/rwString.h>
21 #include <readerWriter/rwBoolean.h>
22 #include <readerWriter/rwReal.h>
23 #include <readerWriter/rwInt.h>
24 #include "readerWriter/rwVector.h"
25 #include <vrfutil/rwUUID.h>
27 
32 
35 {
36 
37 protected:
40 
41 public:
42  enum TaskStep
43  {
44  TaskStep_Idle = 0,
45  TaskStep_Trigger = 1,
46  TaskStep_MissileInFlight = 2
47  };
48 
49  //constructor
51  const DtString& rwName = DtString::nullString(),
52  DtReaderWriterRegistry* parentRegistry = nullptr);
53 
54  //copy constructor
56  const DtString& rwName = DtString::nullString(),
57  DtReaderWriterRegistry* parentRegistry = nullptr);
58 
59  //assignment operator
61  const DtLaserLauncherPSR& orig);
62 
63  //destructor
64  virtual ~DtLaserLauncherPSR();
65 
66  //returns a copy of the PSR
68  const DtString& rwName = DtString::nullString(),
69  DtReaderWriterRegistry* parentRegistry = nullptr) const override;
70 
72  virtual DtString type() const override;
73 
75  virtual void setDesignatorCode(const int code);
76  virtual const int designatorCode() const;
77 
79  virtual void setLastLaunchTime(double time);
80  virtual double lastLaunchTime() const;
81 
83 
84  virtual void setMissileInFlight(const DtUUID&);
86 
88  virtual bool missileInFlightSpecified() const;
89 
91  virtual DtSimObjectReference missileInFlight() const;
93 
94  virtual void setTaskStep(int v);
95  virtual int taskStep() const;
96 
98  static DtVrfProcessStateRepository* creator(const DtString& name,
99  DtLocalObject* vrfObject, DtReaderWriterRegistry* parentRegistry);
100 
101 protected:
108 };
UUID is a unique ID wrapper class.
Definition: uuid.h:59
DtRwReal myLastLaunchTime
Definition: laserLauncherPSR.h:103
TaskStep
Definition: laserLauncherPSR.h:42
The DtSimObjectReference is a shared pointer that can be used amongst many object for access to the u...
Definition: simObjectReference.h:26
Definition: readerWriterRegistry.h:39
Contains the DtUUID class declaration.
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
Description: Readable, Writable int.
Definition: rwInt.h:25
virtual DtVrfProcessStateRepository * clone(const DtString &rwName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0) const =0
DtRwInt myDesignatorCode
Definition: laserLauncherPSR.h:102
Description: Readable, Writable DtReal (double)
Definition: rwReal.h:27
File: laserLauncherPSR.h.
Definition: laserLauncherPSR.h:34
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
DtRwInt myTaskStep
enumerated step of the task execution.
Definition: laserLauncherPSR.h:107
virtual DtString type() const =0
Returns the string type of the repository, as defined in procSRTypes.h.
DtRwSimObjectReference myMissileInFlight
The current missile in flight (if any)
Definition: laserLauncherPSR.h:105
File: rwVector.h.
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

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)