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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,18aea7ce90e03321 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-07-12 12:23:44 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!cyclone.bc.net!newsfeed.direct.ca!look.ca!newshub2.rdc1.sfba.home.com!news.home.com!news1.rdc1.sfba.home.com.POSTED!not-for-mail From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: Direct_IO problem -- generic package problem References: <3B4DD722.EB6F3AB7@boeing.com> X-Newsreader: Tom's custom newsreader Message-ID: <4Pm37.178065$%i7.116159417@news1.rdc1.sfba.home.com> Date: Thu, 12 Jul 2001 19:23:44 GMT NNTP-Posting-Host: 24.7.82.199 X-Complaints-To: abuse@home.net X-Trace: news1.rdc1.sfba.home.com 994965824 24.7.82.199 (Thu, 12 Jul 2001 12:23:44 PDT) NNTP-Posting-Date: Thu, 12 Jul 2001 12:23:44 PDT Organization: Excite@Home - The Leader in Broadband http://home.com/faster Xref: archiver1.google.com comp.lang.ada:9886 Date: 2001-07-12T19:23:44+00:00 List-Id: >Instantiate Direct_IO with constrained subtypes of Matrix for the types >of interest. i.e. >My own ideas is to create separate databases for all eight databases >that uses DB (CAR_DB, BOAT_DB, HOUSE_DB...) with specified values for >MATRIX, but that seems like a lot of work and not very objectoriented. If you are doing direct IO all the records in a given file need to be the same size anyway, so it certainly is reasonable to instantiate Ada.Direct_IO once for each of the eight database files. Did the old program actually mix different size records in a single file? How did it know where to look for record N? As for OO, if you have a root Matrix tagged type make it abstract, then each of the eight children should have its own overide of its input/output routines using the appropriate instantiation.