home
wiki
classes/clusters list
class information
+
Point of view
All features
ANY
All features
class XML_FILE_REPOSITORY [O_ ->
STORABLE
]
Summary
top
To be used with a file that contains the repository (and only that)
Direct parents
inherit list:
XML_REPOSITORY_IMPL
Class invariant
top
repository /= Void
reference_storables:
not objects_are_expanded
Overview
top
creation features
connect_to
(a_filename:
STRING
)
Connect to a repository with streams as physical store.
features
Updating and committing
commit
Commit all the repository objects to the physical store.
is_commitable
:
BOOLEAN
True if the repository can be committed to the underlying physical store.
update
Update the repository objects.
is_updateable
:
BOOLEAN
True if the repository can be updated from data in the physical store.
is_connected
:
BOOLEAN
True if the repository is connected to a physical store.
Creation
connect_to
(a_filename:
STRING
)
Connect to a repository with streams as physical store.
filename
:
STRING
update_stream
:
TEXT_FILE_READ
commit_stream
:
TEXT_FILE_WRITE
commitable_tester
:
TEXT_FILE_WRITE
Implementation of update
update_name
:
STRING
update_ref
:
STRING
update_type
:
STRING
update_value
:
STRING
update_capacity
:
STRING
update_version
:
STRING
xml
:
XML_PARSER
do_update
(in_stream:
INPUT_STREAM
)
last_line
:
INTEGER_32
last_column
:
INTEGER_32
open_nodes
:
FAST_ARRAY
[
STRING
]
with_attribute
(attribute_name:
STRING
, attribute_value:
STRING
, line:
INTEGER_32
, column:
INTEGER_32
)
Called by the parser to add an attribute of a node BEFORE calling
open_node
open_node
(node_name:
STRING
, line:
INTEGER_32
, column:
INTEGER_32
)
When the parser reads an opening node
close_node
(node_name:
STRING
, line:
INTEGER_32
, column:
INTEGER_32
)
When the parser reads a closing node
open_close_node
(node_name:
STRING
, line:
INTEGER_32
, column:
INTEGER_32
)
When the parser reads a node that opens and closes immediately (syntax
"<node/>"
)
current_node
:
STRING
The current node
xml_header
(line:
INTEGER_32
, column:
INTEGER_32
)
Called by the parser if a
"<?xml ... ?>"
processing_instruction
(a_target:
STRING
, a_data:
STRING
)
Called by the parser if a
"<?...?>"
entity
(a_entity:
STRING
, line:
INTEGER_32
, column:
INTEGER_32
):
STRING
Called by the parser when an
&entity;
is found.
data
(a_data:
STRING
, line:
INTEGER_32
, column:
INTEGER_32
)
Called by the parser when the node contains raw data
parse_error
(line:
INTEGER_32
, column:
INTEGER_32
, message:
STRING
)
Called by the parser if there is an error
at_error
:
BOOLEAN
True if there was at least an error
Implementation of commit
start_write
(out_stream:
OUTPUT_STREAM
)
end_write
(out_stream:
OUTPUT_STREAM
)
write_reference
(reference:
STRING
, name:
STRING
, out_stream:
OUTPUT_STREAM
)
start_layout
(ref:
STRING
, type:
STRING
, out_stream:
OUTPUT_STREAM
)
end_layout
(out_stream:
OUTPUT_STREAM
)
write_character_layout_object
(internals:
INTERNALS
, name:
STRING
, out_stream:
OUTPUT_STREAM
)
write_boolean_layout_object
(internals:
INTERNALS
, name:
STRING
, out_stream:
OUTPUT_STREAM
)
write_integer_8_layout_object
(internals:
INTERNALS
, name:
STRING
, out_stream:
OUTPUT_STREAM
)
write_integer_16_layout_object
(internals:
INTERNALS
, name:
STRING
, out_stream:
OUTPUT_STREAM
)
write_integer_32_layout_object
(internals:
INTERNALS
, name:
STRING
, out_stream:
OUTPUT_STREAM
)
write_integer_64_layout_object
(internals:
INTERNALS
, name:
STRING
, out_stream:
OUTPUT_STREAM
)
write_integer_layout_object
(internals:
INTERNALS
, name:
STRING
, out_stream:
OUTPUT_STREAM
)
write_real_32_layout_object
(internals:
INTERNALS
, name:
STRING
, out_stream:
OUTPUT_STREAM
)
write_real_64_layout_object
(internals:
INTERNALS
, name:
STRING
, out_stream:
OUTPUT_STREAM
)
write_real_80_layout_object
(internals:
INTERNALS
, name:
STRING
, out_stream:
OUTPUT_STREAM
)
write_real_128_layout_object
(internals:
INTERNALS
, name:
STRING
, out_stream:
OUTPUT_STREAM
)
write_real_layout_object
(internals:
INTERNALS
, name:
STRING
, out_stream:
OUTPUT_STREAM
)
write_real_expanded_layout_object
(internals:
INTERNALS
, name:
STRING
, out_stream:
OUTPUT_STREAM
)
write_array_layout_object
(internals:
INTERNALS
, name:
STRING
, out_stream:
OUTPUT_STREAM
)
start_embedded_layout
(internals:
INTERNALS
, name:
STRING
, out_stream:
OUTPUT_STREAM
)
end_embedded_layout
(internals:
INTERNALS
, name:
STRING
, out_stream:
OUTPUT_STREAM
)
Internals
version
:
STRING
clear_attributes
set_validator
(a_validator:
XML_VALIDATOR
)
Sets a validator for this XML file.
validator
:
XML_VALIDATOR
The XML validator for this file (DTD, XML Schema...)
Error handling on repository update
register_update_error_handler
(a_error_handler:
PROCEDURE
[
TUPLE 3
[
INTEGER_32
,
INTEGER_32
,
STRING
]])
update_error_handlers
:
FAST_ARRAY
[
PROCEDURE
[
TUPLE 3
[
INTEGER_32
,
INTEGER_32
,
STRING
]]]
fire_update_error
(line:
INTEGER_32
, column:
INTEGER_32
, message:
STRING
)
Implementation of update
solve_again
:
BOOLEAN
update_layouts
:
STACK
[
REPOSITORY_LAYOUT
]
updated_internals
:
HASHED_DICTIONARY
[
INTERNALS
,
STRING
]
layouts
:
FAST_ARRAY
[
REPOSITORY_LAYOUT
]
objects
:
HASHED_DICTIONARY
[
STRING
,
STRING
]
solve
(ref:
STRING
):
INTERNALS
solver
:
FUNCTION
[
TUPLE 1
[
STRING
],
INTERNALS
]
read_from_stream
(in_stream:
INPUT_STREAM
)
update_from_stream
(in_stream:
INPUT_STREAM
)
record_object
(ref:
STRING
, name:
STRING
, line:
INTEGER_32
, column:
INTEGER_32
)
Register the object as a high-level one, i.e.
check_data
(a_data:
STRING
, data_type:
STRING
, line:
INTEGER_32
, column:
INTEGER_32
)
open_repository
(a_repository:
REPOSITORY_LAYOUT
, line:
INTEGER_32
, column:
INTEGER_32
)
open_layout
(a_type:
STRING
, a_ref:
STRING
, a_layout:
REPOSITORY_LAYOUT
, line:
INTEGER_32
, column:
INTEGER_32
)
open_reference
(a_name:
STRING
, a_ref:
STRING
, a_reference:
REPOSITORY_LAYOUT
, line:
INTEGER_32
, column:
INTEGER_32
)
open_embedded
(a_name:
STRING
, a_type:
STRING
, a_embedded:
REPOSITORY_LAYOUT
, line:
INTEGER_32
, column:
INTEGER_32
)
open_basic
(a_name:
STRING
, a_type:
STRING
, a_value:
STRING
, a_basic:
REPOSITORY_LAYOUT
, line:
INTEGER_32
, column:
INTEGER_32
)
open_array
(a_name:
STRING
, a_type:
STRING
, a_capacity:
INTEGER_32
, a_array:
REPOSITORY_LAYOUT
, line:
INTEGER_32
, column:
INTEGER_32
)
close_repository
(line:
INTEGER_32
, column:
INTEGER_32
)
close_layout
(line:
INTEGER_32
, column:
INTEGER_32
)
close_reference
(line:
INTEGER_32
, column:
INTEGER_32
)
close_embedded
(line:
INTEGER_32
, column:
INTEGER_32
)
close_basic
(line:
INTEGER_32
, column:
INTEGER_32
)
close_array
(line:
INTEGER_32
, column:
INTEGER_32
)
Implementation of commit
commit_map
:
SET
[
POINTER
]
Used when committing object not to commit them twice
write_to_stream
(out_stream:
OUTPUT_STREAM
)
write_object
(name:
STRING
, object: O_, out_stream:
OUTPUT_STREAM
)
write_reference_layout
(reference:
INTERNALS
, name:
STRING
, out_stream:
OUTPUT_STREAM
)
write_layout
(layout:
INTERNALS
, out_stream:
OUTPUT_STREAM
)
write_contents
(layout:
INTERNALS
, out_stream:
OUTPUT_STREAM
)
write_array_fields_layouts
(array:
INTERNALS
, out_stream:
OUTPUT_STREAM
)
write_expanded
(internals:
INTERNALS
, name:
STRING
, out_stream:
OUTPUT_STREAM
)
write_embedded_layout_object
(internals:
INTERNALS
, name:
STRING
, out_stream:
OUTPUT_STREAM
)
Internals
layouts_pool
:
RECYCLING_POOL
[
REPOSITORY_LAYOUT
]
new_layout
(a_kind:
STRING
):
REPOSITORY_LAYOUT
release_layout
(a_layout:
REPOSITORY_LAYOUT
)
strings
:
STRING_RECYCLING_POOL
transient
:
REPOSITORY_TRANSIENT
Creation
make
Create a not-connected empty repository.
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
)
Update or add a new
object
in the
Current
repository.
put
(object: O_, object_name:
STRING
)
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
get_new_iterator_on_items
:
ITERATOR
[O_]
get_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).
Implementation
repository
:
HASHED_DICTIONARY
[O_,
STRING
]
objects_are_expanded
:
BOOLEAN
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
commit
effective procedure
top
Commit all the repository objects to the physical store.
require
is_commitable
is_commitable
:
BOOLEAN
effective function
top
True if the repository can be committed to the underlying physical store.
ensure
Result implies is_connected
update
effective procedure
top
Update the repository objects.
Get all objects from the physical store.
require
is_updateable
is_updateable
:
BOOLEAN
effective function
top
True if the repository can be updated from data in the physical store.
ensure
Result implies is_connected
is_connected
:
BOOLEAN
effective function
top
True if the repository is connected to a physical store.
connect_to
(a_filename:
STRING
)
effective procedure
top
Connect to a repository with streams as physical store.
filename
:
STRING
writable attribute
top
update_stream
:
TEXT_FILE_READ
writable attribute
top
commit_stream
:
TEXT_FILE_WRITE
writable attribute
top
commitable_tester
:
TEXT_FILE_WRITE
once function
top
update_name
:
STRING
constant attribute
top
update_ref
:
STRING
constant attribute
top
update_type
:
STRING
constant attribute
top
update_value
:
STRING
constant attribute
top
update_capacity
:
STRING
constant attribute
top
update_version
:
STRING
constant attribute
top
xml
:
XML_PARSER
once function
top
do_update
(in_stream:
INPUT_STREAM
)
effective procedure
top
last_line
:
INTEGER_32
effective function
top
last_column
:
INTEGER_32
effective function
top
open_nodes
:
FAST_ARRAY
[
STRING
]
once function
top
with_attribute
(attribute_name:
STRING
, attribute_value:
STRING
, line:
INTEGER_32
, column:
INTEGER_32
)
effective procedure
top
Called by the parser to add an attribute of a node BEFORE calling
open_node
require
not attribute_name.is_empty
not attribute_value.is_empty
open_node
(node_name:
STRING
, line:
INTEGER_32
, column:
INTEGER_32
)
effective procedure
top
When the parser reads an opening node
require
not node_name.is_empty
ensure
current_node.is_equal(node_name)
close_node
(node_name:
STRING
, line:
INTEGER_32
, column:
INTEGER_32
)
effective procedure
top
When the parser reads a closing node
require
not node_name.is_empty
current_node.is_equal(node_name)
open_close_node
(node_name:
STRING
, line:
INTEGER_32
, column:
INTEGER_32
)
effective procedure
top
When the parser reads a node that opens and closes immediately (syntax
"<node/>"
)
require
not node_name.is_empty
current_node
:
STRING
effective function
top
The current node
xml_header
(line:
INTEGER_32
, column:
INTEGER_32
)
effective procedure
top
Called by the parser if a
"<?xml ... ?>"
header is read. Note that with_attribute may have been called first (usually with the version and encoding attributes)
processing_instruction
(a_target:
STRING
, a_data:
STRING
)
effective procedure
top
Called by the parser if a
"<?...?>"
processing instruction is read.
entity
(a_entity:
STRING
, line:
INTEGER_32
, column:
INTEGER_32
):
STRING
effective function
top
Called by the parser when an
&entity;
is found.
Note that standard XML attributes (
lt
,
gt
,
amp
,
apos
and
quot
) are automatically handled and not given to this feature (they cannot be bypassed). Returns Void if the entity is not recognized.
data
(a_data:
STRING
, line:
INTEGER_32
, column:
INTEGER_32
)
effective procedure
top
Called by the parser when the node contains raw data
require
not a_data.is_empty
parse_error
(line:
INTEGER_32
, column:
INTEGER_32
, message:
STRING
)
effective procedure
top
Called by the parser if there is an error
require
message /= Void
ensure
at_error
at_error
:
BOOLEAN
writable attribute
top
True if there was at least an error
start_write
(out_stream:
OUTPUT_STREAM
)
effective procedure
top
require
out_stream.is_connected
end_write
(out_stream:
OUTPUT_STREAM
)
effective procedure
top
require
out_stream.is_connected
write_reference
(reference:
STRING
, name:
STRING
, out_stream:
OUTPUT_STREAM
)
effective procedure
top
require
not reference.is_empty
start_layout
(ref:
STRING
, type:
STRING
, out_stream:
OUTPUT_STREAM
)
effective procedure
top
require
not ref.is_empty
not type.is_empty
out_stream.is_connected
end_layout
(out_stream:
OUTPUT_STREAM
)
effective procedure
top
require
out_stream.is_connected
write_character_layout_object
(internals:
INTERNALS
, name:
STRING
, out_stream:
OUTPUT_STREAM
)
effective procedure
top
write_boolean_layout_object
(internals:
INTERNALS
, name:
STRING
, out_stream:
OUTPUT_STREAM
)
effective procedure
top
write_integer_8_layout_object
(internals:
INTERNALS
, name:
STRING
, out_stream:
OUTPUT_STREAM
)
effective procedure
top
write_integer_16_layout_object
(internals:
INTERNALS
, name:
STRING
, out_stream:
OUTPUT_STREAM
)
effective procedure
top
write_integer_32_layout_object
(internals:
INTERNALS
, name:
STRING
, out_stream:
OUTPUT_STREAM
)
effective procedure
top
write_integer_64_layout_object
(internals:
INTERNALS
, name:
STRING
, out_stream:
OUTPUT_STREAM
)
effective procedure
top
write_integer_layout_object
(internals:
INTERNALS
, name:
STRING
, out_stream:
OUTPUT_STREAM
)
effective procedure
top
write_real_32_layout_object
(internals:
INTERNALS
, name:
STRING
, out_stream:
OUTPUT_STREAM
)
effective procedure
top
write_real_64_layout_object
(internals:
INTERNALS
, name:
STRING
, out_stream:
OUTPUT_STREAM
)
effective procedure
top
write_real_80_layout_object
(internals:
INTERNALS
, name:
STRING
, out_stream:
OUTPUT_STREAM
)
effective procedure
top
write_real_128_layout_object
(internals:
INTERNALS
, name:
STRING
, out_stream:
OUTPUT_STREAM
)
effective procedure
top
write_real_layout_object
(internals:
INTERNALS
, name:
STRING
, out_stream:
OUTPUT_STREAM
)
effective procedure
top
write_real_expanded_layout_object
(internals:
INTERNALS
, name:
STRING
, out_stream:
OUTPUT_STREAM
)
effective procedure
top
write_array_layout_object
(internals:
INTERNALS
, name:
STRING
, out_stream:
OUTPUT_STREAM
)
effective procedure
top
start_embedded_layout
(internals:
INTERNALS
, name:
STRING
, out_stream:
OUTPUT_STREAM
)
effective procedure
top
require
out_stream.is_connected
end_embedded_layout
(internals:
INTERNALS
, name:
STRING
, out_stream:
OUTPUT_STREAM
)
effective procedure
top
require
out_stream.is_connected
version
:
STRING
frozen
constant attribute
top
clear_attributes
effective procedure
top
set_validator
(a_validator:
XML_VALIDATOR
)
effective procedure
top
Sets a validator for this XML file.
The parser uses it when setting a DTD, but you may use it too to implement other validators (such as an XML Schema).
require
validator
= Void
a_validator /= Void
ensure
validator
= a_validator
validator
:
XML_VALIDATOR
writable attribute
top
The XML validator for this file (DTD, XML Schema...)
register_update_error_handler
(a_error_handler:
PROCEDURE
[
TUPLE 3
[
INTEGER_32
,
INTEGER_32
,
STRING
]])
effective procedure
top
update_error_handlers
:
FAST_ARRAY
[
PROCEDURE
[
TUPLE 3
[
INTEGER_32
,
INTEGER_32
,
STRING
]]]
writable attribute
top
fire_update_error
(line:
INTEGER_32
, column:
INTEGER_32
, message:
STRING
)
effective procedure
top
solve_again
:
BOOLEAN
writable attribute
top
update_layouts
:
STACK
[
REPOSITORY_LAYOUT
]
once function
top
updated_internals
:
HASHED_DICTIONARY
[
INTERNALS
,
STRING
]
once function
top
layouts
:
FAST_ARRAY
[
REPOSITORY_LAYOUT
]
once function
top
objects
:
HASHED_DICTIONARY
[
STRING
,
STRING
]
once function
top
solve
(ref:
STRING
):
INTERNALS
effective function
top
require
not ref.is_equal("Void")
not
transient
.has_object(ref)
solver
:
FUNCTION
[
TUPLE 1
[
STRING
],
INTERNALS
]
once function
top
read_from_stream
(in_stream:
INPUT_STREAM
)
effective procedure
top
update_from_stream
(in_stream:
INPUT_STREAM
)
effective procedure
top
record_object
(ref:
STRING
, name:
STRING
, line:
INTEGER_32
, column:
INTEGER_32
)
effective procedure
top
Register the object as a high-level one, i.e.
put it in the repository.
check_data
(a_data:
STRING
, data_type:
STRING
, line:
INTEGER_32
, column:
INTEGER_32
)
effective procedure
top
open_repository
(a_repository:
REPOSITORY_LAYOUT
, line:
INTEGER_32
, column:
INTEGER_32
)
effective procedure
top
require
a_repository.kind.is_equal("repository")
open_layout
(a_type:
STRING
, a_ref:
STRING
, a_layout:
REPOSITORY_LAYOUT
, line:
INTEGER_32
, column:
INTEGER_32
)
effective procedure
top
require
a_layout.kind.is_equal("layout")
open_reference
(a_name:
STRING
, a_ref:
STRING
, a_reference:
REPOSITORY_LAYOUT
, line:
INTEGER_32
, column:
INTEGER_32
)
effective procedure
top
require
a_reference.kind.is_equal("reference")
open_embedded
(a_name:
STRING
, a_type:
STRING
, a_embedded:
REPOSITORY_LAYOUT
, line:
INTEGER_32
, column:
INTEGER_32
)
effective procedure
top
require
a_embedded.kind.is_equal("embedded")
open_basic
(a_name:
STRING
, a_type:
STRING
, a_value:
STRING
, a_basic:
REPOSITORY_LAYOUT
, line:
INTEGER_32
, column:
INTEGER_32
)
effective procedure
top
require
a_basic.kind.is_equal("basic")
open_array
(a_name:
STRING
, a_type:
STRING
, a_capacity:
INTEGER_32
, a_array:
REPOSITORY_LAYOUT
, line:
INTEGER_32
, column:
INTEGER_32
)
effective procedure
top
require
a_array.kind.is_equal("array")
close_repository
(line:
INTEGER_32
, column:
INTEGER_32
)
effective procedure
top
require
update_layouts
.top.kind.is_equal("repository")
close_layout
(line:
INTEGER_32
, column:
INTEGER_32
)
effective procedure
top
require
update_layouts
.top.kind.is_equal("layout")
close_reference
(line:
INTEGER_32
, column:
INTEGER_32
)
effective procedure
top
require
update_layouts
.top.kind.is_equal("reference")
close_embedded
(line:
INTEGER_32
, column:
INTEGER_32
)
effective procedure
top
require
update_layouts
.top.kind.is_equal("embedded")
close_basic
(line:
INTEGER_32
, column:
INTEGER_32
)
effective procedure
top
require
update_layouts
.top.kind.is_equal("basic")
close_array
(line:
INTEGER_32
, column:
INTEGER_32
)
effective procedure
top
require
update_layouts
.top.kind.is_equal("array")
commit_map
:
SET
[
POINTER
]
once function
top
Used when committing object not to commit them twice
write_to_stream
(out_stream:
OUTPUT_STREAM
)
effective procedure
top
require
out_stream.is_connected
write_object
(name:
STRING
, object: O_, out_stream:
OUTPUT_STREAM
)
effective procedure
top
write_reference_layout
(reference:
INTERNALS
, name:
STRING
, out_stream:
OUTPUT_STREAM
)
effective procedure
top
require
reference /= Void implies not reference.type_is_expanded
write_layout
(layout:
INTERNALS
, out_stream:
OUTPUT_STREAM
)
effective procedure
top
require
not
commit_map
.has(layout.object_as_pointer)
not layout.type_is_expanded
ensure
commit_map
.has(layout.object_as_pointer)
write_contents
(layout:
INTERNALS
, out_stream:
OUTPUT_STREAM
)
effective procedure
top
require
layout.type_is_expanded or else
transient
.reference(layout) = Void
write_array_fields_layouts
(array:
INTERNALS
, out_stream:
OUTPUT_STREAM
)
effective procedure
top
require
array.type_is_expanded and then array.type_is_native_array
write_expanded
(internals:
INTERNALS
, name:
STRING
, out_stream:
OUTPUT_STREAM
)
effective procedure
top
require
internals.type_is_expanded
write_embedded_layout_object
(internals:
INTERNALS
, name:
STRING
, out_stream:
OUTPUT_STREAM
)
effective procedure
top
layouts_pool
:
RECYCLING_POOL
[
REPOSITORY_LAYOUT
]
once function
top
new_layout
(a_kind:
STRING
):
REPOSITORY_LAYOUT
effective function
top
ensure
Result.kind.is_equal(a_kind)
release_layout
(a_layout:
REPOSITORY_LAYOUT
)
effective procedure
top
strings
:
STRING_RECYCLING_POOL
once function
top
transient
:
REPOSITORY_TRANSIENT
writable attribute
top
make
effective procedure
top
Create a not-connected empty repository.
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
Update or 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
)
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
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)
get_new_iterator_on_items
:
ITERATOR
[O_]
effective function
top
ensure
Result /= Void
get_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
repository
:
HASHED_DICTIONARY
[O_,
STRING
]
writable attribute
top
objects_are_expanded
:
BOOLEAN
effective function
top
valid_generating_type_for_internals
(type:
STRING
):
BOOLEAN
top
require
type /= Void
ensure
Result implies not type.has_prefix("NATIVE_ARRAY")
internals_from_generating_type
(type:
STRING
):
INTERNALS
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
top
require
type /= Void
ensure
Result implies type.has_prefix("NATIVE_ARRAY")
native_array_internals_from_generating_type
(type:
STRING
, capacity:
INTEGER_32
):
INTERNALS
top
require
valid_generating_type_for_native_array_internals
(type)
ensure
Result /= Void
Result.object_can_be_modified