deferred class ANY

All features

Project-wide universal properties. This class is an ancestor to all developer-written classes. By default all classes insert ANY.

Note: it is better to use a non modified ANY class.

Known children

conformant children

COLLECTION, REFERENCE, STANDARD_STREAMS, STRING, TUPLE, WEAK_REFERENCE

non-conformant children

ABSTRACT_BACKTRACKING_GLOBALS, ABSTRACT_BACKTRACKING_POOL, ABSTRACT_BACKTRACKING_POOLABLE, ABSTRACT_SORTER, ADDRESS, ALIGNMENT, ALIGNMENT_CONSTANTS, ANY_AVL_DICTIONARY_NODE, ANY_AVL_SET_NODE, ANY_HASHED_BIJECTIVE_DICTIONARY_NODE, ANY_HASHED_DICTIONARY_NODE, ANY_HASHED_SET_NODE, ANY_LINKED_LIST_NODE, ANY_TWO_WAY_LINKED_LIST_NODE, ARC, ARGUMENTS, AVL_CONSTANTS, BACKTRACKING_GLOBALS, BACKTRACKING_NODE, BACKTRACKING_NODE_GLOBALS, BACKTRACKING_REGULAR_EXPRESSION_PATTERN, BASIC_DIRECTORY, BENCHMARK, BOOLEAN, CHAIN_HANDLER, CHARACTER_CONSTANTS, CLOCK, COLOR, COLOR_LIST, COMMAND, COMPARABLE, COUNTER, DIRECTORY, DIRECTORY_NOTATION, DIRECTORY_NOTATION_HANDLER, DIRECTORY_POOL, DISPOSABLE, DRAWABLE_HANDLER, EIFFELTEST_TOOLS, EXCEPTIONS, EXEC_STREAM, FACTORY, FILE, FILE_TOOLS, FILTER, FONT_MANAGER, FULL_COLOR_LIST, GEN_RAND, GL, GLU, HASHABLE, HASH_TABLE_SIZE, HIERARCHIC_GRAPH_NODE, HTML_ATTRIBUTE, HTML_ELEMENT, HTML_HANDLER, HTML_PARSER, HTTP_METHOD_HANDLER, IMG, INPUT_STREAM_TOOLS, INTERNALS, INTERNALS_HANDLER, ITERATOR, JOB, LAYOUT, LOOP_ITEM, LOOP_STACK, MATH_CONSTANTS, MEMO, NUMBER_TOOLS, OBSERVABLE, OBSERVER, OPENGL, PLATFORM, PROCESS, QUATERNION, READY_DESCRIPTION, RECT, REDIRECTION_TOOLS, REGULAR_EXPRESSION, REGULAR_EXPRESSION_BUILDER, REGULAR_EXPRESSION_STRING_SCANNER, RENDERER, ROUTINE, SAFE_EQUAL, SERVER, SIGNAL_0, SIGNAL_1, SIGNAL_2, SIGNAL_4, SOCKET_HANDLER, SOCKET_PLUG_IN, STATE_CONSTANTS, STORABLE, STREAM, STREAM_HANDLER, STRING_HANDLER, SYSTEM, TIME_FORMATTER, TRAVERSABLE, UNICODE_STRING_HANDLER, UNIVERSAL_LOADER, VISION, VISITABLE, VISITOR, XML_CALLBACKS, XML_NODE, XML_PARSER

Summary

exported features

Access:

Status report:

Comparison:

Deep Comparison:

Duplication:

Deep Duplication:

Basic operations:

Input and Output:

Object Printing:

Object Printing:

Basic named file handling:

SCOOP:

Various useful tools:

The Guru section:

The Guru section:

Implementation of ANY (do not use directly):

Details

default_create

Default creation method. It is used when no creation method is specified if allowed. Note it may be renamed.

frozen manifest_creation

