Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create stream library for Stream_Reader clients #70

Open
blancolioni opened this issue Apr 4, 2022 · 0 comments
Open

Create stream library for Stream_Reader clients #70

blancolioni opened this issue Apr 4, 2022 · 0 comments

Comments

@blancolioni
Copy link
Owner

blancolioni commented Apr 4, 2022

Create a stream reader wrapper around the stream reader client

with System.Storage_Elements;
with Rose.Interfaces.Stream_Reader.Client;

package Rose.Streams is

   type File_Type is limited private;

   procedure Open 
     (File   : in out File_Type;
      Reader : Rose.Interfaces.Stream_Reader.Client.Stream_Reader_Client);

   procedure Close (File : in out File_Type);

   procedure Read
     (File   : in out File_Type;
      Buffer : System.Address;
      Length : System.Storage_Elements.Storage_Count);

   generic
      type Element_Type is private;
   package Generic_Reader is
      procedure Read
        (File    : in out File_Type;
         Element : out Element_Type);
   end Generic_Reader;

private

   --  ...

end Rose.Streams;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant