INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES

indexing

copyright: "Object Tools, 1996-2002"
version: "1.5"
cluster: formats
class G_UNSIGNED_INTEGER_FORMATTER
inherit

G_ABSTRACT_JUSTIFY_FORMATTER
redefine
make,
set_align_char
end
creation

make,
make_with_base
feature -- Creation

make (i: INTEGER_REF)
require
format_number: i /= void
positive_argument: i >= 0

make_with_base (i: INTEGER_REF; b: INTEGER)
require
base_is_legal: is_valid_base (b)
feature

set_base (b: INTEGER)
require
is_valid_base (b)
ensure
base = b

is_valid_base (b: INTEGER): BOOLEAN
ensure
Result implies (1 < b and b < 37)

set_item (i: INTEGER)
-- Set the new value without changing the format
invariant

is_valid_base (base)
end -- class G_UNSIGNED_INTEGER_FORMATTER

INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES