Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   Compound Members  

CSLDoubleProxy Class Reference

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

#include <SL_Double.h>

Inheritance diagram for CSLDoubleProxy::

CSLAnimatableType List of all members.

Public Methods


Detailed Description

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


Constructor & Destructor Documentation

CSLDoubleProxy::CSLDoubleProxy CdotXSITemplate   in_pTemplate,
SI_Int    in_nIndex,
SI_Double    in_dThreshold = SI_EPSILON
 

Constructor. Connects to a double parameter in the template

Parameters:
in_pTemplate  Pointer to the template
in_Index  Index of the parameter in the template
in_dThreshold  Tolerance value used to determine equality between two doubles.
See also:
CSLDoubleProxy::Threshold , CSLDoubleProxy::SetThreshold


Member Function Documentation

SI_Float CSLDoubleProxy::GetFloatValue   [virtual]
 

Converts the value of the referred parameter to float

Returns:
The converted value

Reimplemented from CSLAnimatableType.

CSLDoubleProxy & CSLDoubleProxy::operator= const SI_Double &    in_dValue
 

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

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

CSLDoubleProxy & CSLDoubleProxy::operator= const CSLDoubleProxy &    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 CSLDoubleProxy::operator== const SI_Double &    in_dToCompare
 

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:
CSLDoubleProxy::SetThreshold , CSLDoubleProxy::Threshold

SI_Bool CSLDoubleProxy::operator== const CSLDoubleProxy &    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:
CSLDoubleProxy::SetThreshold , CSLDoubleProxy::Threshold

SI_Void CSLDoubleProxy::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 CSLDoubleProxy::SetThreshold SI_Double    in_dThreshold
 

Sets the thresold value

Parameters:
in_dThreshold  Tolerance value used to determine equality between two doubles. Example
                // no threshold, the values must be absolutely equal
                CSLDoubleProxy l_dProxy( in_pTemplate, in_paramIdx, 0.0 );
                l_dProxy = 0.00501;

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

                // use a tolerance of 0.0001
                l_dProxy.SetThreshold( 0.0001 ); 

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

SI_Double CSLDoubleProxy::Threshold  
 

Returns the threshold value

Returns:
Tolerance value used to determine equality between two doubles.
See also:
CSLDoubleProxy::SetThreshold

CSLAnimatableType::EElementType CSLDoubleProxy::Type   [virtual]
 

Returns the animatable type of this class

Returns:
CSLAnimatableType::SI_DOUBLE_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.