ANY NONE
class interface ANY
   --
   -- Project-wide universal properties.
   -- This class is an ancestor to all developer-written classes.
   -- ANY inherits from GENERAL, and may be customized for individual
   -- projects or teams.
   --

feature(s) from GENERAL
   default_create
      -- Default creation method. It is used when no creation
      -- method is specified if allowed. Note it may be renamed.

feature(s) from GENERAL
   -- 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(s) from GENERAL
   -- Status report:

   same_dynamic_type (other: like Current): BOOLEAN
      -- Is the dynamic type of Current identical to the dynamic type of other?

feature(s) from GENERAL
   -- Comparison:

   is_equal (other: like Current): BOOLEAN
      -- Is other attached to an object considered equal to
      -- current object ?
      require
         other /= Void
      ensure
         generating_type = other.generating_type implies Result = other.is_equal(Current)

   standard_is_equal (other: like Current): BOOLEAN
      -- Are Current and other field-by-field identical?
      require
         other /= Void
      ensure
         same_dynamic_type(other) implies Result = other.standard_is_equal(Current)

feature(s) from GENERAL
   -- Deep Comparison:

   is_deep_equal (other: like Current): BOOLEAN
      -- Is Current recursively isomorph with other ?
      require
         other_not_void: other /= Void

feature(s) from GENERAL
   -- Duplication:

   twin: like Current
      -- Return a new object with the dynamic type of Current.
      -- Before being returned, the new object is initialized using feature copy (Current is passed as the argument).
      -- Thus, when feature copy of ANY is not redefined, twin has exactly the same behaviour as standard_twin.
      ensure
         equal: Result.is_equal(Current)

   copy (other: like Current)
      -- Update current object using fields of object attached
      -- to other, so as to yield equal objects.
      -- Note: you can't copy object from a different dynamic type.
      require
         same_dynamic_type(other)
      ensure
         is_equal(other)

   standard_twin: like Current
      -- Return a new object with the dynamic type of Current.
      -- Before being returned, the new object is initialized using
      -- feature standard_copy (Current is passed as the argument).

   standard_copy (other: like Current)
      -- Copy every field of other onto corresponding field of
      -- current object.
      require
         other_not_void: other /= Void
      ensure
         standard_is_equal(other)

feature(s) from GENERAL
   -- Deep Duplication:

   deep_twin: like Current
      -- Return a new object with the dynamic type of Current.
      -- The new object structure is recursively duplicated from the one
      -- attached to Current.

feature(s) from GENERAL
   -- Basic operations:

   default: like Current
      -- Default value of entities declared with the Current type.
      -- Hence, the Result is Void for all reference types and, as another
      -- example, the Result is 0 for an INTEGER expression.

   is_default: BOOLEAN
      -- Is the Current object in the default state?
      -- For example, when this feature is applied on an INTEGER, the
      -- Result is True only when the INTEGER is 0.  If not redefined, the
      -- Result is always False for a reference expression. Actually, this
      -- is_default predicate may be useful for user-defined expanded
      -- objects stored in collection (see all_default of class
      -- COLLECTION).

   default_pointer: POINTER
      -- Default value of type POINTER (avoid the need to write p.default
      -- for some p of type POINTER).
      ensure
         Result = Result.default

   default_rescue
      -- Handle exception if no Rescue clause. (Default: do nothing.)

   do_nothing
      -- Execute a null action.

feature(s) from GENERAL
   -- Object Printing:

   print_on (file: OUTPUT_STREAM)
      -- Default printing of current object on a file.
      -- One may redefine fill_tagged_out_memory or out_in_tagged_out_memory to adapt the behavior of
      -- print_on.
      --

   tagged_out: STRING
      -- New string containing printable representation of current
      -- object, each field preceded by its attribute name, a
      -- colon and a space.

   out: STRING
      -- Create a new string containing terse printable
      -- representation of current object.

   out_in_tagged_out_memory
      -- Append terse printable represention of current object
      -- in tagged_out_memory.
      ensure
         not_cleared: tagged_out_memory.count >= old tagged_out_memory.count;
         append_only: (old tagged_out_memory.twin).is_equal(tagged_out_memory.substring(1,old tagged_out_memory.count))

   tagged_out_memory: STRING

   fill_tagged_out_memory
      -- Append a viewable information in tagged_out_memory in
      -- order to affect the behavior of out, tagged_out, etc.

feature(s) from GENERAL
   -- Basic named file handling:

   file_tools: FILE_TOOLS

   file_exists (path: STRING): BOOLEAN
      -- True if path is an existing readable file.
      require
         not path.is_empty

   remove_file (path: STRING)
      require
         path /= Void

   rename_file (old_path, new_path: STRING)
      require
         old_path /= Void;
         new_path /= Void

