note description: "[ Serialize/Deserialize data from memory. Given a memory area referenced by MANAGED_POINTER, store/retrieve data from memory. Initially memory is read from the first byte unless changed via set_position. After the first store/retrieve operation, count is set to the position of the last written/read bytes. If you haven't set an initial position via set_position, it is also the number of bytes written/read, otherwise the number of bytes read is count - initial_position. ]" legal: "See notice at end of class." status: "See notice at end of class." date: "$Date: 2016-07-09 07:24:57 +0000 (Sat, 09 Jul 2016) $" revision: "$Revision: 99004 $" class interface SED_MEMORY_READER_WRITER create make, make_with_buffer feature -- Access data: MANAGED_POINTER -- Copy of buffer from position 0 up to the byte of the last -- write/read operation. ensure data_not_void: Result /= Void valid_data_size: Result.count = buffer_position count: INTEGER_32 -- After the first store/retrieve operation, count is the position of the last -- written/read bytes. If you haven't set an initial position via set_position, it is -- also the number of bytes written/read, otherwise the number of bytes read is -- count - initial_position. feature -- Settings set_position (a_pos: INTEGER_32) -- Set position in buffer where next read/write operation will take place. -- Use with caution as setting it incorrectly might override existing data -- on the next write. require a_pos_non_negative: a_pos >= 0 a_pos_not_too_big: a_pos < buffer.count ensure position_set: buffer_position = a_pos note library: "EiffelBase: Library of reusable components for Eiffel." copyright: "Copyright (c) 1984-2016, 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 SED_MEMORY_READER_WRITER
Generated by ISE EiffelStudio