VR-Forces 4.1 Class Documentation
List of all members | Public Member Functions | Protected Attributes
DtConstrainedIntegerOutputPort Class Reference

DtConstrainedIntegerOutputPort is a version of DtIntegerOutputPort which will constrain any outgoing values to the range specified by min and max. More...

Inheritance diagram for DtConstrainedIntegerOutputPort:
Inheritance graph
[legend]

Public Member Functions

 DtConstrainedIntegerOutputPort (const DtString &portName)
virtual ~DtConstrainedIntegerOutputPort ()
virtual void setValue (int value)
 Overridden from base class to constrian the value to within max and min.
virtual void setMinValue (int minVal)
 If you forget to set min and max, all values will be constrained to 0.
virtual int minValue () const
virtual void setMaxValue (int maxVal)
virtual int maxValue () const
- Public Member Functions inherited from DtIntegerOutputPort
 DtIntegerOutputPort (const DtString &portName)
virtual ~DtIntegerOutputPort ()
virtual const DtString type () const
 returns DtIntegerPortDataType
virtual void createPortData ()
 Creates a DtIntegerPortData.
virtual int value () const
 Return the current value.
- Public Member Functions inherited from DtOutputPort
 DtOutputPort (const DtString &portName)
 Constructor.
virtual ~DtOutputPort ()
 Destructor.
virtual bool init ()
 Call after the constructor.
virtual const DtStringname () const
 Returns the string name of this port.
virtual void sendData ()
 Sends the contents of myData to all connections.
virtual void addConnection (DtPortConnection *conn)
 Add a connection to the outgoing connection list.
virtual void removeConnection (DtPortConnection *conn)
 Remove a connection from the outgoing connection list.
virtual bool attemptToActivate ()
 Calls attemptToActivate on all connections in the connection list and returns true if any one of them was able to activate.
virtual bool canActivate () const
 Calls canActivate on all connections in the connection list and returns true if any one of them can be activated.
virtual void deactivate ()
 Calls deactivate on all connections in the connection list.
virtual void allowDeactivation ()
 Calls allowDeactivation on all connections in the connection list.
virtual bool active () const
 Returns true if any one of the outgoing connection are active.
virtual const DtList * connectionList () const
 Returns the list of output connections to this port.
virtual void setConnectionPriority (int priority)
 Sets the priority of all existing outgoing connections from this port to the new priority.
virtual DtPortDatadata ()
 Returns a pointer to the underlying port.
virtual const DtPortDatadata () const
 Returns a pointer to the underlying port.
virtual bool enabled () const
 Enables/disables the port.
virtual void setEnabled (bool flag)
 Enables/disables the port.

Protected Attributes

int myMaxValue
int myMinValue

Detailed Description

DtConstrainedIntegerOutputPort is a version of DtIntegerOutputPort which will constrain any outgoing values to the range specified by min and max.

It outputs DtIntegerPortData, can be connected to any port which accepts this data type, not only a DtConstrainedIntegerInputPort.

Constructor & Destructor Documentation

DtConstrainedIntegerOutputPort::DtConstrainedIntegerOutputPort ( const DtString portName)
virtual DtConstrainedIntegerOutputPort::~DtConstrainedIntegerOutputPort ( )
virtual

Member Function Documentation

virtual void DtConstrainedIntegerOutputPort::setValue ( int  value)
virtual

Overridden from base class to constrian the value to within max and min.

Reimplemented from DtIntegerOutputPort.

virtual void DtConstrainedIntegerOutputPort::setMinValue ( int  minVal)
virtual

If you forget to set min and max, all values will be constrained to 0.

virtual int DtConstrainedIntegerOutputPort::minValue ( ) const
virtual
virtual void DtConstrainedIntegerOutputPort::setMaxValue ( int  maxVal)
virtual
virtual int DtConstrainedIntegerOutputPort::maxValue ( ) const
virtual

Member Data Documentation

int DtConstrainedIntegerOutputPort::myMaxValue
protected
int DtConstrainedIntegerOutputPort::myMinValue
protected

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

Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)