From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7876e4356325725b X-Google-Attributes: gid103376,public From: tmoran@bix.com (Tom Moran) Subject: Re: Ada.Streams examples Date: 1999/03/10 Message-ID: <36e6fe8d.16020474@news.pacbell.net>#1/1 X-Deja-AN: 453583465 References: <36e61db4.50430543@news.pacbell.net> <7c64kl$r8s$1@nnrp1.dejanews.com> <36e6cd2c.3377267@news.pacbell.net> <7c6s4s$hrt$1@nnrp1.dejanews.com> X-Complaints-To: abuse@pacbell.net X-Trace: typhoon-sf.pbi.net 921108593 206.170.2.20 (Wed, 10 Mar 1999 15:29:53 PDT) Organization: SBC Internet Services NNTP-Posting-Date: Wed, 10 Mar 1999 15:29:53 PDT Newsgroups: comp.lang.ada Date: 1999-03-10T00:00:00+00:00 List-Id: > o Create a 'Write procedure for that bitmap type which converts the bitmap >to a bmp and does one massive Write call for the stream. The problem with >this approach is that if anyone ever wants to do a 'Write on a bitmap for any >reason, the'll get a BMP. You can't overload it to get a JPG or GIF or a >straight memory dump (which is what they might be expecting). Someone could presumably do type GIFED_Bitmap is new BMP with null record; for GIFED_Bitmap'Write use Convert_To_GIF_And_Write; Then internally a GIFED_Bitmap is the same as my BMP, and my routines all work on it, but when the user writes it he gets his Convert_To_GIF_And_Write instead of my BMP'Write. No? > o Create a Write_BMP and Read_BMP routine that take in files and bitmaps as >parameters, and forget about streams. But with the BMP'Write I separate the file from the conversion, so the result of the conversion could be handed to a called C routine, say. That seems to me a pretty strong argument for BMP'Write instead of BMP_Write.