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
DtConstrainedAnalogOutputPort Class Reference

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

Inheritance diagram for DtConstrainedAnalogOutputPort:
Inheritance graph
[legend]

Public Member Functions

 DtConstrainedAnalogOutputPort (const DtString &portName)
virtual ~DtConstrainedAnalogOutputPort ()
virtual void setValue (double value)
 Overridden from base class to constrian the value to within max and min.
virtual void setMinValue (double minVal)
 The default minimum and maximum values are set to 0.0.
virtual double minValue () const
 The default minimum and maximum values are set to 0.0.
virtual void setMaxValue (double maxVal)
 The default minimum and maximum values are set to 0.0.
virtual double maxValue () const
 The default minimum and maximum values are set to 0.0.
- Public Member Functions inherited from DtAnalogOutputPort
 DtAnalogOutputPort (const DtString &portName)
virtual ~DtAnalogOutputPort ()
virtual const DtString type () const
 returns DtAnalogPortDataType
virtual void createPortData ()
 Creates a DtAnalogPortData.
virtual double 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 attemptToActivateAtLowestPriority ()
 Calls attemptToActivate on all connections in the connection list and returns true if any one of them was able to activate, but will not override data from any others and will allow deactivation in the case another wants to provide data.
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

double myMaxValue
double myMinValue

Detailed Description

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

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

Constructor & Destructor Documentation

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

Member Function Documentation

virtual void DtConstrainedAnalogOutputPort::setValue ( double  value)
virtual

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

Arguments passed to setValue() are clipped to fall within the specified constraints.

Reimplemented from DtAnalogOutputPort.

virtual void DtConstrainedAnalogOutputPort::setMinValue ( double  minVal)
virtual

The default minimum and maximum values are set to 0.0.

virtual double DtConstrainedAnalogOutputPort::minValue ( ) const
virtual

The default minimum and maximum values are set to 0.0.

virtual void DtConstrainedAnalogOutputPort::setMaxValue ( double  maxVal)
virtual

The default minimum and maximum values are set to 0.0.

virtual double DtConstrainedAnalogOutputPort::maxValue ( ) const
virtual

The default minimum and maximum values are set to 0.0.

Member Data Documentation

double DtConstrainedAnalogOutputPort::myMaxValue
protected
double DtConstrainedAnalogOutputPort::myMinValue
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)