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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,772ae8afc5db35f2 X-Google-Attributes: gid103376,public From: nospam@thanks.com.au (Don Harrison) Subject: Re: Can't export object of private type Date: 1999/03/04 Message-ID: #1/1 X-Deja-AN: 450976091 Sender: news@syd.csa.com.au X-Nntp-Posting-Host: dev7 References: Organization: CSC Australia, Sydney Reply-To: nospam@thanks.com.au Newsgroups: comp.lang.ada Date: 1999-03-04T00:00:00+00:00 List-Id: Bob Duff wrote: :nospam@thanks.com.au (Don Harrison) writes: : :> Since Planet_Id is exported, anyone can declare an object of that type. :> We want to ensure there is only a single instance shared by all clients. : :If you want a package to have control over object allocation, :export a type with unknown discriminants. Then clients can't :create objects. The package itself is the only thing that can :create objects, and so it can place whatever restrictions it :likes, in your case, just one. Do you mean like this: package T is type T_Type (<>) is .. private; -- no limited .. end; -- Don (Harrison). donh at syd.csa.com.au