VR-Forces 5.0.1 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
launchExpendableResourcePSR.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2011 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 /*******************************************************************************
6 ** $RCSfile: launchExpendableResourcePSR.h,v $ $Revision: 1.1 $ $State: Exp $
7 ** Created: 4/28/11 MEM
8 *******************************************************************************/
9 
10 #pragma once
11 
13 #include <readerWriter/rwInt.h>
14 #include <readerWriter/rwReal.h>
15 #include <readerWriter/rwBoolean.h>
16 #include <readerWriter/rwString.h>
17 
18 #include <set>
19 
25 
28 {
29 public:
30 
31  enum TaskState
32  {
37  TaskFailed
38  };
39 
42  const DtString& rwName = DtString::nullString(),
43  DtReaderWriterRegistry* parentRegistry = 0);
44 
47  const DtString& rwName = DtString::nullString(),
48  DtReaderWriterRegistry* parentRegistry = 0);
49 
52 
55 
58  const DtString& rwName = DtString::nullString(),
59  DtReaderWriterRegistry* parentRegistry = 0) const;
60 
62  virtual DtString type() const;
63 
65  virtual void setNumberLeftToFire(const int number);
66  virtual const int numberLeftToFire() const;
67 
69  virtual void reduceNumberLeftToFire(const int reduce);
70 
72  virtual void setElapsedTimeBetweenInterval(const double time);
73  virtual const double elapsedTimeBetweenInterval() const;
74 
77  virtual void setAutoLaunchEnabled(bool enabled);
78  virtual bool autoLaunchEnabled() const;
79  virtual bool autoLaunchEnabledOnSpecified() const;
80 
84  virtual void setAutoLaunchSubtaskId(const int id);
85  virtual const int autoLaunchSubtaskId() const;
86 
87  virtual void setAutoLaunchRange(const double range);
88  virtual const double autoLaunchRange() const;
89 
91  virtual void setElapsedTimeBetweenAutoLaunches(const double time);
92  virtual const double elapsedTimeBetweenAutoLaunches() const;
93 
95  virtual void addLaunchableResource(const DtString& resourceName);
96 
98  virtual bool isLaunchableResource(const DtString& resourceName) const;
99 
101  virtual void setResourceToUse(const DtString& resourceName);
102  virtual DtString resourceToUse() const;
103 
105  virtual void setTimeInterval(double interval);
106  virtual double timeInterval() const;
107 
109  virtual void setTaskState(TaskState interval);
110  virtual TaskState taskState() const;
111 
112 public:
113 
115  static DtVrfProcessStateRepository* creator (const DtString& rwName,
116  DtLocalObject* vrfObject, DtReaderWriterRegistry* parentRegistry);
117 
118 protected:
119 
123 
128 
133 
136 
139 
141 
145 
146  std::set<DtString> myLaunchableResources;
147 };
Definition: launchExpendableResourcePSR.h:33
DtRwReal myTimeElapsedBetweenAutoLaunches
Time elapsed since last autoLaunch.
Definition: launchExpendableResourcePSR.h:138
std::set< DtString > myLaunchableResources
Definition: launchExpendableResourcePSR.h:146
DtRwInt myTaskState
Definition: launchExpendableResourcePSR.h:144
Description: Readable, Writable DtString Variable substitutions are done on this object when it is re...
Definition: rwString.h:20
TaskState
Definition: launchExpendableResourcePSR.h:31
Definition: readerWriterRegistry.h:39
DtRwInt myAutoLaunchSubtaskId
Definition: launchExpendableResourcePSR.h:140
DtRwString myResourceToUse
Definition: launchExpendableResourcePSR.h:142
DtRwReal myElapsedTimeBetweenInterval
This is the time elapsed since the last time we fired a resource. We keep track of this so we can det...
Definition: launchExpendableResourcePSR.h:127
#define DT_DLL_vrfobjcore
This file is used to determine how to build.
Definition: vrfobjcoreDefines.h:24
Definition: launchExpendableResourcePSR.h:36
Description: Readable, Writable int.
Definition: rwInt.h:25
virtual DtVrfProcessStateRepository * clone(const DtString &rwName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0) const =0
Definition: launchExpendableResourcePSR.h:35
DtRwBoolean myAutoLaunchEnabled
Stores whether the entity is enabled to automatically launch its resources when it reaches auto launc...
Definition: launchExpendableResourcePSR.h:132
Description: Readable, Writable DtReal (double)
Definition: rwReal.h:27
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
DtRwReal myTimeInterval
Definition: launchExpendableResourcePSR.h:143
Definition: launchExpendableResourcePSR.h:34
virtual DtString type() const =0
Returns the string type of the repository, as defined in procSRTypes.h.
DtRwReal myAutoLaunchRange
Stores the range within which the entity can automatically launch its resources.
Definition: launchExpendableResourcePSR.h:135
DtRwInt myNumberLeftToFire
This stores how much time has passed since the limit existence controller was created in the simulati...
Definition: launchExpendableResourcePSR.h:122
class DtLaunchExpendableResourcePSR:
Definition: launchExpendableResourcePSR.h:27
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 Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)