VR-Forces 4.3.1 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
DtSingleConnectionInputPort Class Reference

Contains the class declaration for DtSingleConnectionInputPort. More...

Inheritance diagram for DtSingleConnectionInputPort:
Inheritance graph
[legend]

Public Member Functions

 DtSingleConnectionInputPort (const DtString &portName)
 Constructor.
virtual ~DtSingleConnectionInputPort ()
 Destructor.
virtual void receiveData (DtPortData *data, const DtPortConnection *conn=0)
 clones the specified DtPortData into myData, and sets the newDataFlag to true.
virtual const DtPortDatadata () const
 Returns the current pointer to a port data.
virtual bool attemptToActivateConnection (DtPortConnection *conn, int connectionPriority)
 Attempt to make this connection the active connection providing data to this port with the specified priority.
virtual bool canActivate (const DtPortConnection *conn, int connectionPriority) const
 Checks if this connection can be the active connection.
virtual void deactivateConnection (DtPortConnection *conn)
 If conn is the currently active connection, it is deactivated and this port has no active input connection.
virtual bool activeConnection () const
 Returns true if there is an active connection into this port.
virtual bool connectionActive (const DtPortConnection *connection) const
 Returns true if the specified connection is currently active.
virtual int connectionPriority () const
 Returns the current connection priority.
- Public Member Functions inherited from DtInputPort
 DtInputPort (const DtString &portName)
 Constructor.
virtual ~DtInputPort ()
 Destructor.
virtual const DtStringname () const
 Returns the name string of this port.
virtual bool acceptType (const DtString &type) const =0
 Returns true if this port should accept the recipt of the specified DtPortData type.
virtual void addConnection (DtPortConnection *conn)
 Add an incomming connection to this port.
virtual void removeConnection (DtPortConnection *conn)
 Remove an incomming connection to this port.
virtual const DtList * connectionList () const
 Returns the list of input connections to this port.
virtual bool newData () const
 Returns true if there is new data on this port that has not been received.
virtual void dataReceived ()
 Clears the newData flag on this port.
virtual bool enabled () const
 Enables/disables the port.
virtual void setEnabled (bool flag)
 Enables/disables the port.

Protected Attributes

DtPortDatamyData
int myConnectionPriority
DtPortConnectionmyActiveConnection
- Protected Attributes inherited from DtInputPort
DtString myName
bool myNewDataFlag
bool myEnabled
DtList myConnectionList

Private Member Functions

 DtSingleConnectionInputPort ()
 Not implemented.
 DtSingleConnectionInputPort (const DtSingleConnectionInputPort &)
 Not implemented.
DtSingleConnectionInputPortoperator= (const DtSingleConnectionInputPort &)
 Not implemented.

Detailed Description

Contains the class declaration for DtSingleConnectionInputPort.

Intances of DtSingleConnectionInputPort 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.

DtSingleConnectionInputPorts 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.

Constructor & Destructor Documentation

DtSingleConnectionInputPort::DtSingleConnectionInputPort ( const DtString portName)

Constructor.

virtual DtSingleConnectionInputPort::~DtSingleConnectionInputPort ( )
virtual

Destructor.

DtSingleConnectionInputPort::DtSingleConnectionInputPort ( )
private

Not implemented.

DtSingleConnectionInputPort::DtSingleConnectionInputPort ( const DtSingleConnectionInputPort )
private

Not implemented.

Member Function Documentation

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

Not implemented.

virtual void DtSingleConnectionInputPort::receiveData ( DtPortData data,
const DtPortConnection conn = 0 
)
virtual

clones the specified DtPortData into myData, and sets the newDataFlag to true.

conn is not used by this class.

Implements DtInputPort.

virtual const DtPortData* DtSingleConnectionInputPort::data ( ) const
virtual

Returns the current pointer to a port data.

virtual bool DtSingleConnectionInputPort::attemptToActivateConnection ( DtPortConnection conn,
int  connectionPriority 
)
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. Only allows one connection to be active at any one time, and arbitrate based on the priority values of the connections.

Implements DtInputPort.

virtual bool DtSingleConnectionInputPort::canActivate ( const DtPortConnection conn,
int  connectionPriority 
) const
virtual

Checks if this connection can be the active connection.

Implements DtInputPort.

virtual void DtSingleConnectionInputPort::deactivateConnection ( DtPortConnection conn)
virtual

If conn is the currently active connection, it is deactivated and this port has no active input connection.

Implements DtInputPort.

virtual bool DtSingleConnectionInputPort::activeConnection ( ) const
virtual

Returns true if there is an active connection into this port.

Implements DtInputPort.

virtual bool DtSingleConnectionInputPort::connectionActive ( const DtPortConnection connection) const
virtual

Returns true if the specified connection is currently active.

Implements DtInputPort.

virtual int DtSingleConnectionInputPort::connectionPriority ( ) const
virtual

Returns the current connection priority.

Implements DtInputPort.

Member Data Documentation

DtPortData* DtSingleConnectionInputPort::myData
protected
int DtSingleConnectionInputPort::myConnectionPriority
protected
DtPortConnection* DtSingleConnectionInputPort::myActiveConnection
protected

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

Document ID: Generated on Wed Jul 29 00:55:00 EDT 2015 from SVN revision 155257
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)