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, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b14a804025dceb20 X-Google-Attributes: gid103376,public From: rwilson007007@my-deja.com Subject: Re: Constructors/Destructors in Ada95 Date: 2000/10/22 Message-ID: <8svc01$c75$1@nnrp1.deja.com>#1/1 X-Deja-AN: 684508034 References: <39EE160D.F0A2000@bigfoot.com> <39EF5431.BF4CD793@bigfoot.com> X-Http-Proxy: 1.0 x54.deja.com:80 (Squid/1.1.22) for client 207.109.1.73 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Sun Oct 22 18:34:41 2000 GMT X-MyDeja-Info: XMYDJUIDrwilson007007 Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.73 [en] (Win95; U) Date: 2000-10-22T00:00:00+00:00 List-Id: in order to achieve the same effect as constructor arguments in c++ it is helpful to define an attributes class for each application-object class (with the same inheritance pattern as the application classes). the attributes class tagged record contains a field for each application -class tagged record field requiring explicit initialization. then, define the base class tagged record for your application-object classes with a classwide access value to a constant attributes class instance as one of its members. finally, the base class constructor reads the initial-attributes values for its attributes member from config files (for example). the inheriting classes then look-up the appropriate initial values in This.Attributes (for "Initialize (This : in out access Object)").... another way is to is enclose your classes in generic packages with the generic formal parameters corresponding to constructor arguments. however, this would seem to force a singleton pattern. --rwilson Sent via Deja.com http://www.deja.com/ Before you buy.