PixelLightAPI  .
Public Member Functions | Protected Attributes
PLInput::Connection Class Reference

Connection between two controllers/controls. More...

#include <Connection.h>

List of all members.

Public Member Functions

PLINPUT_API Connection (Control *pInput, Control *pOutput, float fScale=1.0f)
 Constructor.
virtual PLINPUT_API ~Connection ()
 Destructor.
PLINPUT_API ControlGetInputControl () const
 Get input control.
PLINPUT_API ControlGetOutputControl () const
 Get output control.
PLINPUT_API bool IsValid () const
 Check if connection is value.
virtual PLINPUT_API void PassValue ()
 Pass value from input to output.
virtual PLINPUT_API void PassValueBackwards ()
 Pass value backwards from output to input.

Protected Attributes

Controlm_pInput
Controlm_pOutput
bool m_bValid
float m_fScale

Detailed Description

Connection between two controllers/controls.


Constructor & Destructor Documentation

PLINPUT_API PLInput::Connection::Connection ( Control pInput,
Control pOutput,
float  fScale = 1.0f 
)

Constructor.

Parameters:
[in]pInputInput control, can be a null pointer
[in]pOutputOutput control, can be a null pointer
[in]fScaleScale factor
virtual PLINPUT_API PLInput::Connection::~Connection ( ) [virtual]

Destructor.


Member Function Documentation

Get input control.

Returns:
Pointer to control that is on the input side of the connection, can be a null pointer

Get output control.

Returns:
Pointer to control that is on the output side of the connection, can be a null pointer
PLINPUT_API bool PLInput::Connection::IsValid ( ) const

Check if connection is value.

Returns:
'true' if connection is valid, else 'false'
Remarks:
A connection is invalid e.g. when you try to connect different types of controls without using the proper connection type (see derived classes for connection classes that can convert values into other types). It is also not valid to use a control of a device as an output, because devices can only be used as input, not as output of controls (a device is controlled by the physical device only).
virtual PLINPUT_API void PLInput::Connection::PassValue ( ) [virtual]

Pass value from input to output.

virtual PLINPUT_API void PLInput::Connection::PassValueBackwards ( ) [virtual]

Pass value backwards from output to input.


Member Data Documentation

Input control, can be a null pointer

Output control, can be a null pointer

'true' if connection is valid, else 'false'

float PLInput::Connection::m_fScale [protected]

Scale factor


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


PixelLight PixelLight 0.9.10-R1
Copyright (C) 2002-2011 by The PixelLight Team
Last modified Fri Dec 23 2011 15:51:19
The content of this PixelLight document is published under the
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported