GNU
|
Liberty Eiffel
|
Automated Tests
|
Wiki
|
Savannah project
|
Debian packages
|
Documentation
>
libraries
>
JSON_REPOSITORY_OUTPUT
+
Point of view
All features
ANY
REPOSITORY_IMPL
JSON_HANDLER
All features
class JSON_REPOSITORY_OUTPUT
Summary
top
Direct parents
Inherit list:
REPOSITORY_OUTPUT
Insert list:
JSON_HANDLER
,
JSON_STRINGS
Class invariant
top
out_stream
/= Void
Overview
top
Creation features
{
JSON_REPOSITORY_IMPL
}
make
(a_out_stream:
OUTPUT_STREAM
, a_version:
STRING
)
Features
{
REPOSITORY_IMPL
}
is_connected
:
BOOLEAN
start_write
end_write
write_reference
(ref:
INTEGER_32
, name:
STRING
)
write_transient_reference
(ref:
STRING
, name:
STRING
)
start_layout
(ref:
INTEGER_32
, type:
STRING
)
end_layout
write_character_layout_object
(internals:
INTERNALS
, name:
STRING
)
write_boolean_layout_object
(internals:
INTERNALS
, name:
STRING
)
write_integer_8_layout_object
(internals:
INTERNALS
, name:
STRING
)
write_integer_16_layout_object
(internals:
INTERNALS
, name:
STRING
)
write_integer_32_layout_object
(internals:
INTERNALS
, name:
STRING
)
write_integer_64_layout_object
(internals:
INTERNALS
, name:
STRING
)
write_integer_layout_object
(internals:
INTERNALS
, name:
STRING
)
write_real_32_layout_object
(internals:
INTERNALS
, name:
STRING
)
write_real_64_layout_object
(internals:
INTERNALS
, name:
STRING
)
write_real_80_layout_object
(internals:
INTERNALS
, name:
STRING
)
write_real_128_layout_object
(internals:
INTERNALS
, name:
STRING
)
write_real_layout_object
(internals:
INTERNALS
, name:
STRING
)
write_real_expanded_layout_object
(internals:
INTERNALS
, name:
STRING
)
start_array_layout
(array:
INTERNALS
, name:
STRING
)
end_array_layout
(array:
INTERNALS
, name:
STRING
)
start_embedded_layout
(layout:
INTERNALS
, name:
STRING
)
end_embedded_layout
(layout:
INTERNALS
, name:
STRING
)
{}
out_stream
:
OUTPUT_STREAM
version
:
STRING
text
:
JSON_OBJECT
current_object
:
LINKED_HASHED_DICTIONARY
[
JSON_VALUE
,
JSON_STRING
]
current_array
:
FAST_ARRAY
[
JSON_VALUE
]
references
:
FAST_ARRAY
[
JSON_VALUE
]
object_stack
:
STACK
[
TUPLE 2
[
LINKED_HASHED_DICTIONARY
[
JSON_VALUE
,
JSON_STRING
],
FAST_ARRAY
[
JSON_VALUE
]]]
add_shell_object
(name:
STRING
, ref:
INTEGER_32
, shell_object:
LINKED_HASHED_DICTIONARY
[
JSON_VALUE
,
JSON_STRING
], to_object:
LINKED_HASHED_DICTIONARY
[
JSON_VALUE
,
JSON_STRING
], to_array:
FAST_ARRAY
[
JSON_VALUE
])
add_object
(name:
STRING
, ref:
INTEGER_32
, shell_object:
LINKED_HASHED_DICTIONARY
[
JSON_VALUE
,
JSON_STRING
])
push_object
(name:
STRING
, ref:
INTEGER_32
, agent_create:
PROCEDURE
[
TUPLE 1
[
LINKED_HASHED_DICTIONARY
[
JSON_VALUE
,
JSON_STRING
]]], shell_object:
LINKED_HASHED_DICTIONARY
[
JSON_VALUE
,
JSON_STRING
])
pop_object
create_object
(shell_object:
LINKED_HASHED_DICTIONARY
[
JSON_VALUE
,
JSON_STRING
])
create_array
(shell_object:
LINKED_HASHED_DICTIONARY
[
JSON_VALUE
,
JSON_STRING
])
make
(a_out_stream:
OUTPUT_STREAM
, a_version:
STRING
)
{}
valid_generating_type_for_internals
(type:
STRING
):
BOOLEAN
internals_from_generating_type
(type:
STRING
):
INTERNALS
valid_generating_type_for_native_array_internals
(type:
STRING
):
BOOLEAN
native_array_internals_from_generating_type
(type:
STRING
, capacity:
INTEGER_32
):
INTERNALS
{
JSON_HANDLER
}
json_star
:
JSON_STRING
json_type
:
JSON_STRING
json_repository
:
JSON_STRING
json_version
:
JSON_STRING
json_data
:
JSON_STRING
json_refs
:
JSON_STRING
json_basic
:
JSON_STRING
json_value
:
JSON_STRING
json_array
:
JSON_STRING
json_capacity
:
JSON_STRING
json_layout
:
JSON_STRING
json_ref
:
JSON_STRING
json_embedded
:
JSON_STRING
json_type_character
:
JSON_STRING
json_type_boolean
:
JSON_STRING
json_type_integer_8
:
JSON_STRING
json_type_integer_16
:
JSON_STRING
json_type_integer_32
:
JSON_STRING
json_type_integer_64
:
JSON_STRING
json_type_integer
:
JSON_STRING
json_type_real_32
:
JSON_STRING
json_type_real_64
:
JSON_STRING
json_type_real_80
:
JSON_STRING
json_type_real_128
:
JSON_STRING
json_type_real_expanded
:
JSON_STRING
json_type_real
:
JSON_STRING
json_array_element_type
(type:
ABSTRACT_STRING
):
JSON_STRING
json_string
(a_string:
ABSTRACT_STRING
):
JSON_STRING
{}
json_array_element_types
:
HASHED_DICTIONARY
[
JSON_STRING
,
FIXED_STRING
]
json_strings
:
HASHED_DICTIONARY
[
JSON_STRING
,
FIXED_STRING
]
is_connected
:
BOOLEAN
effective function
{
REPOSITORY_IMPL
}
top
start_write
effective procedure
{
REPOSITORY_IMPL
}
top
require
is_connected
end_write
effective procedure
{
REPOSITORY_IMPL
}
top
require
is_connected
write_reference
(ref:
INTEGER_32
, name:
STRING
)
effective procedure
{
REPOSITORY_IMPL
}
top
require
is_connected
ref > 0
write_transient_reference
(ref:
STRING
, name:
STRING
)
effective procedure
{
REPOSITORY_IMPL
}
top
require
is_connected
not ref.is_empty
start_layout
(ref:
INTEGER_32
, type:
STRING
)
effective procedure
{
REPOSITORY_IMPL
}
top
require
is_connected
ref >= 0
not type.is_empty
end_layout
effective procedure
{
REPOSITORY_IMPL
}
top
require
is_connected
write_character_layout_object
(internals:
INTERNALS
, name:
STRING
)
effective procedure
{
REPOSITORY_IMPL
}
top
require
is_connected
internals.type_generating_type.is_equal("CHARACTER")
write_boolean_layout_object
(internals:
INTERNALS
, name:
STRING
)
effective procedure
{
REPOSITORY_IMPL
}
top
require
is_connected
internals.type_generating_type.is_equal("BOOLEAN")
write_integer_8_layout_object
(internals:
INTERNALS
, name:
STRING
)
effective procedure
{
REPOSITORY_IMPL
}
top
require
is_connected
internals.type_generating_type.is_equal("INTEGER_8")
write_integer_16_layout_object
(internals:
INTERNALS
, name:
STRING
)
effective procedure
{
REPOSITORY_IMPL
}
top
require
is_connected
internals.type_generating_type.is_equal("INTEGER_16")
write_integer_32_layout_object
(internals:
INTERNALS
, name:
STRING
)
effective procedure
{
REPOSITORY_IMPL
}
top
require
is_connected
internals.type_generating_type.is_equal("INTEGER_32")
write_integer_64_layout_object
(internals:
INTERNALS
, name:
STRING
)
effective procedure
{
REPOSITORY_IMPL
}
top
require
is_connected
internals.type_generating_type.is_equal("INTEGER_64")
write_integer_layout_object
(internals:
INTERNALS
, name:
STRING
)
effective procedure
{
REPOSITORY_IMPL
}
top
require
is_connected
internals.type_generating_type.is_equal("INTEGER")
write_real_32_layout_object
(internals:
INTERNALS
, name:
STRING
)
effective procedure
{
REPOSITORY_IMPL
}
top
require
is_connected
internals.type_generating_type.is_equal("REAL_32")
write_real_64_layout_object
(internals:
INTERNALS
, name:
STRING
)
effective procedure
{
REPOSITORY_IMPL
}
top
require
is_connected
internals.type_generating_type.is_equal("REAL_64")
write_real_80_layout_object
(internals:
INTERNALS
, name:
STRING
)
effective procedure
{
REPOSITORY_IMPL
}
top
require
is_connected
internals.type_generating_type.is_equal("REAL_80")
write_real_128_layout_object
(internals:
INTERNALS
, name:
STRING
)
effective procedure
{
REPOSITORY_IMPL
}
top
require
is_connected
internals.type_generating_type.is_equal("REAL_128")
write_real_layout_object
(internals:
INTERNALS
, name:
STRING
)
effective procedure
{
REPOSITORY_IMPL
}
top
require
is_connected
internals.type_generating_type.is_equal("REAL")
write_real_expanded_layout_object
(internals:
INTERNALS
, name:
STRING
)
effective procedure
{
REPOSITORY_IMPL
}
top
require
is_connected
internals.type_generating_type.is_equal("REAL_EXPANDED")
start_array_layout
(array:
INTERNALS
, name:
STRING
)
effective procedure
{
REPOSITORY_IMPL
}
top
require
is_connected
array.type_is_native_array
array.type_attribute_count > 0
end_array_layout
(array:
INTERNALS
, name:
STRING
)
effective procedure
{
REPOSITORY_IMPL
}
top
require
is_connected
start_embedded_layout
(layout:
INTERNALS
, name:
STRING
)
effective procedure
{
REPOSITORY_IMPL
}
top
require
is_connected
layout.type_is_expanded
not layout.type_is_native_array
layout.type_attribute_count > 0
end_embedded_layout
(layout:
INTERNALS
, name:
STRING
)
effective procedure
{
REPOSITORY_IMPL
}
top
require
is_connected
out_stream
:
OUTPUT_STREAM
writable attribute
{}
top
version
:
STRING
writable attribute
{}
top
text
:
JSON_OBJECT
writable attribute
{}
top
current_object
:
LINKED_HASHED_DICTIONARY
[
JSON_VALUE
,
JSON_STRING
]
writable attribute
{}
top
current_array
:
FAST_ARRAY
[
JSON_VALUE
]
writable attribute
{}
top
references
:
FAST_ARRAY
[
JSON_VALUE
]
writable attribute
{}
top
object_stack
:
STACK
[
TUPLE 2
[
LINKED_HASHED_DICTIONARY
[
JSON_VALUE
,
JSON_STRING
],
FAST_ARRAY
[
JSON_VALUE
]]]
writable attribute
{}
top
add_shell_object
(name:
STRING
, ref:
INTEGER_32
, shell_object:
LINKED_HASHED_DICTIONARY
[
JSON_VALUE
,
JSON_STRING
], to_object:
LINKED_HASHED_DICTIONARY
[
JSON_VALUE
,
JSON_STRING
], to_array:
FAST_ARRAY
[
JSON_VALUE
])
effective procedure
{}
top
require
ref >= 0
shell_object /= Void
name /= Void implies to_object /= Void or to_array /= Void
to_object /= Void implies to_array = Void
to_array /= Void implies to_object = Void
add_object
(name:
STRING
, ref:
INTEGER_32
, shell_object:
LINKED_HASHED_DICTIONARY
[
JSON_VALUE
,
JSON_STRING
])
effective procedure
{}
top
require
ref >= 0
name /= Void implies
current_object
/= Void xor
current_array
/= Void
shell_object /= Void
not shell_object.has(
json_data
)
not shell_object.has(
json_refs
)
ensure
object_stack
.count = old
object_stack
.count
current_object
= old
current_object
object_stack.is_empty or else object_stack.top = old object_stack.top
push_object
(name:
STRING
, ref:
INTEGER_32
, agent_create:
PROCEDURE
[
TUPLE 1
[
LINKED_HASHED_DICTIONARY
[
JSON_VALUE
,
JSON_STRING
]]], shell_object:
LINKED_HASHED_DICTIONARY
[
JSON_VALUE
,
JSON_STRING
])
effective procedure
{}
top
require
name /= Void implies
current_object
/= Void xor
current_array
/= Void
shell_object /= Void
not shell_object.has(
json_data
)
not shell_object.has(
json_refs
)
ref >= 0
ref /= 0 = shell_object.has(
json_ref
)
ensure
object_stack
.count = old
object_stack
.count + 1
object_stack
.top.first = old
current_object
object_stack
.top.second = old
current_array
pop_object
effective procedure
{}
top
require
not
object_stack
.is_empty
ensure
object_stack
.count = old
object_stack
.count - 1
current_object
= old
object_stack
.top.first
current_array
= old
object_stack
.top.second
create_object
(shell_object:
LINKED_HASHED_DICTIONARY
[
JSON_VALUE
,
JSON_STRING
])
effective procedure
{}
top
ensure
current_object
/= Void and
current_object
/= old
current_object
create_array
(shell_object:
LINKED_HASHED_DICTIONARY
[
JSON_VALUE
,
JSON_STRING
])
effective procedure
{}
top
ensure
current_array
/= Void and
current_array
/= old
current_array
make
(a_out_stream:
OUTPUT_STREAM
, a_version:
STRING
)
effective procedure
{}
top
require
a_out_stream /= Void
a_version /= Void
ensure
out_stream
= a_out_stream
version
= a_version
valid_generating_type_for_internals
(type:
STRING
):
BOOLEAN
frozen
{}
top
require
type /= Void
ensure
Result implies not type.has_prefix("NATIVE_ARRAY")
internals_from_generating_type
(type:
STRING
):
INTERNALS
frozen
{}
top
require
valid_generating_type_for_internals
(type)
ensure
Result /= Void
Result.object_can_be_modified
valid_generating_type_for_native_array_internals
(type:
STRING
):
BOOLEAN
frozen
{}
top
require
type /= Void
ensure
Result implies type.has_prefix("NATIVE_ARRAY")
native_array_internals_from_generating_type
(type:
STRING
, capacity:
INTEGER_32
):
INTERNALS
frozen
{}
top
require
valid_generating_type_for_native_array_internals
(type)
ensure
Result /= Void
Result.object_can_be_modified
json_star
:
JSON_STRING
once function
{
JSON_HANDLER
}
top
json_type
:
JSON_STRING
once function
{
JSON_HANDLER
}
top
json_repository
:
JSON_STRING
once function
{
JSON_HANDLER
}
top
json_version
:
JSON_STRING
once function
{
JSON_HANDLER
}
top
json_data
:
JSON_STRING
once function
{
JSON_HANDLER
}
top
json_refs
:
JSON_STRING
once function
{
JSON_HANDLER
}
top
json_basic
:
JSON_STRING
once function
{
JSON_HANDLER
}
top
json_value
:
JSON_STRING
once function
{
JSON_HANDLER
}
top
json_array
:
JSON_STRING
once function
{
JSON_HANDLER
}
top
json_capacity
:
JSON_STRING
once function
{
JSON_HANDLER
}
top
json_layout
:
JSON_STRING
once function
{
JSON_HANDLER
}
top
json_ref
:
JSON_STRING
once function
{
JSON_HANDLER
}
top
json_embedded
:
JSON_STRING
once function
{
JSON_HANDLER
}
top
json_type_character
:
JSON_STRING
once function
{
JSON_HANDLER
}
top
json_type_boolean
:
JSON_STRING
once function
{
JSON_HANDLER
}
top
json_type_integer_8
:
JSON_STRING
once function
{
JSON_HANDLER
}
top
json_type_integer_16
:
JSON_STRING
once function
{
JSON_HANDLER
}
top
json_type_integer_32
:
JSON_STRING
once function
{
JSON_HANDLER
}
top
json_type_integer_64
:
JSON_STRING
once function
{
JSON_HANDLER
}
top
json_type_integer
:
JSON_STRING
once function
{
JSON_HANDLER
}
top
json_type_real_32
:
JSON_STRING
once function
{
JSON_HANDLER
}
top
json_type_real_64
:
JSON_STRING
once function
{
JSON_HANDLER
}
top
json_type_real_80
:
JSON_STRING
once function
{
JSON_HANDLER
}
top
json_type_real_128
:
JSON_STRING
once function
{
JSON_HANDLER
}
top
json_type_real_expanded
:
JSON_STRING
once function
{
JSON_HANDLER
}
top
json_type_real
:
JSON_STRING
once function
{
JSON_HANDLER
}
top
json_array_element_type
(type:
ABSTRACT_STRING
):
JSON_STRING
effective function
{
JSON_HANDLER
}
top
require
type.has_prefix("NATIVE_ARRAY[")
type.has_suffix("]")
json_string
(a_string:
ABSTRACT_STRING
):
JSON_STRING
effective function
{
JSON_HANDLER
}
top
ensure
Result.is_valid
json_array_element_types
:
HASHED_DICTIONARY
[
JSON_STRING
,
FIXED_STRING
]
once function
{}
top
json_strings
:
HASHED_DICTIONARY
[
JSON_STRING
,
FIXED_STRING
]
once function
{}
top