Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   Compound Members  

CSLFloatProxy Class Reference

Class that allows modification of a float parameter in a template. More...

#include <SL_Float.h>

Inheritance diagram for CSLFloatProxy::

CSLAnimatableType List of all members.

Public Methods


Detailed Description

Class that allows modification of a float parameter in a template.


Constructor & Destructor Documentation

CSLFloatProxy::CSLFloatProxy CdotXSITemplate   in_pTemplate,
SI_Int    in_nIndex,
SI_Float    in_fThreshold = SI_EPSILON
 

Constructor. Connects to a parameter in the parent template

Parameters:
in_pTemplate  Pointer to the parent template
in_Index  Index of the parameter in the template
in_fThreshold  Tolerance value used to determine equality between two floats.
See also:
CSLFloatProxy::Threshold , CSLFloatProxy::SetThreshold


Member Function Documentation

SI_Float CSLFloatProxy::GetFloatValue   [virtual]
 

Converts the value of the referred parameter to float

Returns:
The converted value

Reimplemented from CSLAnimatableType.

CSLFloatProxy & CSLFloatProxy::operator= const SI_Float &    in_fValue
 

Assignment operator. Assigns in_Value to the parameter referred by this proxy.

Parameters:
in_Value  The new value
Returns:
Reference to the current object.

CSLFloatProxy & CSLFloatProxy::operator= const CSLFloatProxy &    in_Value
 

Assignment operator. Assigns in_Value to the parameter referred by this proxy.

Parameters:
in_Value  The new value
Returns:
Reference to the current object.

SI_Bool CSLFloatProxy::operator== const SI_Float &    in_fToCompare
 

Comparison operator. Compares in_ToCompare with the value of the parameter referred by this proxy.

Parameters:
in_ToCompare  The instance to compare values with
Returns:
Whether or not the referred parameter and in_ToCompare are equal
Note:
Comparison is performed with a threshold value. You can perform exact comparison by setting the Threshold value to zero.
See also:
CSLFloatProxy::Threshold , CSLFloatProxy::SetThreshold

SI_Bool CSLFloatProxy::operator== const CSLFloatProxy &    in_ToCompare
 

Comparison operator. Compares in_ToCompare with the value of the parameter referred by this proxy.

Parameters:
in_ToCompare  The instance to compare values with
Returns:
Whether or not the referred parameter and in_ToCompare are equal
Note:
Comparison is performed with a threshold value. You can perform exact comparison by setting the Threshold value to zero.
See also:
CSLFloatProxy::Threshold , CSLFloatProxy::SetThreshold

SI_Void CSLFloatProxy::SetFloatValue SI_Float    in_fValue [virtual]
 

Sets the value of the referred parameter from a float

Parameters:
in_fValue  The float value used to set the parameter

Reimplemented from CSLAnimatableType.

void CSLFloatProxy::SetThreshold SI_Float    in_fThreshold
 

Sets the thresold value

Parameters:
in_fThreshold  Tolerance value used to determine equality between two floats. Example
                // no threshold, the values must be absolutely equal
                CSLFloatProxy l_fProxy( in_pTemplate, in_paramIdx, 0.0 );
                l_fProxy = 0.00501;

                if ( l_fProxy == 0.005F )
                {
                        // We get here because abs(0.00501 - 0.005) > 0
                }

                // use a tolerance of 0.0001
                l_fProxy.SetThreshold( 0.0001F ); 

                if ( l_fProxy == 0.005F )
                {
                        // We get here because abs(0.00501 - 0.005) <= 0.0001
                }
See also:
CSLDoubleProxy::Threshold

SI_Float CSLFloatProxy::Threshold  
 

Returns the threshold value

Returns:
Tolerance value used to determine equality between two floats.
See also:
CSLFloatProxy::SetThreshold

CSLAnimatableType::EElementType CSLFloatProxy::Type   [virtual]
 

Returns the animatable type of this class

Returns:
CSLAnimatableType::SI_FLOAT_TYPE

Reimplemented from CSLAnimatableType.


The documentation for this class was generated from the following files: © Copyright 2001-2003 Avid Technology, Inc. All rights reserved.

© Copyright 2001-2003 Avid Technology, Inc. All rights reserved.