Re: I/O streaming with custom data transport



On Wed, 22 Nov 2006 10:21:02 +0100, Maciej Sobczak wrote:

I don't understand. The focus here is on foo - which represents the set
of functions that can use the stream without really caring what the
stream is.

OK, then it is just what Ada calls a class-wide subprogram:

type My_Abstract_Stream is abstract new Root_Stream_Type ...;

-- Somewhere else
procedure Foo (S : in out My_Abstract_Stream'Class);

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
.



Relevant Pages

  • Re: Which new language to learn?
    ... as evidenced by Ada 95. ... In my opinion all C programs assume other languages will interface ... Execute the command with write_mode ... type stream is private; ...
    (comp.programming)
  • Re: De-serializing and stack sizes
    ... The 'Input attribute is trying to return the object in the stack and so ... I think what you have is stream attributes for *limited* types. ... It must be different in Ada 05. ... Portability is not an issue in this case, that's a reason I'm going for the ...
    (comp.lang.ada)
  • Re: De-serializing and stack sizes
    ... use access types so they get created in heap and there's no problem. ... The 'Input attribute is trying to return the object in the stack and so it ... I think what you have is stream attributes for *limited* types. ... It must be different in Ada 05. ...
    (comp.lang.ada)