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,703c4f68db81387d X-Google-Thread: 109fba,703c4f68db81387d X-Google-Thread: 115aec,703c4f68db81387d X-Google-Thread: f43e6,703c4f68db81387d X-Google-Attributes: gid103376,gid109fba,gid115aec,gidf43e6,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news.glorb.com!news-in.ntli.net!newsrout1-win.ntli.net!ntli.net!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!feeder.news-service.com!post.news-service.com!news1.surfino.com!not-for-mail Message-Id: <2111367.VocJdu5gKQ@linux1.krischik.com> From: Martin Krischik Subject: Re: Teaching new tricks to an old dog (C++ -->Ada) Newsgroups: comp.lang.ada,comp.lang.c++,comp.realtime,comp.software-eng Date: Sat, 26 Mar 2005 10:31:47 +0100 References: <1110284070.410136.205090@o13g2000cwo.googlegroups.com> <395uqaF5rhu2mU1@individual.net> <1110329098.642196@athnrd02> <1110361741.551255@athnrd02> <422edaec$0$26554$9b4e6d93@newsread4.arcor-online.net> <1111464133.508323@athnrd02> <423fe9df$0$11476$9b4e6d93@newsread2.arcor-online.net> <1111521825.653841@athnrd02> <424094b0$0$11481$9b4e6d93@newsread2.arcor-online.net> <1111568404.687226@athnrd02> <42416659$0$11476$9b4e6d93@newsread2.arcor-online.net> <1111611226.253249@athnrd02> <4241f47a$0$24073$9b4e6d93@newsread4.arcor-online.net> <1111627358.387482@athnrd02> <424222df$0$24057$9b4e6d93@newsread4.arcor-online.net> <1111632436.374702@athnrd02> <1111698643.735412.144620@l41g2000cwc.googlegroups.com> <424362cc$0$11478$9b4e6d93@newsread2.arcor-online.net> <1111717144.891831@athnrd02> <42446836$0$11463$9b4e6d93@newsread2.arcor-online.net> User-Agent: KNode/0.9.0 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Complaints-To: abuse@surfino.com Organization: Surfino Gmbh NNTP-Posting-Host: 83.169.175.19 (83.169.175.19) NNTP-Posting-Date: Sat, 26 Mar 2005 11:00:27 +0100 X-Trace: 1b228424532bbf60c0ab619645 Xref: g2news1.google.com comp.lang.ada:10022 comp.lang.c++:47327 comp.realtime:1740 comp.software-eng:5357 Date: 2005-03-26T10:31:47+01:00 List-Id: Georg Bauhaus wrote: > Ioannis Vranos wrote: >> Georg Bauhaus wrote: >> Again, one can easily define an array container that accepts user >> defined indexes. > > I have not seen one so far, only some handcoded range checking > which is not the point. I have got one: http://cvs.sourceforge.net/viewcvs.py/adacl/CppCL/Include/AdaArray.H?view=markup > The compiler will use the information present in Index > to establish properties of the Adalike::vector type such that > Adalike::vector indexing (an operation) is based on properties > of Index (Index is a type! It is not an algorithm base on min > and max int parameters). > > This has something to do with making the base types int, long, etc. > class types. When they are class types, you can invoke their > methods, derive other number types, and then you can use > their interface to build an array that is using the information > provided by int or provided by a type derived from int. That's on my TODO list. Using the following class: http://cvs.sourceforge.net/viewcvs.py/adacl/CppCL/Include/Ada-Range.hpp?view=markup Martin Disclaimer: Both sources might not be in working order - everytime I switch compiler (IBM C++ -> MS-C++ -> G++) the code need reworking and the switch to GNU is not finished yet. -- mailto://krischik@users.sourceforge.net Ada programming at: http://ada.krischik.com