![]() |
VR-Forces 4.10 Class Documentation
|
Instances of DtInputPort are are data ports owned by data consumers. More...

Public Member Functions | |
| DtInputPort (const DtString &portName) | |
| Constructor. More... | |
| virtual | ~DtInputPort () |
| Destructor. More... | |
| virtual const DtString & | name () const |
| Returns the name string of this port. More... | |
| virtual bool | acceptType (const DtString &type) const =0 |
| Returns true if this port should accept the recipt of the specified DtPortData type. More... | |
| virtual void | receiveData (DtPortData *data, const DtPortConnection *connection)=0 |
| clones the specified DtPortData into myData, and sets the newDataFlag to true. More... | |
| virtual bool | attemptToActivateConnection (DtPortConnection *conn, int connectionPriority)=0 |
| Attempt to make this connection the active connection providing data to this port with the specified priority. More... | |
| virtual bool | canActivate (const DtPortConnection *conn, int connectionPriority) const =0 |
| Checks if this connection can be the active connection. More... | |
| virtual void | deactivateConnection (DtPortConnection *conn)=0 |
| Deactivate conn if it is currently active. More... | |
| virtual bool | activeConnection () const =0 |
| Returns true if there is an active connection into this port. More... | |
| virtual bool | connectionActive (const DtPortConnection *connection) const =0 |
| Returns true if the specified connection is currently active. More... | |
| virtual int | connectionPriority () const =0 |
| Returns the current connection priority. More... | |
| virtual void | addConnection (DtPortConnection *conn) |
| Add an incomming connection to this port. More... | |
| virtual void | removeConnection (DtPortConnection *conn) |
| Remove an incomming connection to this port. More... | |
| virtual const DtList * | connectionList () const |
| Returns the list of input connections to this port. More... | |
| virtual bool | newData () const |
| Returns true if there is new data on this port that has not been received. More... | |
| virtual void | dataReceived () |
| Clears the newData flag on this port. More... | |
| virtual bool | enabled () const |
| Enables/disables the port. More... | |
| virtual void | setEnabled (bool flag) |
Protected Attributes | |
| DtString | myName |
| bool | myNewDataFlag |
| bool | myEnabled |
| DtList | myConnectionList |
Private Member Functions | |
| DtInputPort () | |
| Not implemented. More... | |
| DtInputPort (const DtInputPort &) | |
| Not implemented. More... | |
| DtInputPort & | operator= (const DtInputPort &) |
| Not implemented. More... | |
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.
| 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, DtObjectTypesListInputPort, DtOrientationInputPort, DtDualAxisAnalogInputPort, DtEntityListInputPort, DtObjectIdInputPort, 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 |
|
protected |
|
protected |
|
protected |
|
protected |