VR-Forces 5.0.2 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
analogIOPort.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2003 MaK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 /*******************************************************************************
6 ** $RCSfile: analogIOPort.h,v $ $Revision: 1.6 $ $State: Exp $
7 *******************************************************************************/
8 
11 
14 
15 #ifndef DtAnalogInputPort_H_
16 #define DtAnalogInputPort_H_
17 
20 #include "vrfobjcore/outputPort.h"
21 #include "vrfobjcore/portData.h"
22 
26 {
27 public:
28 
29  DtAnalogInputPort(const DtString& portName);
30  virtual ~DtAnalogInputPort();
31 
33  virtual bool acceptType(const DtString& type) const;
34 
37  virtual void receiveData(DtPortData* data);
38 
40  virtual double value() const;
41 };
42 
46 {
47 public:
48 
49  DtAnalogOutputPort(const DtString& portName);
50  virtual ~DtAnalogOutputPort();
51 
53  virtual const DtString type() const;
54 
56  virtual void createPortData();
57 
60  virtual void setValue(double value);
61 
63  virtual double value() const;
64 };
65 
70 {
71 public:
72 
76  virtual ~DtAnalogPortData();
81 
83  virtual const DtString type() const;
84 
86  virtual void setValue(double v);
87 
89  virtual double value() const;
90 
92  virtual DtPortData* clone() const;
93 
94 protected:
95  double myValue;
96 };
97 
98 #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 ...
Instances of DtAnalogPortData are concrete data elements containing a real number that can be exchang...
Definition: analogIOPort.h:69
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 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 recipt of the specified DtPortData type. Override this function to return true for the types your port will accept.
Instances of DtAnalogOutputPort are input ports through which data producers can send real numbers...
Definition: analogIOPort.h:45
#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...
DtOutputPorts are data ports owned by data producers. They are connected to DtPortConnections and sen...
Definition: outputPort.h:42
double myValue
Definition: analogIOPort.h:95
Contains class declarations for DtAnalogInputPort, DtAnalogOutputPort, and DtAnalogPortData.
Definition: analogIOPort.h:25
virtual void receiveData(DtPortData *data, const DtPortConnection *conn=0)
clones the specified DtPortData into myData, and sets the newDataFlag to true. conn is not used by th...
virtual DtPortData * clone() const =0
Provides a copy of this port data.
DtPortData & operator=(const DtPortData &orig)
Assignment operator.

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)