package YAMI.Raw_Buffer_Data_Sources

Public [types] [subprograms]

Types

Raw_Buffer_Data_Source

   type Raw_Buffer_Data_Source (<>) is limited
     new Serializables.Serializable with private;

Serializable wrapper for the raw binary data.

Serializable wrapper for the raw binary data allows to use already serialized content for message sending. The two major use cases for this type are efficient message forwarding (when the message is received and its content is used for another message) and support for custom data models and serializers.


Subprograms

Make_Raw_Buffer_Data_Source

   function Make_Raw_Buffer_Data_Source
     (Buffers : in Serializables.Serialization_Buffer_List)
     return Raw_Buffer_Data_Source;

Constructs the buffer wrapper for the given set of buffers. The data buffer must have the same form as if given for the deserialization of Parameters_Collection.

Make_Raw_Buffer_Data_Source

   function Make_Raw_Buffer_Data_Source
     (Buffers : in Core.Serialization_Buffers_Descriptor)
     return Raw_Buffer_Data_Source;

Constructs the buffer wrapper for the given set of buffers, as described by the low-level descriptor.

Serialize_Buffer_Size

   overriding
   function Serialize_Buffer_Size (Raw : in Raw_Buffer_Data_Source)
                                  return Ada.Streams.Stream_Element_Count;

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

Serialize

   overriding
   procedure Serialize (Raw : in Raw_Buffer_Data_Source;
                        Buffers : in Serializables.Serialization_Buffer_List);

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

   overriding
   function Core_Object (Raw : in Raw_Buffer_Data_Source)
                        return Details.Void_Ptr;

Used only by the binding layer.