VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ammunitionIOPort.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2003 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 /*******************************************************************************
6 ** $RCSfile: ammunitionIOPort.h,v $ $Revision: 1.7 $ $State: Exp $
7 *******************************************************************************/
8 
11 
14 
15 #ifndef DtAmmunitionInputPort_H_
16 #define DtAmmunitionInputPort_H_
17 
20 #include "vrfobjcore/outputPort.h"
21 #include "vrfobjcore/portData.h"
22 #include "vrfutil/simMunition.h"
23 #include <vlpi/disEnums.h>
24 
29 {
30 public:
31 
32  DtAmmunitionInputPort(const DtString& portName);
33  virtual ~DtAmmunitionInputPort() override;
34 
36  virtual bool acceptType(const DtString& type) const override;
37 
39  virtual const DtSimMunition munition() const;
40 
42  virtual const DtDetonatorFuze fuze() const;
43 };
44 
49 {
50 public:
51  DtAmmunitionOutputPort(const DtString& portName);
52  virtual ~DtAmmunitionOutputPort() override;
53 
55  virtual const DtString type() const override;
56 
58  virtual void createPortData() override;
59 
61  virtual void setMunition(const DtSimMunition& munition);
62 
64  virtual const DtSimMunition munition() const;
65 
67  virtual void setFuze(DtDetonatorFuze fuze);
68 
70  virtual const DtDetonatorFuze fuze() const;
71 };
72 
78 {
79 public:
83  virtual ~DtAmmunitionPortData() override;
88 
90  virtual const DtString type() const override;
91 
93  virtual void setMunition(const DtSimMunition& munition);
94 
96  virtual const DtSimMunition munition() const;
97 
99  virtual void setFuze(DtDetonatorFuze fuze);
100 
102  virtual const DtDetonatorFuze fuze() const;
103 
105  virtual DtPortData* clone() const override;
106 
107  virtual void updateImgui() override;
108 
109 protected:
111  DtDetonatorFuze myFuze;
112 };
113 
114 #endif
virtual const DtString type() const =0
Override for each derrived class to return a unique type string. This type string is the type of the ...
Contains class declarations for DtAmmunitionInputPort, DtAmmunitionOutputPort, and DtAmmunitionPortDa...
Definition: ammunitionIOPort.h:28
Instances of DtAmmunitionOutputPort are output ports through which data producers can send informatio...
Definition: ammunitionIOPort.h:48
Contains the DtOutputPort class declaration.
This file contains the class declaration for the.
Contains the class declaration for DtSingleConnectionInputPort.
Definition: singleConnectionInputPort.h:36
Instances of DtAmmunitionPortData are concrete data elements containing information about simulated m...
Definition: ammunitionIOPort.h:77
This is an abstract base class for all data elements that are passed through ports. Derived types will be such things as DtAnalogPortData which manage a double, or more complex data types such as a target list. Derived types must provide a type() method with a unique type string and a clone() method for copying the data.
Definition: portData.h:25
virtual void updateImgui()=0
Outputs the current data value to ImGui.
virtual void createPortData()=0
Override for each derived class to create and set the internal DtPortData representation.
virtual bool acceptType(const DtString &type) const =0
Returns true if this port should accept the receipt of the specified DtPortData type. Override this function to return true for the types your port will accept.
#define DT_DLL_vrfobjcore
This file is used to determine how to build.
Definition: vrfobjcoreDefines.h:24
virtual const DtString type() const =0
Returns a string type value for this class. Provide a unique string for each DtPortData class...
DtSimMunition myMunition
Definition: ammunitionIOPort.h:110
DtOutputPorts are data ports owned by data producers. They are connected to DtPortConnections and sen...
Definition: outputPort.h:42
virtual DtPortData * clone() const =0
Provides a copy of this port data.
DtSimMunition class.
Definition: simMunition.h:31
DtDetonatorFuze myFuze
Definition: ammunitionIOPort.h:111
DtPortData & operator=(const DtPortData &orig)
Assignment operator.

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)