Index

Package: Buffers

Description

package Streams.Buffers is

Classes

Buffer_Stream

type Buffer_Stream is new Root_Stream_Type with private;

Ancestors:

Root_Stream_Type

Primitive operations:

Read (Inherited)
Read
Write
Write (Inherited)

Types

A_Buffer_Stream

type A_Buffer_Stream is access all Buffer_Stream'Class;

Subprograms & Entries

Open_Stream

procedure Open_Stream
( buffer: in out A_SEA;
stream: out A_Buffer_Stream );
Creates a Buffer_Stream backed by 'buffer', which is consumed by this procedure. Closing the stream will deallocate the buffer.

Stream

function Stream
( buffer: not null A_SEA ) return A_Buffer_Stream;
Creates a Buffer_Stream wrapper around 'buffer'. The stream depends on the existance of buffer so be sure to call Close on the stream before deallocating the buffer.

Close

procedure Close
( stream: in out A_Buffer_Stream );
Closes the stream and deallocates its buffer (if it had ownership of it, given by calling Open_Stream.)