VSS.Text_Streams

Entities

Interface Types

Access Types

Subprograms

Description

Abstract API of the streams interpreted as sequence of characters.

Error_Message

function Error_Message
  (Self : Input_Text_Stream) return VSS.Strings.Virtual_String

Return error message when Has_Error returns True, or 'null' string.

Parameters
Self
Return Value

Error_Message

function Error_Message
  (Self : Output_Text_Stream) return VSS.Strings.Virtual_String

Return error message when Has_Error returns True, or 'null' string.

Parameters
Self
Return Value

Get

procedure Get
  (Self    : in out Input_Text_Stream;
   Item    : out VSS.Characters.Virtual_Character'Base;
   Success : in out Boolean)

Get character from the input stream.

Parameters
Self

Text stream itself

Item

Buffer to store character. It should be set to invalid value in case of stream error or unavailable data

Success

Subprogram do nothing when False, and set it to False on failure.

Has_Error

function Has_Error (Self : Input_Text_Stream) return Boolean

Return True when any error is detected.

Parameters
Self
Return Value

Has_Error

function Has_Error (Self : Output_Text_Stream) return Boolean

Return True when any error is detected.

Parameters
Self
Return Value

Input_Text_Stream

type Input_Text_Stream is limited interface;

Input_Text_Stream_Access

type Input_Text_Stream_Access is access all Input_Text_Stream'Class;

Is_End_Of_Data

function Is_End_Of_Data
  (Self : Input_Text_Stream) return Boolean

Return True when there is no more data is available now.

Parameters
Self
Return Value

Is_End_Of_Stream

function Is_End_Of_Stream
  (Self : Input_Text_Stream) return Boolean

Return True when when end of stream is reached.

Parameters
Self
Return Value

New_Line

procedure New_Line
  (Self    : in out Output_Text_Stream;
   Success : in out Boolean)

Output line terminator sequence to the text stream.

Parameters
Self

Text stream itself

Success

Subprogram do nothing when False, and set it to False on failure.

Output_Text_Stream

type Output_Text_Stream is limited interface;

Output_Text_Stream_Access

type Output_Text_Stream_Access is access all Output_Text_Stream'Class;

Put

procedure Put
  (Self    : in out Output_Text_Stream;
   Item    : VSS.Characters.Virtual_Character;
   Success : in out Boolean)

Output character to stream with conversion to the stream's text encoding.

Parameters
Self

Text stream itself

Item

Character to output

Success

Subprogram do nothing when False, and set it to False on failure.

Put

procedure Put
  (Self    : in out Output_Text_Stream;
   Item    : VSS.Strings.Virtual_String;
   Success : in out Boolean)

Output string to stream with conversion to the stream's text encoding.

Parameters
Self

Text stream itself

Item

String to output

Success

Subprogram do nothing when False, and set it to False on failure.

Put_Line

procedure Put_Line
  (Self    : in out Output_Text_Stream;
   Item    : VSS.Strings.Virtual_String;
   Success : in out Boolean)

Output string to stream with conversion to the stream's text encoding and output line terminator sequence.

Parameters
Self

Text stream itself

Item

String to output

Success

Subprogram do nothing when False, and set it to False on failure.