GNU
|
Liberty Eiffel
|
Automated Tests
|
Wiki
|
Savannah project
|
Debian packages
|
Documentation
>
libraries
>
JSON_REPOSITORY_IMPL
+
Point of view
JSON_NUMBER
ANY
INTERNALS_HANDLER
TYPED_INTERNALS
JSON_ARRAY
JSON_FALSE
JSON_NULL
JSON_NUMBER
JSON_OBJECT
JSON_STRING
JSON_TRUE
JSON_HANDLER
All features
deferred class JSON_REPOSITORY_IMPL [O_ ->
STORABLE
]
Summary
top
Direct parents
Inherit list:
JSON_VISITOR
,
REPOSITORY_IMPL
Insert list:
JSON_STRINGS
Known children
Inherit list:
JSON_FILE_REPOSITORY
,
JSON_STREAM_REPOSITORY
Overview
top
Exported features
visit_number
(json:
JSON_NUMBER
)
Error handling on repository update
register_update_error_handler
(a_error_handler:
PROCEDURE
[
TUPLE 3
[
ABSTRACT_STRING
,
INTEGER_32
,
INTEGER_32
]])
Getting and setting objects in the repository:
has
(object_name:
STRING
):
BOOLEAN
Is
object_name
the name of some stored object.
at
(object_name:
STRING
): O_
Return the object currently associated to
object_name
.
add
(object: O_, object_name:
STRING
)
Add a new
object
in the
Current
repository.
put
(object: O_, object_name:
STRING
) assign
at
Update or add a new
object
in the
Current
repository.
remove
(object_name:
STRING
)
Remove entry
object_name
from the
Current
repository.
Counting:
count
:
INTEGER_32
Actual
count
of stored elements.
is_empty
:
BOOLEAN
Is it empty ?
Iterating facilities:
lower
:
INTEGER_32
upper
:
INTEGER_32
valid_index
(index:
INTEGER_32
):
BOOLEAN
item
(index:
INTEGER_32
): O_
key
(index:
INTEGER_32
):
STRING
new_iterator_on_items
: ITERATOR[O_]
new_iterator_on_keys
:
ITERATOR
[
STRING
]
key_map_in
(buffer:
COLLECTION
[
STRING
])
Append in
buffer
, all available keys (this may be useful to speed up the traversal).
item_map_in
(buffer: COLLECTION[O_])
Append in
buffer
, all available items (this may be useful to speed up the traversal).
Really storing data:
update
Update the repository objects.
commit
Commit all the repository objects to the physical store.
is_connected
:
BOOLEAN
True if the repository is connected to a physical store.
is_updateable
:
BOOLEAN
True if the repository can be updated from data in the physical store.
is_commitable
:
BOOLEAN
True if the repository can be committed to the underlying physical store.
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
visit_number
(json:
JSON_NUMBER
)
effective procedure
top
require
json /= Void
register_update_error_handler
(a_error_handler:
PROCEDURE
[
TUPLE 3
[
ABSTRACT_STRING
,
INTEGER_32
,
INTEGER_32
]])
effective procedure
top
has
(object_name:
STRING
):
BOOLEAN
frozen
effective function
top
Is
object_name
the name of some stored object.
require
not object_name.is_empty
at
(object_name:
STRING
): O_
frozen
effective function
top
Return the object currently associated to
object_name
.
require
has
(object_name)
ensure
Result /= Void
add
(object: O_, object_name:
STRING
)
frozen
effective procedure
top
Add a new
object
in the
Current
repository.
require
object /= Void
new_reference:
not
has
(object_name)
ensure
reference_stored:
object =
at
(object_name)
put
(object: O_, object_name:
STRING
) assign
at
frozen
effective procedure
top
Update or add a new
object
in the
Current
repository.
require
object /= Void
ensure
reference_stored:
object =
at
(object_name)
remove
(object_name:
STRING
)
effective procedure
top
Remove entry
object_name
from the
Current
repository.
require
has
(object_name)
ensure
not
has
(object_name)
count
:
INTEGER_32
effective function
top
Actual
count
of stored elements.
is_empty
:
BOOLEAN
effective function
top
Is it empty ?
ensure
Result =
count
= 0
lower
:
INTEGER_32
is 1
constant attribute
top
upper
:
INTEGER_32
effective function
top
ensure
Result =
count
valid_index
(index:
INTEGER_32
):
BOOLEAN
effective function
top
ensure
Result = index.in_range(
lower
,
upper
)
item
(index:
INTEGER_32
): O_
effective function
top
require
valid_index
(index)
ensure
Result =
at
(
key
(index))
key
(index:
INTEGER_32
):
STRING
effective function
top
require
valid_index
(index)
ensure
at
(Result) =
item
(index)
new_iterator_on_items
: ITERATOR[O_]
effective function
top
ensure
Result /= Void
new_iterator_on_keys
:
ITERATOR
[
STRING
]
effective function
top
ensure
Result /= Void
key_map_in
(buffer:
COLLECTION
[
STRING
])
effective procedure
top
Append in
buffer
, all available keys (this may be useful to speed up the traversal).
require
buffer /= Void
ensure
buffer.count =
count
+ old buffer.count
item_map_in
(buffer: COLLECTION[O_])
effective procedure
top
Append in
buffer
, all available items (this may be useful to speed up the traversal).
require
buffer /= Void
ensure
buffer.count =
count
+ old buffer.count
update
deferred procedure
top
Update the repository objects.
Get all objects from the physical store.
require
is_updateable
commit
deferred procedure
top
Commit all the repository objects to the physical store.
require
is_commitable
is_connected
:
BOOLEAN
deferred function
top
True if the repository is connected to a physical store.
is_updateable
:
BOOLEAN
deferred function
top
True if the repository can be updated from data in the physical store.
ensure
Result implies
is_connected
is_commitable
:
BOOLEAN
deferred function
top
True if the repository can be committed to the underlying physical store.
ensure
Result implies
is_connected
json_star
:
JSON_STRING
once function
top
json_type
:
JSON_STRING
once function
top
json_repository
:
JSON_STRING
once function
top
json_version
:
JSON_STRING
once function
top
json_data
:
JSON_STRING
once function
top
json_refs
:
JSON_STRING
once function
top
json_basic
:
JSON_STRING
once function
top
json_value
:
JSON_STRING
once function
top
json_array
:
JSON_STRING
once function
top
json_capacity
:
JSON_STRING
once function
top
json_layout
:
JSON_STRING
once function
top
json_ref
:
JSON_STRING
once function
top
json_embedded
:
JSON_STRING
once function
top
json_type_character
:
JSON_STRING
once function
top
json_type_boolean
:
JSON_STRING
once function
top
json_type_integer_8
:
JSON_STRING
once function
top
json_type_integer_16
:
JSON_STRING
once function
top
json_type_integer_32
:
JSON_STRING
once function
top
json_type_integer_64
:
JSON_STRING
once function
top
json_type_integer
:
JSON_STRING
once function
top
json_type_real_32
:
JSON_STRING
once function
top
json_type_real_64
:
JSON_STRING
once function
top
json_type_real_80
:
JSON_STRING
once function
top
json_type_real_128
:
JSON_STRING
once function
top
json_type_real_expanded
:
JSON_STRING
once function
top
json_type_real
:
JSON_STRING
once function
top
json_array_element_type
(type:
ABSTRACT_STRING
):
JSON_STRING
effective function
top
require
type.has_prefix("NATIVE_ARRAY[")
type.has_suffix("]")
json_string
(a_string:
ABSTRACT_STRING
):
JSON_STRING
effective function
top
ensure
Result.is_valid