Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
TFPEnvironmentModifier
Inherited By:
None.
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 save the currently-active environment. The destructor restores this environment.
Instantiation:
Allocate on the heap or the stack.
Deriving Classes:
Do not derive from this class.
Concurrency:
Multithread safe.
Resource Use:
Objects are used as a surrogate for FPU status and control registers. They normally have FPU registers as their state.
- TFPEnvironmentScope ()
- TFPEnvironmentScope (const TFPInactiveEnvironment &)
- TFPEnvironmentScope (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 current environment is saved for later restoration by the destructor.
- The copy constructor allows for activating (installing) an inactive environment. The current environment is saved for later restoration by the destructor.
- This constructor facilitates changing only the rounding mode. The current environment is saved for later restoration by the destructor.
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:
Objects are used as a surrogate for FPU status and control registers. They normally have FPU registers as their state.
virtual ~ TFPEnvironmentScope ()
Interface Category:
API.
Purpose:
Destructor. Restores the environment saved by the constructor.
Calling Context:
Called to destroy an object and restore a floating-point environment.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
TFPInactiveEnvironment GetSavedEnvironment () const
Interface Category:
API.
Purpose:
Examines the floating-point environment saved by the constructor.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns the floating-point environment saved by the constructor.
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.