indexing
description: "Integer formatters"
library: "Gobo Eiffel Utility Library"
author: "Eric Bezault <ericb@gobo.demon.co.uk>"
copyright: "Copyright (c) 1997, Eric Bezault"
class interface
UT_INTEGER_FORMATTER
feature -- Access
decimal_integer_out (an_int: INTEGER): STRING
-- Decimal representation of an_int;
-- Return a new string at each call.
-- Regexp: -?(0|[1-9][0-9]*)
ensure
decimal_integer_out_not_void: Result /= void
octal_integer_out (an_int: INTEGER): STRING
-- Octal representation of an_int;
-- Return a new string at each call.
-- Regexp: 0|[1-7][0-7]*
require
an_int_positive: an_int >= 0
ensure
octal_integer_out_not_void: Result /= void
output_stream_: KL_OUTPUT_STREAM_ROUTINES
-- Routines that ought to be in class OUTPUT_STREAM
-- (from KL_IMPORTED_OUTPUT_STREAM_ROUTINES)
ensure -- from KL_IMPORTED_OUTPUT_STREAM_ROUTINES
output_stream_routines_not_void: Result /= void
string_: KL_STRING_ROUTINES
-- Routines that ought to be in class STRING
-- (from KL_IMPORTED_STRING_ROUTINES)
ensure -- from KL_IMPORTED_STRING_ROUTINES
string_routines_not_void: Result /= void
feature -- File handling
put_decimal_integer (a_file: like output_stream_type; an_int: INTEGER)
-- Write decimal representation of an_int to a_file.
require
a_file_not_void: a_file /= void;
a_file_is_open_write: output_stream_.is_open_write (a_file)
put_octal_integer (a_file: like output_stream_type; an_int: INTEGER)
-- Write octal representation of an_int to a_file.
require
a_file_not_void: a_file /= void;
a_file_is_open_write: output_stream_.is_open_write (a_file)
feature -- String handling
append_decimal_integer (a_string: STRING; an_int: INTEGER)
-- Append decimal representation of an_int to a_string.
require
a_string_not_void: a_string /= void
append_octal_integer (a_string: STRING; an_int: INTEGER)
-- Append octal representation of an_int to a_string.
require
a_string_not_void: a_string /= void;
an_int_positive: an_int >= 0
feature -- Type anchors
output_stream_type: IO_MEDIUM
-- (from KL_IMPORTED_OUTPUT_STREAM_ROUTINES)
invariant
-- from GENERAL
reflexive_equality: standard_is_equal (Current);
reflexive_conformance: conforms_to (Current);
end -- class UT_INTEGER_FORMATTER