VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
multiConnectionInputPort.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2005 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 /*******************************************************************************
6 ** $RCSfile: multiConnectionInputPort.h,v $ $Revision: 1.4 $ $State: Exp $
7 *******************************************************************************/
8 
11 
17 
18 #ifndef multiConnectionInputPort_H_
19 #define multiConnectionInputPort_H_
20 
21 #include "vrfobjcore/inputPort.h"
22 #include <map>
24 
25 typedef std::map<const DtPortConnection*, DtPortData*> DtMultiConnectionInputPortConnectionMap;
26 
43 {
44 public:
45 
47  DtMultiConnectionInputPort(const DtString& portName);
49  virtual ~DtMultiConnectionInputPort();
50 
51 private:
58 
59 public:
60 
64  virtual void receiveData(DtPortData* data, const DtPortConnection* conn);
65 
69  int connectionPriority);
70 
72  virtual bool canActivate(const DtPortConnection* conn, int connectionPriority) const;
73 
76  virtual void deactivateConnection(DtPortConnection* conn);
77 
79  virtual bool activeConnection() const;
80 
82  virtual bool connectionActive(const DtPortConnection* connection) const;
83 
86  virtual int connectionPriority() const;
87 
88 protected:
90 };
91 
92 #endif
DtMultiConnectionInputPortConnectionMap myCurrentConnections
Definition: multiConnectionInputPort.h:89
virtual bool canActivate(const DtPortConnection *conn, int connectionPriority) const =0
Checks if this connection can be the active connection.
virtual bool attemptToActivateConnection(DtPortConnection *conn, int connectionPriority)=0
Attempt to make this connection the active connection providing data to this port with the specified ...
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 bool activeConnection() const =0
Returns true if there is an active connection into this port.
Input ports are data ports owned by data consumers. They receive data from a DtPortConnection, and make that data available to the user of the input port. Users of the port should call newData() to check if new data has arrived on this port, and then call dataReceived() to signal that they have received and processed the data currently on the port.
Definition: multiConnectionInputPort.h:42
A DtPortConnection represents a connection between a DtOutputPort and a DtInputPort. PortConnections can be either active or inactive. An active connection is a connection which is supplying data, while an inactive connection is not currently supplying data. Data must be passed through connections as DtPortData.
Definition: portConnection.h:29
DtInputPort & operator=(const DtInputPort &)
Not implemented.
#define DT_DLL_vrfobjcore
This file is used to determine how to build.
Definition: vrfobjcoreDefines.h:24
virtual int connectionPriority() const =0
Returns the current connection priority.
virtual void deactivateConnection(DtPortConnection *conn)=0
Deactivate conn if it is currently active.
virtual bool connectionActive(const DtPortConnection *connection) const =0
Returns true if the specified connection is currently active.
Instances of DtInputPort are are data ports owned by data consumers. They receive data from a DtPortC...
Definition: inputPort.h:42
std::map< const DtPortConnection *, DtPortData * > DtMultiConnectionInputPortConnectionMap
File: multiConnectionInputPort.h.
Definition: multiConnectionInputPort.h:25
virtual void receiveData(DtPortData *data, const DtPortConnection *connection)=0
clones the specified DtPortData into myData, and sets the newDataFlag to true.

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)