indexing description: "[ The EM Network Unserializer. ]" date: "$Date$" revision: "$Revision$" class EM_NET_UNSERIALIZER inherit EM_NETWORK_HELPER_FUNCTIONS export {NONE} all end EM_FUNCTIONS export {NONE} all end KL_STRING_INPUT_STREAM rename last_string as last_string_gobo end create make feature -- Integer operation read_integer is -- Read an integer (32 bits) from the input stream. local b1, b2, b3, b4: INTEGER do read_character b1 := last_character.code.bit_shift_left (24) read_character b2 := last_character.code.bit_shift_left (16) read_character b3 := last_character.code.bit_shift_left (8) read_character b4 := last_character.code last_integer := convert_from_big_endian_32 (b1 + b2 + b3 + b4) end read_integer_16 is -- Read a short integer (16 bits) from the input stream. local b1, b2: INTEGER do read_character b1 := last_character.code.bit_shift_left (8) read_character b2 := last_character.code last_integer := convert_from_big_endian_32 (b1 + b2) end read_integer_8 is -- Read a byte (8 bit) from the input stream. do read_character last_integer := last_character.code end last_integer: INTEGER -- Last read integer feature -- Real operation read_real is -- Read a real from the stream. local b1, b2, b3, b4: INTEGER do read_character b1 := last_character.code.bit_shift_left (24) read_character b2 := last_character.code.bit_shift_left (16) read_character b3 := last_character.code.bit_shift_left (8) read_character b4 := last_character.code last_real := cast_int_to_float (b1 + b2 + b3 + b4) end last_real: REAL -- Last read real feature -- String last_string: STRING is -- Last string read do Result := last_string_gobo.twin end feature -- Status is_everything_read: BOOLEAN is -- Is everything read from the stream? do Result := location = string.count end end