GNU
|
Liberty Eiffel
|
Automated Tests
|
Wiki
|
Savannah project
|
Debian packages
|
Documentation
>
libraries
>
JSON_NUMBER
+
Point of view
JSON_HANDLER
ANY
INTERNALS_HANDLER
TYPED_INTERNALS
JSON_HANDLER
All features
class JSON_NUMBER
Summary
top
Direct parents
Inherit list:
JSON_VALUE
Class invariant
top
sign
= 1 or else
sign
= -1
frac_exp
>= 0
Overview
top
Creation features
make
(a_sign:
INTEGER_8
, a_int:
NATURAL_64
, a_frac:
NATURAL_64
, a_frac_exp:
INTEGER_64
, a_exp:
INTEGER_64
)
Exported features
accept
(visitor:
VISITOR
)
Accept to be visited by the
visitor
.
is_equal
(other: JSON_NUMBER):
BOOLEAN
Is
other
attached to an object considered equal to current object?
is_integer
:
BOOLEAN
to_integer
:
INTEGER_64
to_real
:
REAL_64
append_in
(str:
STRING
)
write_to
(str:
OUTPUT_STREAM
)
out_in_tagged_out_memory
Append terse printable representation of current object in
tagged_out_memory
.
sign
:
INTEGER_8
int
:
NATURAL_64
frac
:
NATURAL_64
frac_exp
:
INTEGER_64
exp
:
INTEGER_64
line
:
INTEGER_32
optional line and column; 0 if not set
column
:
INTEGER_32
optional line and column; 0 if not set
set_position
(a_line:
INTEGER_32
, a_column:
INTEGER_32
)
accept
(visitor:
VISITOR
)
effective procedure
top
Accept to be visited by the
visitor
.
require
visitor /= Void
is_equal
(other: JSON_NUMBER):
BOOLEAN
effective function
top
Is
other
attached to an object considered equal to current object?
require
other /= Void
other /= Void
ensure
commutative:
generating_type = other.generating_type implies Result = other.is_equal(Current)
is_integer
:
BOOLEAN
effective function
top
to_integer
:
INTEGER_64
effective function
top
require
is_integer
to_real
:
REAL_64
effective function
top
append_in
(str:
STRING
)
effective procedure
top
write_to
(str:
OUTPUT_STREAM
)
effective procedure
top
require
str.is_connected
out_in_tagged_out_memory
effective procedure
top
Append terse printable representation of current object in
tagged_out_memory
.
sign
:
INTEGER_8
writable attribute
top
int
:
NATURAL_64
writable attribute
top
frac
:
NATURAL_64
writable attribute
top
frac_exp
:
INTEGER_64
writable attribute
top
exp
:
INTEGER_64
writable attribute
top
line
:
INTEGER_32
writable attribute
top
optional line and column; 0 if not set
column
:
INTEGER_32
writable attribute
top
optional line and column; 0 if not set
set_position
(a_line:
INTEGER_32
, a_column:
INTEGER_32
)
effective procedure
top
ensure
line
= a_line
column
= a_column