This procedure is used as a placeholder in creation clauses. Instances of a class can be created using the "manifest generic" notation if and only if this class has manifest_creation in its creation clause. You should never call this procedure.

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).

frozen same_dynamic_type (other: ANY): BOOLEAN

Is the dynamic type of Current identical to the dynamic type of other?

require

  • other /= Void

is_equal (other: ANY): BOOLEAN

Is other attached to an object considered equal to current object ?

require

  • other /= Void

ensure

  • commutative: generating_type = other.generating_type implies Result = other.is_equal(Current)

frozen standard_is_equal (other: ANY): BOOLEAN

Are Current and other field-by-field identical?

require

  • other /= Void

ensure

  • commutative: same_dynamic_type(other) implies Result = other.standard_is_equal(Current)

frozen is_deep_equal (other: ANY): BOOLEAN

Is Current recursively isomorph with other ?

require

  • other_not_void: other /= Void

frozen twin: ANY

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: ANY)

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)

frozen standard_twin: ANY

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).

frozen standard_copy (other: ANY)

Copy every field of other onto corresponding field of current object.

require

  • other_not_void: other /= Void

ensure

  • standard_is_equal(other)

frozen deep_twin: ANY

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

frozen default: ANY

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).

frozen 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.)

io: STD_INPUT_OUTPUT

Handle to standard file setup. To use the standard input/output file. Has type STD_FILES in ELKS 95.

ensure

  • Result /= Void

std_input: STD_INPUT

The standard input stream

ensure

  • Result /= Void

std_output: STD_OUTPUT

The standard output stream

ensure

  • Result /= Void

std_error: STD_ERROR

The standard error stream

ensure

  • Result /= Void

frozen print (some: STRING)

When some is Void, output "Void" on std_output, otherwise, output some on std_output. Note: still here for historal reasons.

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.

frozen 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))

frozen 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.

file_exists (path: STRING): BOOLEAN
This feature is obsolete: Now use function `is_readable' of class FILE_TOOLS. (may 19th 2005)
remove_file (path: STRING)
This feature is obsolete: Now use procedure `delete' of class FILE_TOOLS. (may 19th 2005)
rename_file (old_path: STRING, new_path: STRING)
This feature is obsolete: Now use procedure `rename_to' of class FILE_TOOLS. (may 19th 2005)
available: BOOLEAN

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

frozen crash

Print Run Time Stack and then exit with exit_failure_code.

frozen trace_switch (flag: BOOLEAN)

May be used in combination with option "-sedb" of command compile_to_c (see compile_to_c documentation for details).

frozen sedb_breakpoint

May be used in combination with option "-sedb" of command compile_to_c to set a breakpoint for sedb, the SmartEiffel debugger.

frozen die_with_code (code: INTEGER)

Terminate execution with exit status code code. Do not print any message. Note: you can use predefined exit_success_code or exit_failure_code as well as another code you need.

exit_success_code: INTEGER
exit_failure_code: INTEGER
not_yet_implemented
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.

frozen is_expanded_type: BOOLEAN

Result is True if target static type is an expanded type. Useful for formal generic type.

frozen 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

frozen 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.

c_inline_h (c_code: STRING)

Target must be Current and c_code must be a manifest string. Write c_code in the heading C file.

c_inline_c (c_code: STRING)

Target must be Current and c_code must be a manifest string. Write c_code in the stream at current position.

print_run_time_stack

Prints the run time stack. The result depends both on compilation mode and target langage used (C or Java byte code). Usually, in mode -boost, no information is printed.

print_all_run_time_stacks

Prints all the run time stacks. The result depends both on compilation mode and target langage used (C or Java byte code). Usually, in mode -boost, no information is printed.

se_atexit

Called automatically at exit when std_output is used. (Do not call explicitely. Implementation purpose.)

frozen to_internals: INTERNALS

The effect of this built_in is create {TYPED_INTERNALS[like Current]} Result.for_object(Current)