![]() |
VR-Forces 5.0.2 Developer's Guide
|
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.
DtSinleConnectionInputPorts allow only a single active connection at a time. If a connection with a better priority attempts to activate, other connections will be deactivated.
This is an abstract base class. Derived types must provide an acceptType method that specifies which DtPortData types this port is capable if receiving, and accessors for the values within the DtPortData types it is accepting.

Public Member Functions | |
| DtMultiConnectionInputPort (const DtString &portName) | |
| virtual | ~DtMultiConnectionInputPort () |
| virtual void | receiveData (DtPortData *data, const DtPortConnection *conn) |
| virtual bool | attemptToActivateConnection (DtPortConnection *conn, int connectionPriority) |
| virtual bool | canActivate (const DtPortConnection *conn, int connectionPriority) const |
| virtual void | deactivateConnection (DtPortConnection *conn) |
| virtual bool | activeConnection () const |
| virtual bool | connectionActive (const DtPortConnection *connection) const |
| virtual int | connectionPriority () const |
Public Member Functions inherited from DtInputPort | |
| DtInputPort (const DtString &portName) | |
| virtual | ~DtInputPort () |
| virtual const DtString & | name () const |
| virtual bool | acceptType (const DtString &type) const =0 |
| virtual void | addConnection (DtPortConnection *conn) |
| virtual void | removeConnection (DtPortConnection *conn) |
| virtual const DtList * | connectionList () const |
| virtual bool | newData () const |
| virtual void | dataReceived () |
| virtual bool | enabled () const |
| virtual void | setEnabled (bool flag) |
Protected Attributes | |
| DtMultiConnectionInputPortConnectionMap | myCurrentConnections |
Protected Attributes inherited from DtInputPort | |
| DtString | myName |
| bool | myNewDataFlag |
| bool | myEnabled |
| DtList | myConnectionList |
Private Member Functions | |
| DtMultiConnectionInputPort () | |
| DtMultiConnectionInputPort (const DtMultiConnectionInputPort &) | |
| DtMultiConnectionInputPort & | operator= (const DtMultiConnectionInputPort &) |
| DtMultiConnectionInputPort::DtMultiConnectionInputPort | ( | const DtString & | portName | ) |
Constructor.
|
virtual |
Destructor.
|
private |
Not implemented.
|
private |
Not implemented.
|
private |
Not implemented.
|
virtual |
clones the specified DtPortData into the connection slot corresponding to the connection. conn must be an active connection for the data to be received.
Implements DtInputPort.
|
virtual |
Activated this connection by adding an entry for it in the myCurrentConnections list.
Implements DtInputPort.
|
virtual |
Checks if this connection can be the active connection.
Implements DtInputPort.
|
virtual |
If conn is the currently active connection, it is deactivated and this port has no active input connection.
Implements DtInputPort.
|
virtual |
Returns true if there is an active connection into this port.
Implements DtInputPort.
|
virtual |
Returns true if the specified connection is currently active.
Implements DtInputPort.
|
virtual |
Always returns -1, since any number of active input conenctions are always allowed.
Implements DtInputPort.
|
protected |