VR-Forces Development_Version Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Attributes | Private Member Functions
DtPortConnection Class Reference

A DtPortConnection represents a connection between a DtOutputPort and a DtInputPort. More...

Public Member Functions

 DtPortConnection (DtOutputPort *source, DtInputPort *destination, int priority)
virtual ~DtPortConnection ()
 Unregusters the connection with its input and output ports.
virtual bool init ()
 Initialization must be called after the constructor.
virtual bool attemptToActivate ()
 Attempts to make this connection the active connection to the input port.
virtual bool canActivate () const
 Checks if this connection can be the active connection to the input port.
virtual bool attemptToActivateAtLowestPriority ()
 Attempts to make this connection the active connection to the input port, but only if no one else is attempting to use the connection.
virtual void deactivate ()
 Deactivates this connection.
virtual void allowDeactivation ()
 If active, lowers the priority to -1, the lowest possible priority.
virtual bool active () const
 Returns true if this connection is active.
virtual void sendData (DtPortData *data)
 Sends this data to the input port, if this connection is active.
virtual int priority () const
 Returns the priority of this connection.
virtual void setPriority (int priority)
 Set the priority of this connection.

Protected Attributes

DtOutputPortmyOutputPort
DtInputPortmyInputPort
int myPriority

Private Member Functions

 DtPortConnection ()
 Not Implemented.
 DtPortConnection (const DtPortConnection &)
 Not Implemented.
DtPortConnectionoperator= (const DtPortConnection &)
 Not Implemented.

Detailed Description

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.

Constructor & Destructor Documentation

DtPortConnection::DtPortConnection ( DtOutputPort source,
DtInputPort destination,
int  priority 
)
virtual DtPortConnection::~DtPortConnection ( )
virtual

Unregusters the connection with its input and output ports.

DtPortConnection::DtPortConnection ( )
private

Not Implemented.

DtPortConnection::DtPortConnection ( const DtPortConnection )
private

Not Implemented.

Member Function Documentation

DtPortConnection& DtPortConnection::operator= ( const DtPortConnection )
private

Not Implemented.

virtual bool DtPortConnection::init ( )
virtual

Initialization must be called after the constructor.

Registers this connection with both the input and output ports.

virtual bool DtPortConnection::attemptToActivate ( )
virtual

Attempts to make this connection the active connection to the input port.

Returns true if successful.

virtual bool DtPortConnection::canActivate ( ) const
virtual

Checks if this connection can be the active connection to the input port.

Returns true if successful.

virtual bool DtPortConnection::attemptToActivateAtLowestPriority ( )
virtual

Attempts to make this connection the active connection to the input port, but only if no one else is attempting to use the connection.

Then uses a priority of -1 to allow deactivation. Returns true if successful.

virtual void DtPortConnection::deactivate ( )
virtual

Deactivates this connection.

virtual void DtPortConnection::allowDeactivation ( )
virtual

If active, lowers the priority to -1, the lowest possible priority.

virtual bool DtPortConnection::active ( ) const
virtual

Returns true if this connection is active.

A connection is active if the input port it is connected to is currently accepting data from this connection.

virtual void DtPortConnection::sendData ( DtPortData data)
virtual

Sends this data to the input port, if this connection is active.

virtual int DtPortConnection::priority ( ) const
virtual

Returns the priority of this connection.

virtual void DtPortConnection::setPriority ( int  priority)
virtual

Set the priority of this connection.

Member Data Documentation

DtOutputPort* DtPortConnection::myOutputPort
protected
DtInputPort* DtPortConnection::myInputPort
protected
int DtPortConnection::myPriority
protected

The documentation for this class was generated from the following file:

Document ID: Generated on Tue Mar 8 22:13:38 EST 2016 from SVN revision 162938
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)