package YAMI.Serializables

Public [types] [subprograms]

Types

Serialization_Buffer

   type Serialization_Buffer (Size : Ada.Streams.Stream_Element_Count) is
      record
         Buffer : Ada.Streams.Stream_Element_Array (1 .. Size);
      end record;
   type Serialization_Buffer_Access is access all Serialization_Buffer;

Wrapper type for serialization and deserialization segments.

Serialization_Buffer_List

   type Serialization_Buffer_List is
     array (Positive range <>) of Serialization_Buffer_Access;

List of serialization and deserialization segments.

Serializable

   type Serializable is limited interface;

Common interface for serializable entities.


Subprograms

Free

   procedure Free (Buffer : in out Serialization_Buffer_Access);

Deallocates the dynamically allocated buffer.

Serialize_Buffer_Size

   function Serialize_Buffer_Size (S : in Serializable)
                                  return Ada.Streams.Stream_Element_Count
     is abstract;

Computes the total size of serialization buffer(s) for the current content of this object.

Serialize

   procedure Serialize (S : in Serializable;
                        Buffers : in Serializables.Serialization_Buffer_List)
     is abstract;

Serializes the current content of this object into the given buffer(s).

The serialization buffer does not have to be contiguous and any number of buffer segments is allowed, provided that the size of each buffer segment is a multiple of 4 (32 bits). The function scatters the serialized data into subsequent buffers as they become filled.

Core_Object

   function Core_Object (S : in Serializable)
                        return Details.Void_Ptr is abstract;

Used only by the binding layer.