note description: "Access to the shared decimal context; used to be a singleton" library: "Gobo Eiffel Decimal Arithmetic Library" copyright: "Copyright (c) 2004-2018, Paul G. Crismer and others" license: "MIT License" date: "$Date: 2019-02-07 22:54:15 +0000 (Thu, 07 Feb 2019) $" revision: "$Revision: 102807 $" class interface MA_SHARED_DECIMAL_CONTEXT create default_create feature -- Access shared_decimal_context: MA_DECIMAL_CONTEXT -- Decimal context for operations where it does not explicitly appear in the signature; -- Return Default_context by default, but can be changed by calling set_shared_decimal_context ensure instance_free: class shared_decimal_context_not_void: Result /= Void Default_context: MA_DECIMAL_CONTEXT -- Default context for general purpose arithmetic ensure instance_free: class default_context_not_void: Result /= Void feature -- Setting set_shared_decimal_context (new_context: MA_DECIMAL_CONTEXT) -- Set shared_decimal_context to new_context. -- It is best practice to call this routine once and for all -- at the beginning of the application to avoid unexpected -- behaviors. require new_context_not_void: new_context /= Void ensure instance_free: class context_set: shared_decimal_context = new_context end -- class MA_SHARED_DECIMAL_CONTEXT
Generated by ISE EiffelStudio