From: Shark8 <OneWingedShark@gmail.com>
Subject: Re: On packages hierarchy
Date: Mon, 28 Jul 2014 17:24:58 -0600
Date: 2014-07-28T17:24:58-06:00 [thread overview]
Message-ID: <fZABv.52877$nx3.32319@fx29.iad> (raw)
In-Reply-To: <lr5u3t$9ka$1@speranza.aioe.org>
On 28-Jul-14 10:35, Victor Porton wrote:
>> Why not just have a single stream type?
> I want to make an interface to streams of Raptor C library.
>
> Because, as you say, we are to have a single stream type, this type should
> be well-interfaces with that "single" Ada stream class.
>
>> >Moreover, Ada's root-stream is abstract, so you can't have objects of
>> >that type.
> Well, I mean object of Root_Stream_Type'Class.
Again, why?
Your Raptor-stream type /will/ be an concrete-instance of
Root_stream_type, and a member of its class, won't it? I mean unless I'm
completely misunderstanding you...
Use Ada.Streams;
Type Dave is new Root_Stream_Type with null record;
overriding procedure Read
(Stream : in out Dave;
Item : out Stream_Element_Array;
Last : out Stream_Element_Offset);
procedure Write
(Stream : in out Dave;
Item : Stream_Element_Array);
---- Implementation:
overriding procedure Read
(Stream : in out Dave;
Item : out Stream_Element_Array;
Last : out Stream_Element_Offset)
is null; -- Replace this with actual implementation.
overriding procedure Write
(Stream : in out Dave;
Item : Stream_Element_Array)
is null; -- Replace this with actual implementation.
Perhaps reading the first and second posts on this thread will help you
understand:
http://computer-programming-forum.com/44-ada/07c6cd94dbb2d6b1.htm
next prev parent reply other threads:[~2014-07-28 23:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-28 13:41 On packages hierarchy Victor Porton
2014-07-28 16:03 ` Shark8
2014-07-28 16:35 ` Victor Porton
2014-07-28 23:24 ` Shark8 [this message]
2014-07-29 12:36 ` Victor Porton
2014-07-29 18:44 ` Shark8
2014-07-29 19:42 ` Simon Wright
2014-07-29 21:26 ` Shark8
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox