← All compilation units

Flyology.Data_Structures.Storage_Types.Immutable

Description

Creates one immutable fixed-size byte-backed element type. Value owns its bytes and may be copied into a container without representation conversion. Const_Ref borrows published container bytes without copying. Builder may modify only unpublished container storage, while Value_Builder constructs an independent Value before it is published. Scalar accessors use the native fixed-width representation exercised by Flyology's tested targets; Type_Signature and Layout_Version define the stable semantic contract.

Alignment

Alignment : constant Positive := Required_Alignment;

Required alignment of each stored value.

Assign

procedure Assign (Item : in out Builder; Data : Value)

Assign an independent immutable value through an unpublished builder.

Parameters
Item

Active unpublished builder

Data

Independent immutable representation @exclude

Bind

procedure Bind (Item : out Builder; Target : Immutable_Storage_View)

Bind a builder to validated unpublished storage.

Parameters
Item

Builder initialized on success

Target

Validated unpublished element storage @exclude

Bind

procedure Bind (Item : out Const_Ref; Source : Immutable_Storage_View)

Bind a read-only reference to validated published storage.

Parameters
Item

Reference initialized on success

Source

Validated published element storage @exclude

Builder

type Builder is limited private;

Mutable process-local reference to an unpublished container slot. A builder is valid only during the container operation that bound it.

Byte_Size

Byte_Size : Positive;

Const_Ref

type Const_Ref is limited private;

Read-only process-local reference to one published stored value. A reference is valid only during the bound observer invocation that received it.

Copy

procedure Copy (Source : Immutable_Storage_View; Target : Immutable_Storage_View)

Copy one validated immutable storage binding to unpublished storage.

Parameters
Source

Validated published element storage

Target

Validated unpublished element storage @exclude

Copy_From

function Copy_From (Source : Immutable_Storage_View) return Value

Copy a validated published storage binding into an independent value.

Parameters
Source

Validated published element storage

Return value

Independent immutable value @exclude

Copy_To

procedure Copy_To (Item : Value; Target : Immutable_Storage_View)

Copy an immutable Value into a validated unpublished storage binding.

Parameters
Item

Independent immutable value

Target

Validated unpublished element storage @exclude

Equivalent

function Equivalent (Left : Const_Ref; Right : Const_Ref) return Boolean

Compare two published representations in place.

Parameters
Left

First active published reference

Right

Second active published reference

Return value

True when every representation byte matches @exclude

Equivalent

function Equivalent (Left : Value; Right : Const_Ref) return Boolean

Compare an independent representation with published bytes.

Parameters
Left

Independent immutable bytes

Right

Active published reference

Return value

True when every representation byte matches @exclude

Freeze

function Freeze (Item : in out Value_Builder) return Value

Freeze an independent builder. Item must not be used again.

Parameters
Item

Completed local builder

Return value

Immutable byte-backed value

Hash

function Hash (Item : Const_Ref) return Interfaces.Unsigned_64

Compute the stable FNV-1a hash of published bytes in place.

Parameters
Item

Active read-only reference

Return value

64-bit representation hash @exclude

Hash

function Hash (Item : Value) return Interfaces.Unsigned_64

Compute the stable FNV-1a hash of an independent representation.

Parameters
Item

Immutable bytes to hash

Return value

64-bit representation hash @exclude

Layout_Version

Layout_Version : Interfaces.Unsigned_32;

Load_U32

function Load_U32 (Item : Const_Ref; Offset : Natural) return Interfaces.Unsigned_32

Return an aligned native 32-bit field from a published reference.

Parameters
Item

Active read-only reference

Offset

Zero-based field offset

Return value

Stored fixed-width value

Load_U64

function Load_U64 (Item : Const_Ref; Offset : Natural) return Interfaces.Unsigned_64

Return an aligned native 64-bit field from a published reference.

Parameters
Item

Active read-only reference

Offset

Zero-based field offset

Return value

Stored fixed-width value

Load_U8

function Load_U8 (Item : Const_Ref; Offset : Natural) return Interfaces.Unsigned_8

Return one byte from a published reference.

Parameters
Item

Active read-only reference

Offset

Zero-based byte offset

Return value

Stored byte

Required_Alignment

Required_Alignment : Positive := 1;

Signature

Signature : constant Interfaces.Unsigned_64 := Type_Signature;

Stable semantic type identifier persisted by receiving containers.

Size

Size : constant Positive := Byte_Size;

Exact stored bytes in one immutable value.

Start

function Start return Value_Builder

Begin a zero-filled independent value construction.

Return value

Builder whose bytes are initially zero

Store_U32

procedure Store_U32 (Item : in out Builder; Offset : Natural; Data : Interfaces.Unsigned_32)

Write an aligned native 32-bit field in an unpublished container slot.

Parameters
Item

Active unpublished builder

Offset

Zero-based field offset

Data

Fixed-width value to store

Store_U32

procedure Store_U32 (Item : in out Value_Builder; Offset : Natural; Data : Interfaces.Unsigned_32)

Write an aligned native 32-bit field in a local value builder.

Parameters
Item

Active local builder

Offset

Zero-based field offset

Data

Fixed-width value to store

Store_U64

procedure Store_U64 (Item : in out Builder; Offset : Natural; Data : Interfaces.Unsigned_64)

Write an aligned native 64-bit field in an unpublished container slot.

Parameters
Item

Active unpublished builder

Offset

Zero-based field offset

Data

Fixed-width value to store

Store_U64

procedure Store_U64 (Item : in out Value_Builder; Offset : Natural; Data : Interfaces.Unsigned_64)

Write an aligned native 64-bit field in a local value builder.

Parameters
Item

Active local builder

Offset

Zero-based field offset

Data

Fixed-width value to store

Store_U8

procedure Store_U8 (Item : in out Builder; Offset : Natural; Data : Interfaces.Unsigned_8)

Write one byte in an unpublished container slot.

Parameters
Item

Active unpublished builder

Offset

Zero-based byte offset

Data

Byte to store

Store_U8

procedure Store_U8 (Item : in out Value_Builder; Offset : Natural; Data : Interfaces.Unsigned_8)

Write one byte in a local independent value builder.

Parameters
Item

Active local builder

Offset

Zero-based byte offset

Data

Byte to store

Type_Signature

Type_Signature : Interfaces.Unsigned_64;

Value

type Value is private;

Independent immutable byte-backed value accepted by containers.

Value_Builder

type Value_Builder is limited private;

Local builder for constructing an independent immutable Value.

Version

Version : constant Interfaces.Unsigned_32 := Layout_Version;

Version of the immutable value's byte layout.