indexing
	description: "Project-wide universal properties. This class is an ancestor to all developer-written classes. ANY inherits from PLATFORM, itself an heir of GENERAL, and may be customized for individual projects or teams."

class interface
	ANY

feature -- Access

	character_bits: INTEGER
			-- Number of bits in a value of type CHARACTER
			-- (from PLATFORM)

	double_bits: INTEGER
			-- Number of bits in a value of type DOUBLE
			-- (from PLATFORM)

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

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

	integer_bits: INTEGER
			-- Number of bits in a value of type INTEGER
			-- (from PLATFORM)

	operating_environment: OPERATING_ENVIRONMENT
			-- Objects available from the operating system
			-- (from PLATFORM)

	real_bits: INTEGER
			-- Number of bits in a value of type REAL
			-- (from PLATFORM)
	
feature -- Comparison

	frozen deep_equal (some: GENERAL; other: like some): BOOLEAN
			-- Are some and other either both void
			-- or attached to isomorphic object structures?
			-- (from GENERAL)
		ensure -- from GENERAL
			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: GENERAL; other: like some): BOOLEAN
			-- Are some and other either both void or attached
			-- to objects considered equal?
			-- (from GENERAL)
		ensure -- from GENERAL
			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?
			-- (from GENERAL)
		require -- from GENERAL
			other_not_void: other /= void
		ensure -- from GENERAL
			symmetric: Result implies other.is_equal (Current);
			consistent: standard_is_equal (other) implies Result

	frozen standard_equal (some: GENERAL; 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.
			-- (from GENERAL)
		ensure -- from GENERAL
			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?
			-- (from GENERAL)
		require -- from GENERAL
			other_not_void: other /= void
		ensure -- from GENERAL
			same_type: Result implies same_type (other);
			symmetric: Result implies other.standard_is_equal (Current)
	
feature -- Status report

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

	consistent (other: like Current): BOOLEAN
			-- Is current object in a consistent state so that other
			-- may be copied onto it? (Default answer: yes).
			-- (from GENERAL)

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

	frozen clone (other: GENERAL): 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.
			-- (from GENERAL)
		ensure -- from GENERAL
			equal: equal (Result, other)

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

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

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

	setup (other: like Current)
			-- Assuming current object has just been created, perform
			-- actions necessary to ensure that contents of other
			-- can be safely copied onto it.
			-- (from GENERAL)
		ensure -- from GENERAL
			consistent (other)

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

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

	frozen default: like Current
			-- Default value of object's type
			-- (from GENERAL)

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

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

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

	frozen do_nothing
			-- Execute a null action.
			-- (from GENERAL)

	frozen void: NONE
			-- Void reference
			-- (from GENERAL)
	
feature -- Output

	io: STD_FILES
			-- Handle to standard file setup
			-- (from GENERAL)

	out: STRING
			-- New string containing terse printable representation
			-- of current object
			-- Was declared in GENERAL as synonym of out and tagged_out.
			-- (from GENERAL)

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

	frozen tagged_out: STRING
			-- New string containing terse printable representation
			-- of current object
			-- Was declared in GENERAL as synonym of out and tagged_out.
			-- (from GENERAL)
	
feature {GENERAL} -- Implementation

	c_standard_clone (other: POINTER): GENERAL
			-- New object of same dynamic type as other
			-- (from GENERAL)
	
invariant

		-- from GENERAL
	reflexive_equality: standard_is_equal (Current);
	reflexive_conformance: conforms_to (Current);
		-- from GENERAL
	reflexive_equality: standard_is_equal (Current);
	reflexive_conformance: conforms_to (Current);

end -- class ANY