+
Point of view
All features
deferred class REPOSITORY_IMPL [O_ -> STORABLE]
Summary
Used to implement update and commit. Takes care of object references and cycles.
Update is usually event-driven; here are only tools to correctly create the objects layout (see read_from_stream and update_from_stream).
Commit is, on the other hand, a method template with a few deferred methods (see write_to_stream).
Vocabulary:
  • layout: the description of the contents of an object (its layout). This object is referenced by a reference (see below).
  • reference: a reference to an object. Note that the layout of the object MUST have been defined before any reference links to it. A special 'Void' ref indicates a Void object.
  • embedded: a user-defined expanded object (i.e. not one of the basic objects)
  • basic: a special expanded object, with a simple value, specially treated by the compiler and by this class. Basic types are INTEGER and co., READ and co., CHARACTER and BOOLEAN.
  • array: a NATIVE_ARRAY of objects. The type is, in that particular case, the type of the items.
See also XML_REPOSITORY_IMPL
Direct parents
Inherit list: REPOSITORY
Insert list: INTERNALS_HANDLER
Known children
Inherit list: JSON_REPOSITORY_IMPL, XML_REPOSITORY_IMPL
Class invariant
Overview
Features
Error handling on repository update
{ANY}
{}
Implementation of update
{}
Implementation of commit
{}
Internals
{}
Creation
{}
  • make
    Create a not-connected empty repository.
Transient objects
{}
Getting and setting objects in the repository:
{ANY}
  • 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:
{ANY}
Iterating facilities:
{ANY}
Really storing data:
{ANY}
  • 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.
