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,309015504ed37ff0,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-09-26 09:27:48 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!eusc.inter.net!news.eusc.inter.net!boavista.snafu.de!news From: Michael Erdmann Newsgroups: comp.lang.ada Subject: Usage of Interfaces with Ada 95 Date: Fri, 26 Sep 2003 18:36:31 +0200 Organization: http://www.snafu.de/~boavista Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: news.eusc.inter.net 1064593667 3477 213.73.71.169 (26 Sep 2003 16:27:47 GMT) X-Complaints-To: abuse@eusc.inter.net User-Agent: KNode/0.7.1 Xref: archiver1.google.com comp.lang.ada:42993 Date: 2003-09-26T18:36:31+02:00 List-Id: Dear all, i like to provide a package of elementary interfaces providing some basic concepts on which a application is build, for example a so called Enumeration type generic type Data_Type is private; package Interface.Enumeration is type Object is abstract tagged null record; function HasMoreElements( This : in Object ) return Boolean is abstract; procedure Next( This : in out Object; Result : out Data_Type) is abstract; end Interface.Enumeration; because Ada does not provide an elementary object as e.g. java this package has to be provided as an generic making the use of the package a little bit complicated. ..... type Enumerator is private; ..... procedure Next( This : in out Enumerator; Result : out Data_Type ); ..... private package Reader is new Interface.Enumeration( Data_Type ); type Enumerator is new Reader.Object with record Next : Element_Access := null; end record; The whole thing becomes more and more complicated for other concepts e.g. a Dictionary which involves two types. I am realy wondering if there is a better (simpler) way of providing such a concept library? Regards M.Erdmann