class REPOSITORY_LAYOUT
Summary
Used by the update engine of REPOSITORY_IMPL to ensure correct object references and cycles handling.
Direct parents
Insert list: INTERNALS_HANDLER, RECYCLABLE
Class invariant
Overview
Creation features
{REPOSITORY_IMPL}
Features
{REPOSITORY_IMPL, REPOSITORY_LAYOUT}
{REPOSITORY_LAYOUT}
{}
{REPOSITORY_IMPL}
{RECYCLING_POOL}
  • recycle
    Do whatever needs to be done to free resources or recycle other objects when recycling this one
{}
{}
type: STRING
writable attribute
data type, if useful
capacity: INTEGER_32
writable attribute
for native arrays only
writable attribute
object reference, for reference objects only
trans_ref: STRING
writable attribute
object transient reference, for reference objects only
name: STRING
writable attribute
object name
value: STRING
writable attribute
object value, for basic types only
layouts: AVL_DICTIONARY[REPOSITORY_LAYOUT, STRING]
writable attribute
child layouts
assigned: HASHED_SET[STRING]
writable attribute
each layout for which the INTERNALS object was assigned
solved: BOOLEAN
writable attribute
effective function
ensure
  • Result /= Void and then Result.object_can_be_retrieved implies solved
internals_set: BOOLEAN
writable attribute
True when internals_memory was set
internals_memory: INTERNALS
writable attribute
{}
internals (a_solver: FUNCTION[TUPLE 1[INTEGER_32], INTERNALS]): INTERNALS
effective function
{}
require
kind: STRING
writable attribute
The layout kind.
Almost everything is common between layout kinds. If things begin to diverge too much, change that to a real polymorphism.
is_clear: BOOLEAN
effective function
set_kind (a_kind: STRING)
effective procedure
require
  • is_clear
  • FAST_ARRAY[STRING]"repository""reference""layout""embedded""basic""array".has(a_kind)
ensure
set_type (a_type: STRING)
effective procedure
require ensure
  • type.is_equal(a_type)
set_capacity (a_capacity: INTEGER_32)
effective procedure
ensure
set_ref (a_ref: INTEGER_32)
effective procedure
require ensure
set_trans_ref (a_trans_ref: STRING)
effective procedure
require ensure
set_name (a_name: STRING)
effective procedure
require ensure
  • name.is_equal(a_name)
set_value (a_value: STRING)
effective procedure
require ensure
add_layout (a_layout: REPOSITORY_LAYOUT)
effective procedure
require ensure
recycle
effective procedure
Do whatever needs to be done to free resources or recycle other objects when recycling this one
ensure
make
effective procedure
{}
ensure
type_memory: STRING
writable attribute
{}
trans_ref_memory: STRING
writable attribute
{}
name_memory: STRING
writable attribute
{}
value_memory: STRING
writable attribute
{}
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