* Unzip.Streams definition
@ 2000-01-31 0:00 Gautier
0 siblings, 0 replies; only message in thread
From: Gautier @ 2000-01-31 0:00 UTC (permalink / raw)
Hello OO experts - there seems to be gurus of the tagged type.
I have made a `streams' extension to Unzip, it works nice,
but I'm not absolutely sure if there aren't nonsenses in the
definitions (access or not, etc.).
As a total beginner in stream programming, I have mimiced some
examples. If you spot an absurdity or hidden trap, write me!
Release for ~1 week. Spec. follows. TIA, G.
-------------
with Unzip;
with Ada.Streams; use Ada.Streams;
package Unzip.Streams is
pragma Elaborate_Body;
type Stream_Access is access all Root_Stream_Type'Class;
type Zipped_File_Type is private;
procedure Open
(File : in out Zipped_File_Type;
Archive_Name : in String;
Name : in String);
procedure Close (File : in out Zipped_File_Type);
function Is_Open (File : in Zipped_File_Type) return Boolean;
function End_Of_File (File : in Zipped_File_Type) return Boolean;
function Stream (File : Zipped_File_Type) return Stream_Access;
private
type UZS_state is ( ... );
type p_String is access String;
type p_Stream_Element_Array is access Stream_Element_Array;
type Unzip_Stream_Type is new Root_Stream_Type with record
state : UZS_state;
...
end record;
procedure Read
(Stream : in out Unzip_Stream_Type;
Item : out Stream_Element_Array;
Last : out Stream_Element_Offset);
procedure Write
(Stream : in out Unzip_Stream_Type;
Item : in Stream_Element_Array);
type Zipped_File_Type is access Unzip_Stream_Type;
End_Error : exception;
Use_Error : exception;
end Unzip.Streams;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2000-01-31 0:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-01-31 0:00 Unzip.Streams definition Gautier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox