comp.lang.ada
 help / color / mirror / Atom feed
From: "Srinivasan, R" <gitas@roanoke.infi.net>
Subject: Re: Ada95 Streams
Date: 1998/12/03
Date: 1998-12-03T00:00:00+00:00	[thread overview]
Message-ID: <747h04$vr2$1@nw001t.infi.net> (raw)
In-Reply-To: 742rpk$2t4$1@nnrp1.dejanews.com

I do not believe you need to extend the root_stream_type. I believe you want
to use the 'Read for the specific data type on the stream.

For instance if you had a Header_T type defined and Hdr is an object of that
type :

  Header_T'Read ( Saveset.Savestr , Hdr ) ;

I have used this approach for heterogeneous reads from binary files.

david_jones_98@yahoo.com wrote in message
<742rpk$2t4$1@nnrp1.dejanews.com>...
>I'm using stream_io get heterogeneous (several different types) input from
a
>binary file, which works great. I read in a block of data from the file,
then
>perform a crc check on it, and then if the crc is ok, i need to read some
>records from that block of data which is now in memory. I'd like to do this
>using the same stream attributes I use when reading from the file.
>
>How should I extend the root_stream_type to do this? At the moment I store
the
>block of data as an array of bytes.
>
>-----------== Posted via Deja News, The Discussion Network ==----------
>http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own






  parent reply	other threads:[~1998-12-03  0:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-12-02  0:00 Ada95 Streams david_jones_98
1998-12-02  0:00 ` Jerry van Dijk
1998-12-03  0:00   ` david_jones_98
1998-12-03  0:00     ` Jerry van Dijk
1998-12-04  0:00     ` Richard D Riehle
1998-12-03  0:00 ` Srinivasan, R [this message]
1998-12-05  0:00 ` david.c.hoos.sr
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox