VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
integerIOPort.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2003 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 /*******************************************************************************
6 ** $RCSfile: integerIOPort.h,v $ $Revision: 1.8 $ $State: Exp $
7 *******************************************************************************/
8 
11 
14 
15 #ifndef DtIntegerInputPort_H_
16 #define DtIntegerInputPort_H_
17 
19 #include "vrfobjcore/outputPort.h"
20 #include "vrfobjcore/portData.h"
21 
26 {
27 public:
28  DtIntegerInputPort(const DtString& portName);
29  virtual ~DtIntegerInputPort();
30 
32  virtual bool acceptType(const DtString& type) const;
33 
37  virtual void receiveData(DtPortData* data);
38 
40  virtual int value() const;
41 };
42 
46 {
47 public:
48  DtIntegerOutputPort(const DtString& portName);
49  virtual ~DtIntegerOutputPort();
50 
52  virtual const DtString type() const;
53 
55  virtual void createPortData();
56 
59  virtual void setValue(int value);
60 
62  virtual int value() const;
63 };
64 
69 {
70 public:
74  virtual ~DtIntegerPortData();
79 
81  virtual const DtString type() const;
82 
84  virtual void setValue(int v);
85 
87  virtual int value() const;
88 
90  virtual DtPortData* clone() const;
91 
92 protected:
93  int myValue;
94 };
95 
96 #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 DtIntegerPortData are concrete data elements containing an integer value that can be exc...
Definition: integerIOPort.h:68
Contains the DtOutputPort class declaration.
int myValue
Definition: integerIOPort.h:93
Contains class declarations for DtIntegerInputPort, DtIntegerOutputPort, and DtIntegerPortData.
Definition: integerIOPort.h:25
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.
#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
Instances of DtIntegerOutputPort are output ports through which data producers can send integer value...
Definition: integerIOPort.h:45
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 Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)