feature(s) from GENERAL
   -- Access to command-line arguments:

   argument_count: INTEGER
      -- Number of arguments given to command that started
      -- system execution (command name does not count).
      ensure
         Result >= 0

   argument (i: INTEGER): STRING
      -- i th argument of command that started system execution
      -- Gives the command name if i is 0.
      require
         i >= 0;
         i <= argument_count
      ensure
         Result /= Void

   command_arguments: FAST_ARRAY[STRING]
      -- Give acces to arguments command line including the
      -- command name at index 0.
      ensure
         not Result.is_empty

feature(s) from GENERAL
   -- SCOOP:

   available: BOOLEAN
      -- Wait the result (By Necessity [TM])
      -- Always return True
      -- (Meaningless in a non-SCOOP world)

feature(s) from GENERAL
   -- The Guru section:

   to_pointer: POINTER
      -- This routine can be used only if the value of Current is really
      -- a memory address. (This is the case for all reference types and
      -- for the NATIVE_ARRAY type only.) Actually, this routine do
      -- nothing: the value of Current which is an address is returned
      -- unchanged. The compiler will emit a warning if you try to use
      -- to_pointer on some invalid type.

   is_expanded_type: BOOLEAN
      -- Result is True if target static type is an expanded type.
      -- Useful for formal generic type.

   is_basic_expanded_type: BOOLEAN
      -- The Result is True if the target static type is one of the following
      -- basic types: BOOLEAN, CHARACTER, INTEGER, REAL, DOUBLE or POINTER.
      ensure
         Result implies is_expanded_type

   object_size: INTEGER
      -- Gives the size of the current object at first level
      -- only (pointed-to sub-object are not concerned).
      -- The result is given in number of CHARACTER.

feature(s) from PLATFORM
   -- Maximum:

   Maximum_character_code: INTEGER_16
      -- Largest supported code for CHARACTER values.
      ensure
         meaningful: Result >= 127

   Maximum_integer_8: INTEGER_8
      -- Largest supported value of type INTEGER_8.

   Maximum_integer_16: INTEGER_16
      -- Largest supported value of type INTEGER_16.

   Maximum_integer: INTEGER
      -- Largest supported value of type INTEGER/INTEGER_32.

   Maximum_integer_32: INTEGER
      -- Largest supported value of type INTEGER/INTEGER_32.

   Maximum_integer_64: INTEGER_64
      -- Largest supported value of type INTEGER_64.

   Maximum_real: REAL
      -- Largest supported value of type REAL.
      ensure
         meaningful: Result >= 0.0

   Maximum_double: DOUBLE
      -- Largest supported value of type DOUBLE.
      ensure
         meaningful: Result >= Maximum_real

feature(s) from PLATFORM
   -- Minimum:

   Minimum_character_code: INTEGER_16
      -- Smallest supported code for CHARACTER values.
      ensure
         meaningful: Result <= 0

   Minimum_integer_8: INTEGER_8
      -- Smallest supported value of type INTEGER_8.

   Minimum_integer_16: INTEGER_16
      -- Smallest supported value of type INTEGER_16.

   Minimum_integer: INTEGER
      -- Smallest supported value of type INTEGER/INTEGER_32.

   Minimum_integer_32: INTEGER
      -- Smallest supported value of type INTEGER/INTEGER_32.

   Minimum_integer_64: INTEGER_64
      -- Smallest supported value of type INTEGER_64.

   Minimum_double: DOUBLE
      -- Smallest supported value of type DOUBLE.
      ensure
         meaningful: Result <= 0.0

   Minimum_real: REAL
      -- Smallest supported value of type REAL.
      ensure
         meaningful: Result <= 0.0

feature(s) from PLATFORM
   -- Bits:

   Boolean_bits: INTEGER
      -- Number of bits in a value of type BOOLEAN.
      ensure
         meaningful: Result >= 1

   Character_bits: INTEGER
      -- Number of bits in a value of type CHARACTER.
      ensure
         meaningful: Result >= 1;
         large_enough: (2).to_integer ^ Result >= Maximum_character_code

   Integer_bits: INTEGER
      -- Number of bits in a value of type INTEGER.
      ensure
         integer_definition: Result = 32

   Real_bits: INTEGER
      -- Number of bits in a value of type REAL.
      ensure
         meaningful: Result >= 1

   Double_bits: INTEGER
      -- Number of bits in a value of type DOUBLE.
      ensure
         meaningful: Result >= 1;
         meaningful: Result >= Real_bits

   Pointer_bits: INTEGER
      -- Number of bits in a value of type POINTER.



end of ANY