VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
weaponInfoList.h
Go to the documentation of this file.
1 #pragma once
2 
5 #include <map>
6 
8 
9 class DtLocalObject;
10 class DtVrfObjectMessage;
11 
12 
14 {
15 public:
16  typedef std::map<DtString, DtWeaponInfoInterface*> WeaponInterfaceMap;
17 
18  DtWeaponInfoList(DtLocalObject* localObject);
19  virtual ~DtWeaponInfoList();
20 
23  virtual bool init();
24 
29  virtual bool addWeaponInfo(const DtString& requestedId, DtWeaponInfoInterface* weaponInfo);
31  virtual void removeWeaponInfo(DtWeaponInfoInterface* weaponInfo);
32 
33  virtual const DtWeaponInfoInterface* weaponInfo(const DtString& weaponId) const;
34  virtual const WeaponInterfaceMap& weaponInfos() const;
35 
39  virtual bool blockedByOtherWeapon(const DtString& weaponId, DtString& blockingWeaponId) const;
40 
44  virtual bool weaponsConflict(const DtString& weapon1Id, const DtString& weapon2Id) const;
45 
50  virtual DtString weaponIdFromOldWeaponString(const DtString& pre51WeaponString) const;
51 
54 
55  static void weaponListRequestCallback(const DtVrfObjectMessage* msg, void* usr);
56  virtual void processWeaponListRequest(const DtVrfObjectMessage* msg);
58 
59 protected:
62  virtual DtWeaponSystemType lookupWeaponType(std::list<DtSimTaskMessageType>& fireTaskTypes);
63 
64  virtual bool tokenConflict(const DtWeaponInfoInterface* weapon1, const DtWeaponInfoInterface* weapon2) const;
65  virtual bool artPartConflict(const DtWeaponInfoInterface* weapon1, const DtWeaponInfoInterface* weapon2) const;
66 
67 protected:
70 };
DtLocalObject * myLocalObject
Definition: weaponInfoList.h:69
std::map< DtString, DtWeaponInfoInterface * > WeaponInterfaceMap
Definition: weaponInfoList.h:16
DtWeaponSystemType
This now allows us to query the backend for specific types of weapons.
Definition: weaponListResponseAdmin.h:17
#define DT_DLL_vrfobjcore
This file is used to determine how to build.
Definition: vrfobjcoreDefines.h:24
WeaponInterfaceMap myWeaponInfos
Definition: weaponInfoList.h:68
The base class for all messages to/from a specific DtVrfObject. Various subclasses of this class will...
Definition: vrfObjectMessage.h:30
DT_DLL_DEBUGDRAWRENDERER void init(makVrv::DtDe &de)
Work function for the plugin initialization.
Abstract interface class for Weapon Information. This is used by DtWeaponInterfaceList. All code that is accessing information about weapons will have access to this base class only, and only be able to read the data. Weapon controllers will have derived versions that implement key functions for their specific weapon.
Definition: weaponInfoInterface.h:18
Definition: weaponInfoList.h:13
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)