GNU
|
Liberty Eiffel
|
Automated Tests
|
Wiki
|
Savannah project
|
Debian packages
|
Documentation
>
libraries
>
JSON_STRING
+
Point of view
All features
ANY
JSON_HANDLER
All features
class JSON_STRING
Summary
top
Direct parents
Inherit list:
JSON_VALUE
Insert list:
HASHABLE
,
UNICODE_STRING_HELPER
Class invariant
top
string_exists:
string
/= Void
invariant_string:
is_valid
implies
string_invariant
.is_equal(
string
)
invariant_hash_code:
is_valid
implies
hash_code
=
string
.hash_code
of course, but better said...
Overview
top
Creation features
{
JSON_HANDLER
}
make
(a_string:
UNICODE_STRING
)
from_string
(a_string:
ABSTRACT_STRING
)
Features
{
ANY
}
accept
(visitor:
VISITOR
)
Accept to be visited by the
visitor
.
hash_code
:
INTEGER_32
The hash-code value of
Current
.
is_equal
(other: JSON_STRING):
BOOLEAN
Is
other
attached to an object considered equal to current object?
append_in
(str:
STRING
, raw:
BOOLEAN
)
Append the
JSON
string into
str
If
raw
is True, append raw UTF-8 codes; otherwise, use '\u' sequences
write_to
(str:
OUTPUT_STREAM
, raw:
BOOLEAN
)
Write the
JSON
string to
str
If
raw
is True, write raw UTF-8 codes; otherwise, use '\u' sequences
out_in_tagged_out_memory
Append terse printable representation of current object in
tagged_out_memory
.
{
JSON_HANDLER
}
string
:
UNICODE_STRING
invalidate
Allows to modify the string, e.g.
is_valid
:
BOOLEAN
{}
make
(a_string:
UNICODE_STRING
)
from_string
(a_string:
ABSTRACT_STRING
)
append_unicode_in
(str:
OUTPUT_STREAM
, u:
INTEGER_32
)
set_string_invariant
(a_string:
UNICODE_STRING
):
BOOLEAN
string_invariant
:
UNICODE_STRING
{
ANY
}
line
:
INTEGER_32
optional line and column; 0 if not set
column
:
INTEGER_32
optional line and column; 0 if not set
{
JSON_HANDLER
}
set_position
(a_line:
INTEGER_32
, a_column:
INTEGER_32
)
{
ANY
}
utf8_character_in
(character:
INTEGER_32
, s:
STRING
)
accept
(visitor:
VISITOR
)
effective procedure
{
ANY
}
top
Accept to be visited by the
visitor
.
require
visitor /= Void
hash_code
:
INTEGER_32
writable attribute
{
ANY
}
top
The hash-code value of
Current
.
ensure
good_hash_value:
Result >= 0
is_equal
(other: JSON_STRING):
BOOLEAN
effective function
{
ANY
}
top
Is
other
attached to an object considered equal to current object?
require
other /= Void
other /= Void
ensure
Result implies hash_code = other.hash_code
commutative:
generating_type = other.generating_type implies Result = other.is_equal(Current)
append_in
(str:
STRING
, raw:
BOOLEAN
)
effective procedure
{
ANY
}
top
Append the
JSON
string into
str
If
raw
is True, append raw UTF-8 codes; otherwise, use '\u' sequences
require
str /= Void
write_to
(str:
OUTPUT_STREAM
, raw:
BOOLEAN
)
effective procedure
{
ANY
}
top
Write the
JSON
string to
str
If
raw
is True, write raw UTF-8 codes; otherwise, use '\u' sequences
require
str.is_connected
out_in_tagged_out_memory
effective procedure
{
ANY
}
top
Append terse printable representation of current object in
tagged_out_memory
.
require
locked:
tagged_out_locked
locked:
tagged_out_locked
ensure
still_locked:
tagged_out_locked
not_cleared:
tagged_out_memory.count >= old tagged_out_memory.count
append_only:
old tagged_out_memory.twin.is_equal(tagged_out_memory.substring(1, old tagged_out_memory.count))
string
:
UNICODE_STRING
writable attribute
{
JSON_HANDLER
}
top
invalidate
effective procedure
{
JSON_HANDLER
}
top
Allows to modify the string, e.g.
to clean it. Note: an invalidated string cannot be revalidated.
is_valid
:
BOOLEAN
writable attribute
{
JSON_HANDLER
}
top
make
(a_string:
UNICODE_STRING
)
effective procedure
{}
top
require
a_string /= Void
ensure
string
= a_string
set_string_invariant
(a_string)
is_valid
from_string
(a_string:
ABSTRACT_STRING
)
effective procedure
{}
top
append_unicode_in
(str:
OUTPUT_STREAM
, u:
INTEGER_32
)
effective procedure
{}
top
set_string_invariant
(a_string:
UNICODE_STRING
):
BOOLEAN
effective function
{}
top
require
a_string /= Void
string_invariant
:
UNICODE_STRING
writable attribute
{}
top
line
:
INTEGER_32
writable attribute
{
ANY
}
top
optional line and column; 0 if not set
column
:
INTEGER_32
writable attribute
{
ANY
}
top
optional line and column; 0 if not set
set_position
(a_line:
INTEGER_32
, a_column:
INTEGER_32
)
effective procedure
{
JSON_HANDLER
}
top
ensure
line
= a_line
column
= a_column
utf8_character_in
(character:
INTEGER_32
, s:
STRING
)
effective procedure
{
ANY
}
top
require
character >= 0
s /= Void