+
Point of view
All features
expanded class REPOSITORY_TRANSIENT
Summary
Allows one to register transient objects (ones not to be saved by a REPOSITORY). Those objects are not committed (they are replaced by a tag called "transient reference" in the saved stream); nor are they restored (if a "transient reference" is found it is replaced with the registered object).
Usual usage:
  (create {REPOSITORY_TRANSIENT}).register(to_internals)
Caveat: if you have cycles involving both transient and normal objects, those cycles won't be detected (at commit) and won't be restored (at update). In a nutshell, don't do that.
Direct parents
Insert list: INTERNALS_HANDLER
Overview
Features
{ANY}
  • register (transient_object: INTERNALS, transient_reference: STRING)
    Register a transient_object with the given transient_reference.
  • unregister (transient_reference: STRING)
    Unregister the transient_reference.
  • has_object (a_transient_reference: STRING): BOOLEAN
    True if the transient_reference" is registered. t
{REPOSITORY_IMPL}
{REPOSITORY_LAYOUT}
{}
{}
register (transient_object: INTERNALS, transient_reference: STRING)
effective procedure
{ANY}
Register a transient_object with the given transient_reference.
require
  • not transient_object.type_is_expanded
  • transient_object.object_as_pointer /= default_pointer
  • not transient_reference.is_empty
  • not has_object(transient_reference)
ensure
unregister (transient_reference: STRING)
effective procedure
{ANY}
Unregister the transient_reference.
require ensure
has_object (a_transient_reference: STRING): BOOLEAN
effective function
{ANY}
True if the transient_reference" is registered. t
reference (a_object: INTERNALS): STRING
effective function
require
  • not a_object.type_is_expanded
  • a_object.object_as_pointer /= default_pointer
ensure
  • Result /= Void implies not Result.is_empty
  • Result /= Void implies a_object.object_as_pointer = object(Result).object_as_pointer
object (a_reference: STRING): INTERNALS
effective function
require
The key is the transient object, to speed up the most frequent operations which are reference and object.
once function
{}
dummy_transient_object: REPOSITORY_TRANSIENT_OBJECT
once function
{}
once function
{}
valid_generating_type_for_internals (type: STRING): BOOLEAN
frozen
{}
require
  • type /= Void
ensure
  • Result implies not type.has_prefix("NATIVE_ARRAY")
internals_from_generating_type (type: STRING): INTERNALS
frozen
{}
require ensure
  • Result /= Void
  • Result.object_can_be_modified
valid_generating_type_for_native_array_internals (type: STRING): BOOLEAN
frozen
{}
require
  • type /= Void
ensure
  • Result implies type.has_prefix("NATIVE_ARRAY")
native_array_internals_from_generating_type (type: STRING, capacity: INTEGER_32): INTERNALS
frozen
{}
require ensure
  • Result /= Void
  • Result.object_can_be_modified