note description: "Implementation of the STORABLE mechanism with streams." library: "Free implementation of ELKS library" status: "See notice at end of class." legal: "See notice at end of class." date: "$Date: 2020-05-19 14:29:33 +0000 (Tue, 19 May 2020) $" revision: "$Revision: 104259 $" class interface STREAM create make, make_with_size feature -- Initialization make -- Create stream object with a default_size of 100 bytes make_with_size (n: INTEGER_32) -- Create stream object with a default_size of n bytes feature -- Access item: POINTER -- Direct access to stored/retrieved data buffer_size: INTEGER_32 -- Buffer's size. object_stored_size: INTEGER_32 -- Size of last stored object. create_c_buffer -- Create the C memory corresponding to the C buffer. retrieved: ANY -- Retrieved object structure -- To access resulting object under correct type, -- use assignment attempt. -- Will raise an exception (code Retrieve_exception) -- if content is not a stored Eiffel structure. require else True feature -- Element change basic_store (object: ANY) -- Produce an external representation of the -- entire object structure reachable from object. -- Retrievable within current system only. general_store (object: ANY) -- Produce an external representation of the -- entire object structure reachable from object. -- Retrievable from other systems for same platform -- (machine architecture). independent_store (object: ANY) -- Produce an external representation of the -- entire object structure reachable from object. -- Retrievable from other systems for the same or other -- platform (machine architecture). set_additional_size (new_size: INTEGER_32) -- Set new_size to BUFFER_SIZE, internal value used to -- increment buffer_size during storable operations. feature -- Status report Support_storable: BOOLEAN = True -- Can medium be used to store an Eiffel structure? Exists: BOOLEAN = True -- Stream exists in any cases. Is_open_read: BOOLEAN = True -- Stream opens for input. Is_open_write: BOOLEAN = True -- Stream opens for output. Is_readable: BOOLEAN = True -- Is medium readable? is_executable: BOOLEAN -- Is stream executable? Is_writable: BOOLEAN = True -- Stream is writable. readable: BOOLEAN -- Is there a current item that may be read? extendible: BOOLEAN -- May new items be added? is_closed: BOOLEAN -- Is the I/O medium open feature -- Status setting close -- Close medium. feature -- Output put_new_line -- Write a new line character to medium -- Was declared in STREAM as synonym of new_line. require else stream_exists: Exists new_line -- Write a new line character to medium -- Was declared in STREAM as synonym of put_new_line. require else stream_exists: Exists put_string (s: READABLE_STRING_8) -- Write s to medium. -- Was declared in STREAM as synonym of putstring. putstring (s: READABLE_STRING_8) -- Write s to medium. -- Was declared in STREAM as synonym of put_string. put_character (c: CHARACTER_8) -- Write c to medium. -- Was declared in STREAM as synonym of putchar. putchar (c: CHARACTER_8) -- Write c to medium. -- Was declared in STREAM as synonym of put_character. put_real (r: REAL_32) -- Write r to medium. -- Was declared in STREAM as synonym of putreal and put_real_32. putreal (r: REAL_32) -- Write r to medium. -- Was declared in STREAM as synonym of put_real and put_real_32. put_real_32 (r: REAL_32) -- Write r to medium. -- Was declared in STREAM as synonym of put_real and putreal. put_integer (i: INTEGER_32) -- Write i to medium. -- Was declared in STREAM as synonym of putint and put_integer_32. putint (i: INTEGER_32) -- Write i to medium. -- Was declared in STREAM as synonym of put_integer and put_integer_32. put_integer_32 (i: INTEGER_32) -- Write i to medium. -- Was declared in STREAM as synonym of put_integer and putint. put_integer_8 (i: INTEGER_8) -- Write i to medium. put_integer_16 (i: INTEGER_16) -- Write i to medium. put_integer_64 (i: INTEGER_64) -- Write i to medium. put_natural_8 (i: NATURAL_8) -- Write i to medium. put_natural_16 (i: NATURAL_16) -- Write i to medium. put_natural (i: NATURAL_32) -- Write i to medium. -- Was declared in STREAM as synonym of put_natural_32. put_natural_32 (i: NATURAL_32) -- Write i to medium. -- Was declared in STREAM as synonym of put_natural. put_natural_64 (i: NATURAL_64) -- Write i to medium. put_boolean (b: BOOLEAN) -- Write b to medium. -- Was declared in STREAM as synonym of putbool. putbool (b: BOOLEAN) -- Write b to medium. -- Was declared in STREAM as synonym of put_boolean. put_double (d: REAL_64) -- Write d to medium. -- Was declared in STREAM as synonym of putdouble and put_real_64. putdouble (d: REAL_64) -- Write d to medium. -- Was declared in STREAM as synonym of put_double and put_real_64. put_real_64 (d: REAL_64) -- Write d to medium. -- Was declared in STREAM as synonym of put_double and putdouble. put_managed_pointer (p: MANAGED_POINTER; start_pos, nb_bytes: INTEGER_32) -- Put data of length nb_bytes pointed by start_pos index in p at -- current position. feature -- Input read_real -- Read a new real. -- Make result available in last_real. -- Was declared in STREAM as synonym of readreal and read_real_32. readreal -- Read a new real. -- Make result available in last_real. -- Was declared in STREAM as synonym of read_real and read_real_32. read_real_32 -- Read a new real. -- Make result available in last_real. -- Was declared in STREAM as synonym of read_real and readreal. read_double -- Read a new double. -- Make result available in last_double. -- Was declared in STREAM as synonym of readdouble and read_real_64. readdouble -- Read a new double. -- Make result available in last_double. -- Was declared in STREAM as synonym of read_double and read_real_64. read_real_64 -- Read a new double. -- Make result available in last_double. -- Was declared in STREAM as synonym of read_double and readdouble. read_character -- Read a new character. -- Make result available in last_character. -- Was declared in STREAM as synonym of readchar. readchar -- Read a new character. -- Make result available in last_character. -- Was declared in STREAM as synonym of read_character. read_integer -- Read a new integer. -- Make result available in last_integer. -- Was declared in STREAM as synonym of readint and read_integer_32. readint -- Read a new integer. -- Make result available in last_integer. -- Was declared in STREAM as synonym of read_integer and read_integer_32. read_integer_32 -- Read a new integer. -- Make result available in last_integer. -- Was declared in STREAM as synonym of read_integer and readint. read_integer_8 -- Read a new integer. -- Make result available in last_integer_8. read_integer_16 -- Read a new integer. -- Make result available in last_integer_16. read_integer_64 -- Read a new integer. -- Make result available in last_integer_64. read_natural_8 -- Read a new natural. -- Make result available in last_natural_8. read_natural_16 -- Read a new natural. -- Make result available in last_natural_16. read_natural -- Read a new natural. -- Make result available in last_natural. -- Was declared in STREAM as synonym of read_natural_32. read_natural_32 -- Read a new natural. -- Make result available in last_natural. -- Was declared in STREAM as synonym of read_natural. read_natural_64 -- Read a new natural. -- Make result available in last_natural_64. read_stream (nb_char: INTEGER_32) -- Read a string of at most nb_char bound characters -- or until end of medium is encountered. -- Make result available in last_string. -- Was declared in STREAM as synonym of readstream. readstream (nb_char: INTEGER_32) -- Read a string of at most nb_char bound characters -- or until end of medium is encountered. -- Make result available in last_string. -- Was declared in STREAM as synonym of read_stream. read_line -- Read characters until a new line or -- end of medium. -- Make result available in last_string. -- Was declared in STREAM as synonym of readline. readline -- Read characters until a new line or -- end of medium. -- Make result available in last_string. -- Was declared in STREAM as synonym of read_line. read_to_managed_pointer (p: MANAGED_POINTER; start_pos, nb_bytes: INTEGER_32) -- Read at most nb_bytes bound bytes and make result -- available in p at position start_pos. feature -- Not exported name: detachable STRING_8 -- Not meaningful handle: INTEGER_32 -- Handle to medium handle_available: BOOLEAN -- Is the handle available after class has been -- created? note copyright: "Copyright (c) 1984-2020, Eiffel Software and others" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" source: "[ Eiffel Software 5949 Hollister Ave., Goleta, CA 93117 USA Telephone 805-685-1006, Fax 805-685-6869 Website http://www.eiffel.com Customer support http://support.eiffel.com ]" end -- class STREAM
Generated by ISE EiffelStudio