Implementation
{}
{}
register_update_error_handler (a_error_handler: PROCEDURE[TUPLE 3[ABSTRACT_STRING, INTEGER_32, INTEGER_32]])
effective procedure
{ANY}
writable attribute
{}
fire_update_error (message: ABSTRACT_STRING, line: INTEGER_32, column: INTEGER_32)
effective procedure
{}
solve_again: BOOLEAN
writable attribute
{}
update_layouts: STACK[REPOSITORY_LAYOUT]
once function
{}
updated_internals: AVL_DICTIONARY[INTERNALS, INTEGER_32]
once function
{}
internals_references: HASHED_DICTIONARY[INTEGER_32, POINTER]
once function
{}
once function
{}
once function
{}
solve (ref: INTEGER_32): INTERNALS
effective function
{}
internals_reference (internals: INTERNALS): INTEGER_32
effective function
{}
once function
{}
read_from_stream (in_stream: INPUT_STREAM)
effective procedure
{}
update_from_stream (in_stream: INPUT_STREAM)
effective procedure
{}
last_line: INTEGER_32
deferred function
{}
last_column: INTEGER_32
deferred function
{}
do_update (in_stream: INPUT_STREAM)
deferred procedure
{}
record_object (ref: INTEGER_32, name: STRING, line: INTEGER_32, column: INTEGER_32)
effective procedure
{}
Register the object as a high-level one, i.e.
check_non_empty_data (a_data: STRING, data_type: STRING, line: INTEGER_32, column: INTEGER_32)
effective procedure
{}
open_repository (a_repository: REPOSITORY_LAYOUT, line: INTEGER_32, column: INTEGER_32)
effective procedure
{}
open_layout (a_type: STRING, a_ref: INTEGER_32, a_layout: REPOSITORY_LAYOUT, line: INTEGER_32, column: INTEGER_32)
effective procedure
{}
open_reference (a_name: STRING, a_ref: INTEGER_32, a_reference: REPOSITORY_LAYOUT, line: INTEGER_32, column: INTEGER_32)
effective procedure
{}
open_embedded (a_name: STRING, a_type: STRING, a_embedded: REPOSITORY_LAYOUT, line: INTEGER_32, column: INTEGER_32)
effective procedure
{}
open_basic (a_name: STRING, a_type: STRING, a_value: STRING, a_basic: REPOSITORY_LAYOUT, line: INTEGER_32, column: INTEGER_32)
effective procedure
{}
open_array (a_name: STRING, a_type: STRING, a_capacity: INTEGER_32, a_array: REPOSITORY_LAYOUT, line: INTEGER_32, column: INTEGER_32)
effective procedure
{}
close_repository (line: INTEGER_32, column: INTEGER_32)
effective procedure
{}
close_layout (line: INTEGER_32, column: INTEGER_32)
effective procedure
{}
close_reference (line: INTEGER_32, column: INTEGER_32)
effective procedure
{}
close_embedded (line: INTEGER_32, column: INTEGER_32)
effective procedure
{}
close_basic (line: INTEGER_32, column: INTEGER_32)
effective procedure
{}
close_array (line: INTEGER_32, column: INTEGER_32)
effective procedure
{}
commit_map: SET[POINTER]
once function
{}
Used when committing object not to commit them twice
write_to_stream (out_stream: REPOSITORY_OUTPUT)
effective procedure
{}
write_object (name: STRING, object: STORABLE, out_stream: REPOSITORY_OUTPUT)
effective procedure
{}
write_internals (int: INTERNALS, name: STRING, out_stream: REPOSITORY_OUTPUT)
effective procedure
{}
write_reference_layout (reference: INTERNALS, name: STRING, out_stream: REPOSITORY_OUTPUT)
effective procedure
{}
write_layout (layout: INTERNALS, out_stream: REPOSITORY_OUTPUT)
effective procedure
{}
write_contents (layout: INTERNALS, out_stream: REPOSITORY_OUTPUT)
effective procedure
{}
write_array_contents (layout: INTERNALS, out_stream: REPOSITORY_OUTPUT)
effective procedure
{}
write_array_fields_layouts (array: INTERNALS, out_stream: REPOSITORY_OUTPUT)
effective procedure
{}
write_expanded (internals: INTERNALS, name: STRING, out_stream: REPOSITORY_OUTPUT)
effective procedure
{}
write_array_layout_object (internals: INTERNALS, name: STRING, out_stream: REPOSITORY_OUTPUT)
effective procedure
{}
write_embedded_layout_object (internals: INTERNALS, name: STRING, out_stream: REPOSITORY_OUTPUT)
effective procedure
{}
once function
{}
new_layout (a_kind: STRING): REPOSITORY_LAYOUT
effective function
{}
release_layout (a_layout: REPOSITORY_LAYOUT)
effective procedure
{}
writable attribute
{}
make
effective procedure
{}
Create a not-connected empty repository.
register_transient_objects
deferred procedure
{}
unregister_transient_objects
deferred procedure
{}
has (object_name: STRING): BOOLEAN
frozen
effective function
{ANY}
Is object_name the name of some stored object.
at (object_name: STRING): O_
frozen
effective function
{ANY}
Return the object currently associated to object_name.
add (object: O_, object_name: STRING)
frozen
effective procedure
{ANY}
Add a new object in the Current repository.
put (object: O_, object_name: STRING) assign at
frozen
effective procedure
{ANY}
Update or add a new object in the Current repository.
remove (object_name: STRING)
effective procedure
{ANY}
Remove entry object_name from the Current repository.
count: INTEGER_32
effective function
{ANY}
Actual count of stored elements.
is_empty: BOOLEAN
effective function
{ANY}
Is it empty ?
lower: INTEGER_32
is 1
constant attribute
{ANY}
upper: INTEGER_32
effective function
{ANY}
valid_index (index: INTEGER_32): BOOLEAN
effective function
{ANY}
item (index: INTEGER_32): O_
effective function
{ANY}
key (index: INTEGER_32): STRING
effective function
{ANY}
new_iterator_on_items: ITERATOR[O_]
effective function
{ANY}
new_iterator_on_keys: ITERATOR[STRING]
effective function
{ANY}
key_map_in (buffer: COLLECTION[STRING])
effective procedure
{ANY}
Append in buffer, all available keys (this may be useful to speed up the traversal).
item_map_in (buffer: COLLECTION[O_])
effective procedure
{ANY}
Append in buffer, all available items (this may be useful to speed up the traversal).
update
deferred procedure
{ANY}
Update the repository objects.
commit
deferred procedure
{ANY}
Commit all the repository objects to the physical store.
is_connected: BOOLEAN
deferred function
{ANY}
True if the repository is connected to a physical store.
is_updateable: BOOLEAN
deferred function
{ANY}
True if the repository can be updated from data in the physical store.
is_commitable: BOOLEAN
deferred function
{ANY}
True if the repository can be committed to the underlying physical store.
repository: DICTIONARY[O_, STRING]
writable attribute
{}
objects_are_expanded: BOOLEAN
effective function
{}
valid_generating_type_for_internals (type: STRING): BOOLEAN
frozen
{}
internals_from_generating_type (type: STRING): INTERNALS
frozen
{}
valid_generating_type_for_native_array_internals (type: STRING): BOOLEAN
frozen
{}
native_array_internals_from_generating_type (type: STRING, capacity: INTEGER_32): INTERNALS
frozen
{}