indexing
	description: "[
		Project-wide universal properties.
		This class is an ancestor to all developer-written classes.
		ANY may be customized for individual projects or teams.
	]"
	status: "See notice at end of class"
	date: "$Date$"
	revision: "$Revision$"

class interface
	ANY

feature -- Access

	generating_type: STRING
			-- Name of current object's generating type
			-- (type of which it is a direct instance)

	generator: STRING
			-- Name of current object's generating class
			-- (base class of the type of which it is a direct instance)
	
feature -- Comparison

	frozen deep_equal (some: ANY; other: like some): BOOLEAN
			-- Are some and other either both void
			-- or attached to isomorphic object structures?
		ensure
			shallow_implies_deep: standard_equal (some, other) implies Result
			both_or_none_void: (some = void) implies (Result = (other = void))
			same_type: (Result and (some /= void)) implies some.same_type (other)
			symmetric: Result implies deep_equal (other, some)

	frozen equal (some: ANY; other: like some): BOOLEAN
			-- Are some and other either both void or attached
			-- to objects considered equal?
		ensure
			definition: Result = (some = void and other = void) or else ((some /= void and other /= void) and then some.is_equal (other))

	is_equal (other: like Current): BOOLEAN
			-- Is other attached to an object considered
			-- equal to current object?
		require
			other_not_void: other /= void
		ensure
			symmetric: Result implies other.is_equal (Current)
			consistent: standard_is_equal (other) implies Result

	frozen standard_equal (some: ANY; other: like some): BOOLEAN
			-- Are some and other either both void or attached to
			-- field-by-field identical objects of the same type?
			-- Always uses default object comparison criterion.
		ensure
			definition: Result = (some = void and other = void) or else ((some /= void and other /= void) and then some.standard_is_equal (other))

	frozen standard_is_equal (other: like Current): BOOLEAN
			-- Is other attached to an object of the same type
			-- as current object, and field-by-field identical to it?
		require
			other_not_void: other /= void
		ensure
			same_type: Result implies same_type (other)
			symmetric: Result implies other.standard_is_equal (Current)
	
feature -- Status report

	conforms_to (other: ANY): BOOLEAN
			-- Does type of current object conform to type
			-- of other (as per Eiffel: The Language, chapter 13)?
		require
			other_not_void: other /= void

	same_type (other: ANY): BOOLEAN
			-- Is type of current object identical to type of other?
		require
			other_not_void: other /= void
		ensure
			definition: Result = (conforms_to (other) and other.conforms_to (Current))
	
feature -- Duplication

	frozen clone (other: ANY): like other
			-- Void if other is void; otherwise new object
			-- equal to other
			--
			-- For non-void other, clone calls copy;
			-- to change copying/cloning semantics, redefine copy.
		ensure
			equal: equal (Result, other)

	copy (other: like Current)
			-- Update current object using fields of object attached
			-- to other, so as to yield equal objects.
		require
			other_not_void: other /= void
			type_identity: same_type (other)
		ensure
			is_equal: is_equal (other)

	frozen deep_clone (other: ANY): like other
			-- Void if other is void: otherwise, new object structure
			-- recursively duplicated from the one attached to other
		ensure
			deep_equal: deep_equal (other, Result)

	frozen deep_copy (other: like Current)
			-- Effect equivalent to that of:
			-- 		temp := deep_clone (other);
			--		copy (temp)
		require
			other_not_void: other /= void
		ensure
			deep_equal: deep_equal (Current, other)

	frozen standard_clone (other: ANY): like other
			-- Void if other is void; otherwise new object
			-- field-by-field identical to other.
			-- Always uses default copying semantics.
		ensure
			equal: standard_equal (Result, other)

	frozen standard_copy (other: like Current)
			-- Copy every field of other onto corresponding field
			-- of current object.
		require
			other_not_void: other /= void
			type_identity: same_type (other)
		ensure
			is_standard_equal: standard_is_equal (other)
	
feature -- Basic operations

	frozen default: like Current
			-- Default value of object's type

	default_create
			-- Process instances of classes with no creation clause.
			-- (Default: do nothing.)

	frozen default_pointer: POINTER
			-- Default value of type POINTER
			-- (Avoid the need to write p.default for
			-- some p of type POINTER.)

	default_rescue
			-- Process exception for routines with no Rescue clause.
			-- (Default: do nothing.)

	frozen do_nothing
			-- Execute a null action.

	frozen void: NONE
			-- Void reference
	
feature -- Output

	io: STD_FILES
			-- Handle to standard file setup

	out: STRING
			-- New string containing terse printable representation
			-- of current object
			-- Was declared in ANY as synonym of tagged_out.

	print (some: ANY)
			-- Write terse external representation of some
			-- on standard output.

	frozen tagged_out: STRING
			-- New string containing terse printable representation
			-- of current object
			-- Was declared in ANY as synonym of out.
	
feature -- Platform

	operating_environment: OPERATING_ENVIRONMENT
			-- Objects available from the operating system
	
invariant

	reflexive_equality: standard_is_equal (Current)
	reflexive_conformance: conforms_to (Current)
	reflexive_equality: standard_is_equal (Current)
	reflexive_conformance: conforms_to (Current)

indexing
	library: "[
			EiffelBase: Library of reusable components for Eiffel.
	]"
	status: "[
			Copyright 1986-2001 Interactive Software Engineering (ISE).
			For ISE customers the original versions are an ISE product
			covered by the ISE Eiffel license and support agreements.
	]"
	license: "[
			EiffelBase may now be used by anyone as FREE SOFTWARE to
			develop any product, public-domain or commercial, without
			payment to ISE, under the terms of the ISE Free Eiffel Library
			License (IFELL) at http://eiffel.com/products/base/license.html.
	]"
	source: "[
			Interactive Software Engineering Inc.
			ISE Building
			360 Storke Road, Goleta, CA 93117 USA
			Telephone 805-685-1006, Fax 805-685-6869
			Electronic mail <info@eiffel.com>
			Customer support http://support.eiffel.com
	]"
	info: "[
			For latest info see award-winning pages: http://eiffel.com
	]"

end -- class ANY