Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
TFPEnvironment
Inherited By:
TFPEnvironmentSaveAndUpdate
TFPEnvironmentScope
Purpose:
Objects serve as surrogates for the real floating-point environment (typically hardware control and status registers). Modifying one can affect subsequent floating-point operations. The constructors of this class do not save the current active environment. They are intended to make permanent changes to the environment; the changes remain in effect until explicit subsequent operations change the environment. The destructor does nothing.
Instantiation:
Allocate on the heap or the stack.
Deriving Classes:
class TFPEnvironmentScope : public TFPEnvironmentModifier.
class TFPEnvSaveAndRestore : public TFPEnvironmentModifier.
Do not derive from this class.
Concurrency:
Multithread safe.
Resource Use:
Normally only one TFPEnvironmentModifier object is used at a time, as a surrogate for FPU status and control registers. Objects of this class normally have FPU registers as their state.
- TFPEnvironmentModifier ()
- TFPEnvironmentModifier (const TFPInactiveEnvironment &)
- TFPEnvironmentModifier (EFPRoundingDirection direction)
Interface Category:
API.
Purpose:
- Default constructor. The empty constructor initializes the environment to the existing current environment (that is, it changes nothing).
- The copy constructor allows for activating (installing) an inactive environment.
- This constructor facilitates changing only the rounding mode.
Calling Context:
- Called by the stream-in operators.
Parameters:
- Takes no parameters.
- const TFPInactiveEnvironment & -The inactive environment to be activated.
- EFPRoundingDirection direction -The rounding direction to be activated.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
Normally only one TFPEnvironmentModifier object is used at a time, as a surrogate for FPU status and control registers. Objects of this class normally have FPU registers as their state.
virtual ~ TFPEnvironmentModifier ()
Interface Category:
API.
Purpose:
Destructor. Does nothing.
Calling Context:
Called to destroy an object.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
virtual void operator =(const TFPInactiveEnvironment &)
Interface Category:
API.
Purpose:
Assignment operator, allows activating (installing) an inactive environment.
Calling Context:
Call this function directly.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
virtual EFPRoundingDirection GetRoundingDirection () const
Interface Category:
API.
Purpose:
Returns the rounding direction in the current environment.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns the rounding direction in the current environment.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
virtual void SetRoundingDirection (EFPRoundingDirection direction)
Interface Category:
API.
Purpose:
Sets the rounding direction in the current environment.
Calling Context:
Call this function directly.
Parameters:
- EFPRoundingDirection direction -The rounding direction to be activated.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
virtual bool TestFlags (TFPExceptionSet exceptions) const
Interface Category:
API.
Purpose:
Tests whether particular exceptions are set in the current environment.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns true if and only if any exceptions in its argument are set in the current environment.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
virtual void ClearFlags (TFPExceptionSet exceptions)
Interface Category:
API.
Purpose:
Clears exception flags in the current environment.
Calling Context:
Call this function directly.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
virtual TFPExceptionSet GetFlags () const
Interface Category:
API.
Purpose:
Returns those exceptions that are set in the current environment.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns those exceptions that are set in the current environment.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
virtual void SetFlags (TFPExceptionSet exceptions)
Interface Category:
API.
Purpose:
Sets exceptions in the current environment.
Calling Context:
Call this function directly.
Parameters:
- TFPExceptionSet exceptions -The exceptions to be set in the current environment.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
virtual void Reset ()
Interface Category:
API.
Purpose:
Resets the current environment to the default startup state.
Calling Context:
Call this function directly.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.