![]() |
VR-Forces 5.0.1 Developer's Guide
|
Instances of DtInputPort are 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.
This is an abstract base class. Derived types must provide the implementation for activating and deactivating connetions and accepting data from connections.
DtSingleConnectionInputPort and DtMultiConnectionInputPort implement this functionallity for different mechanisms of accepting data.

Public Member Functions | |
| DtInputPort (const DtString &portName) | |
| virtual | ~DtInputPort () |
| virtual const DtString & | name () const |
| virtual bool | acceptType (const DtString &type) const =0 |
| virtual void | receiveData (DtPortData *data, const DtPortConnection *connection)=0 |
| virtual bool | attemptToActivateConnection (DtPortConnection *conn, int connectionPriority)=0 |
| virtual bool | canActivate (const DtPortConnection *conn, int connectionPriority) const =0 |
| virtual void | deactivateConnection (DtPortConnection *conn)=0 |
| virtual bool | activeConnection () const =0 |
| virtual bool | connectionActive (const DtPortConnection *connection) const =0 |
| virtual int | connectionPriority () 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 | |
| DtString | myName |
| bool | myNewDataFlag |
| bool | myEnabled |
| DtList | myConnectionList |
Private Member Functions | |
| DtInputPort () | |
| DtInputPort (const DtInputPort &) | |
| DtInputPort & | operator= (const DtInputPort &) |
| DtInputPort::DtInputPort | ( | const DtString & | portName | ) |
Constructor.
|
virtual |
Destructor.
|
private |
Not implemented.
|
private |
Not implemented.
|
private |
Not implemented.
|
virtual |
Returns the name string of this port.
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.
Implemented in DtLaserDetectorInputPort, DtSensorContactListMultiInputPort, DtSensorContactListInputPort, DtStringInputPort, DtVectorInputPort, DtAmmunitionInputPort, DtCollisionInputPort, DtEntityListInputPort, DtObjectTypesListInputPort, DtOrientationInputPort, DtDualAxisAnalogInputPort, DtAnalogInputPort, DtBooleanInputPort, DtIntegerInputPort, DtObjectTypesListMultiInputPort, and DtEntityListMultiInputPort.
|
pure virtual |
clones the specified DtPortData into myData, and sets the newDataFlag to true.
Implemented in DtMultiConnectionInputPort, and DtSingleConnectionInputPort.
|
pure virtual |
Attempt to make this connection the active connection providing data to this port with the specified priority. Returns true if the activation was successful.
Implemented in DtMultiConnectionInputPort, and DtSingleConnectionInputPort.
|
pure virtual |
Checks if this connection can be the active connection.
Implemented in DtMultiConnectionInputPort, and DtSingleConnectionInputPort.
|
pure virtual |
Deactivate conn if it is currently active.
Implemented in DtMultiConnectionInputPort, and DtSingleConnectionInputPort.
|
pure virtual |
Returns true if there is an active connection into this port.
Implemented in DtMultiConnectionInputPort, and DtSingleConnectionInputPort.
|
pure virtual |
Returns true if the specified connection is currently active.
Implemented in DtMultiConnectionInputPort, and DtSingleConnectionInputPort.
|
pure virtual |
Returns the current connection priority.
Implemented in DtMultiConnectionInputPort, and DtSingleConnectionInputPort.
|
virtual |
Add an incomming connection to this port.
|
virtual |
Remove an incomming connection to this port.
|
virtual |
Returns the list of input connections to this port.
|
virtual |
Returns true if there is new data on this port that has not been received.
|
virtual |
Clears the newData flag on this port.
|
virtual |
Enables/disables the port.
|
virtual |
Enables/disables the port.
|
protected |
|
protected |
|
protected |
|
protected |