VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
launchExpendableResourceController.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2012 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
9 #pragma once
10 
12 #include "vlutil/vlString.h"
14 
18 class DtMunitionResource;
19 
26 {
27 public:
30  DtSimManager * simManager, DtComponentDescriptor* desc = NULL,
31  DtReaderWriterRegistry * parentRegistry = 0);
32 
35 
38 
41 
44  virtual const char* type() const;
45 
47  virtual void registerTaskMsgCallbacks();
48 
49  static void setAutoLaunchEnabledCallback(DtSimMessage * msg, void * usr);
50 
51  static void launchCallback(DtSimMessage* msg, void* usr, DtSimTaskStatePtr taskStatePtr);
52 
53  virtual DtSimTaskStatePtr currentTaskState() const;
54 
57  virtual void processSetAutoLaunchEnabled(DtSimMessage* msg);
58 
61  virtual bool init();
62 
66  virtual void preFirstTickInit();
67 
70  virtual void tick();
71 
73  virtual void taskComplete(bool success = true);
74 
76  static DtSimComponent* creator(const DtString & name, DtVrfObject* owner,
77  DtSimManager * simManager, DtComponentDescriptor* desc,
78  DtReaderWriterRegistry * parentRegistry);
79 
83  virtual DtMunitionResource* lookupExpendableResource(const DtString & resourceName);
84 
90  virtual bool launchExpendableResources(int numberToFire);
91 
92 protected:
93  virtual void processLaunch(const DtTaskMessage& msg, DtSimTaskStatePtr taskStatePtr);
94 
96  virtual bool createPSR();
97 
102  virtual bool autoLaunchTriggered();
103 
104  virtual DtString selectResourceForAutoLaunch(const DtObjectType & missileType);
105 
106  virtual void setupAutoLaunchTriggerList();
107  virtual void setUpAutoLaunchTaskFromDescriptor();
108 
110  virtual DtVrfObject* createResourceObject(const DtObjectType & objType);
111 
112 protected:
114 
118 
123 
125 };
126 
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
int myNumberPerInterval
Definition: launchExpendableResourceController.h:121
DtVrfObject is used to represent any type of simulated object (entities, aggregate, control objects) in a VR-Forces application.
Definition: vrfObject.h:215
virtual void registerTaskMsgCallbacks()
DtLaunchExpendableResourceTask represents a launching task where by the entity will launch the specif...
Definition: launchExpendableResourceTask.h:30
virtual void preFirstTickInit()
This function can be overridden to initialize a component before it is ticked for the first time...
This class provides a base class for all controllers that are capable of executing a DtSimTask...
Definition: singleTaskControllerComponent.h:20
DtLaunchExpendableResourceControllerDescriptor; descriptor for the DtLaunchExpendableResourceControll...
Definition: launchExpendableResourceControllerDescriptor.h:41
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:42
Definition: readerWriterRegistry.h:39
virtual const char * type() const =0
Returns a string identifies the class type of component.
virtual bool init()
Calls setRadio()
virtual void taskComplete(bool success=true)
If we are currently tasked, this will cause us to notify the entity that we're done and delete the ta...
DtLaunchExpendableResourcePSR * myProcessState
Saved out in the Order of Battle file(.oob).This will save out how many resources we have left to fir...
Definition: launchExpendableResourceController.h:117
DtBoost::shared_ptr< DtSimTaskState > DtSimTaskStatePtr
Definition: taskAndTaskStateDefines.h:18
Definition: objectType.h:27
DtManagedObjectListConstPtr myAutoDetectObjectsList
Definition: launchExpendableResourceController.h:124
DtString myResourceName
Definition: launchExpendableResourceController.h:120
DtLaunchExpendableResourceTask * myAutoLaunchTask
Definition: launchExpendableResourceController.h:122
const DtLaunchExpendableResourceControllerDescriptor * myDesc
Definition: launchExpendableResourceController.h:113
File: simMsg.h.
Definition: simMessage.h:35
virtual void tick()
This gives the thread of control to the component.
virtual DtSimTaskStatePtr currentTaskState() const
End User Description: This controller handles DtLaunchExpendableResourceTask tasks.
Definition: launchExpendableResourceController.h:25
double myTimeInterval
Definition: launchExpendableResourceController.h:119
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:67
const DtTaskControllerComponent & operator=(const DtTaskControllerComponent &orig)
assignment operator
DtBoost::shared_ptr< const DtManagedObjectList > DtManagedObjectListConstPtr
Typedef for a shared pointer to a const DtOrgViewManagedObjectList.
Definition: managedObjectList.h:31
The simulation engine is controlled by a single,top-level class called the Simulation Manager...
Definition: simManager.h:103
class DtLaunchExpendableResourcePSR:
Definition: launchExpendableResourcePSR.h:24
A DtTaskMsg is a DtRadioMsg with a pointer to a task.
Definition: taskMessage.h:19
Contains the DtMunitionResource class declaration.
Definition: munitionResource.h:24

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)