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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,913ffb3586d7a026 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!news.glorb.com!feeder.erje.net!xlned.com!feeder3.xlned.com!feeder.news-service.com!94.75.214.39.MISMATCH!aioe.org!.POSTED!not-for-mail From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: What is the best method for transmitting objects/tagged records? Date: Tue, 7 Jun 2011 18:06:21 +0000 (UTC) Organization: Aioe.org NNTP Server Message-ID: References: <47671647-1941-4bf2-ab34-578b4a853095@k16g2000yqm.googlegroups.com> NNTP-Posting-Host: Lf0Nl3CcQzx+ocHx9cmuGg.user.speranza.aioe.org X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 X-Newsreader: Tom's custom newsreader Xref: g2news1.google.com comp.lang.ada:19685 Date: 2011-06-07T18:06:21+00:00 List-Id: >> marshalling/unmarshalling part of a Partition Communication Subsystem? > >I think that's what it amounts to, yes. Sending an object over a comm link differs from writing to/reading from disk only in timing. In CLAW, the different kinds of bitmaps (8 bit pixel, 24 bit, etc) are children of a root type. The Write routine for each child writes a standard .bmp file. The Read routine is function Read (Filename : in String) return Claw.Bitmaps.Root_DIBitmap_Type'class; It reads the header of the bmp file then does if Header.Private_Info.Color_Depth = Claw.Bitmaps.VGA and Header.Private_Info.Compression = Claw.Bitmaps.BI_RGB then declare Result : Claw.Bitmaps.VGA_DIBitmap_Type( height, width); ... read data into VGA_DIBitmap_Type data structure return Root_DIBitmap_Type'class(Result); end; elsif Header.Private_Info.Color_Depth = Claw.Bitmaps.EGA ...