VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
vectorIOPort.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2003 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 /*******************************************************************************
6 ** $RCSfile: vectorIOPort.h,v $ $Revision: 1.7 $ $State: Exp $
7 *******************************************************************************/
8 
11 
14 
15 #ifndef DtVectorIOPort_H_
16 #define DtVectorIOPort_H_
17 
18 #include <matrix/vlVector.h>
19 
21 #include "vrfobjcore/outputPort.h"
22 #include "vrfobjcore/portData.h"
23 
28 {
29 public:
31  DtVectorInputPort(const DtString & portName);
32 
34  virtual ~DtVectorInputPort() override;
35 
37  virtual bool acceptType(const DtString& type) const override;
38 
39  virtual void receiveData(DtPortData* data);
40 
41  virtual const DtVector value() const;
42 
43 protected:
47  const DtVectorInputPort & operator=(const DtVectorInputPort & orig);
48 };
49 
53 {
54 public:
55  DtVectorOutputPort(const DtString& portName);
56  virtual ~DtVectorOutputPort() override;
57 
59  virtual const DtString type() const override;
60 
62  virtual void createPortData() override;
63 
66  virtual void setValue(const DtVector& vector);
67 
69  virtual const DtVector value() const;
70 
71 protected:
75  const DtVectorOutputPort & operator=(const DtVectorOutputPort & orig);
76 };
77 
82 {
83 public:
87  virtual ~DtVectorPortData() override;
92 
94  virtual const DtString type() const override;
95 
97  virtual void setValue(const DtVector&);
98 
100  virtual const DtVector& value() const;
101 
103  virtual DtPortData* clone() const override;
104 
105  virtual void updateImgui() override;
106 
107 protected:
108  DtVector myValue;
109 };
110 
111 #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 ...
DtVector myValue
Definition: vectorIOPort.h:108
Contains the DtOutputPort class declaration.
Contains the class declaration for DtSingleConnectionInputPort.
Definition: singleConnectionInputPort.h:36
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.
Contains class declarations for DtVectorInputPort, DtVectorOutputPort, and DtVectorPortData.
Definition: vectorIOPort.h:27
DtOutputPort & operator=(const DtOutputPort &)
Not implemented.
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.
virtual void receiveData(DtPortData *data, const DtPortConnection *conn=0) override
clones the specified DtPortData into myData, and sets the newDataFlag to true. conn is not used by th...
Instances of DtAmmunitionPortData are concrete data elements containing a DtVector that can be exchan...
Definition: vectorIOPort.h:81
#define DT_DLL_vrfobjcore
This file is used to determine how to build.
Definition: vrfobjcoreDefines.h:24
Instances of DtVectorOutputPort are output ports through which data producers can send a DtVector...
Definition: vectorIOPort.h:52
virtual const DtString type() const =0
Returns a string type value for this class. Provide a unique string for each DtPortData class...
DtSingleConnectionInputPort & operator=(const DtSingleConnectionInputPort &)
Not implemented.
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.
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)