home
wiki
classes/clusters list
class information
+
Point of view
All features
ANY
REPOSITORY_LAYOUT
REPOSITORY_IMPL
RECYCLING_POOL
INTERNALS_HANDLER
All features
class REPOSITORY_LAYOUT
Summary
top
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
top
solved_internals_coherence:
not
solved
and
internals_memory
/= Void implies
internals_memory
.object_can_be_modified
reference_is_solved:
kind
.is_equal("reference") and
internals_set
implies
solved
reference_dont_have_layouts:
kind
.is_equal("reference") implies
layouts
.is_empty
assigned_are_layouts:
assigned
.for_all(
layouts
.has())
Overview
top
creation features
make
features
type
:
STRING
data type, if useful
capacity
:
INTEGER_32
for native arrays only
ref
:
STRING
object reference, for reference objects only
name
:
STRING
object name
value
:
STRING
object value, for basic types only
layouts
:
HASHED_DICTIONARY
[REPOSITORY_LAYOUT,
STRING
]
child layouts
assigned
:
HASHED_SET
[
STRING
]
each layout for which the
INTERNALS
object was assigned
solved
:
BOOLEAN
solve
(a_solver:
FUNCTION
[
TUPLE 1
[
STRING
],
INTERNALS
]):
INTERNALS
internals_set
:
BOOLEAN
True when
internals_memory
was set
internals_memory
:
INTERNALS
internals
(a_solver:
FUNCTION
[
TUPLE 1
[
STRING
],
INTERNALS
]):
INTERNALS
a_value is used for expanded attributes to directly set the object
recycle
Do whatever needs to be done to free resources or recycle other objects when recycling this one
kind
:
STRING
The layout kind.
is_clear
:
BOOLEAN
set_kind
(a_kind:
STRING
)
set_type
(a_type:
STRING
)
set_capacity
(a_capacity:
INTEGER_32
)
set_ref
(a_ref:
STRING
)
set_name
(a_name:
STRING
)
set_value
(a_value:
STRING
)
add_layout
(a_layout: REPOSITORY_LAYOUT)
make
type_memory
:
STRING
ref_memory
:
STRING
name_memory
:
STRING
value_memory
:
STRING
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
type
:
STRING
writable attribute
top
data type, if useful
capacity
:
INTEGER_32
writable attribute
top
for native arrays only
ref
:
STRING
writable attribute
top
object reference, for reference objects only
name
:
STRING
writable attribute
top
object name
value
:
STRING
writable attribute
top
object value, for basic types only
layouts
:
HASHED_DICTIONARY
[REPOSITORY_LAYOUT,
STRING
]
writable attribute
top
child layouts
assigned
:
HASHED_SET
[
STRING
]
writable attribute
top
each layout for which the
INTERNALS
object was assigned
solved
:
BOOLEAN
writable attribute
top
solve
(a_solver:
FUNCTION
[
TUPLE 1
[
STRING
],
INTERNALS
]):
INTERNALS
effective function
top
ensure
Result /= Void and then Result.object_can_be_retrieved implies
solved
internals_set
:
BOOLEAN
writable attribute
top
True when
internals_memory
was set
internals_memory
:
INTERNALS
writable attribute
top
internals
(a_solver:
FUNCTION
[
TUPLE 1
[
STRING
],
INTERNALS
]):
INTERNALS
effective function
top
a_value is used for expanded attributes to directly set the object
recycle
effective procedure
top
Do whatever needs to be done to free resources or recycle other objects when recycling this one
ensure
is_clear
kind
:
STRING
writable attribute
top
The layout kind.
Almost everything is common between layout kinds. If things begin to diverge too much, change that by a real polymorphism.
is_clear
:
BOOLEAN
effective function
top
set_kind
(a_kind:
STRING
)
effective procedure
top
require
is_clear
FAST_ARRAY
[
STRING
]"repository""reference""layout""embedded""basic""array".has(a_kind)
ensure
not
is_clear
kind
.is_equal(a_kind)
set_type
(a_type:
STRING
)
effective procedure
top
require
not
is_clear
type
= Void
a_type /= Void
ensure
type
.is_equal(a_type)
set_capacity
(a_capacity:
INTEGER_32
)
effective procedure
top
ensure
capacity
= a_capacity
set_ref
(a_ref:
STRING
)
effective procedure
top
require
not
is_clear
ref
= Void
a_ref /= Void
ensure
ref
.is_equal(a_ref)
set_name
(a_name:
STRING
)
effective procedure
top
require
not
is_clear
name
= Void
a_name /= Void
ensure
name
.is_equal(a_name)
set_value
(a_value:
STRING
)
effective procedure
top
require
not
is_clear
value
= Void
a_value /= Void
ensure
value
.is_equal(a_value)
add_layout
(a_layout: REPOSITORY_LAYOUT)
effective procedure
top
require
not
is_clear
a_layout.
name
/= Void
not
kind
.is_equal("reference")
ensure
layouts
.at(a_layout.
name
) = a_layout
make
effective procedure
top
ensure
is_clear
type_memory
:
STRING
writable attribute
top
ref_memory
:
STRING
writable attribute
top
name_memory
:
STRING
writable attribute
top
value_memory
:
STRING
writable attribute
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