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,6a6d9b5a811a96b3,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!f14g2000cwb.googlegroups.com!not-for-mail From: "Adrian Hoe" Newsgroups: comp.lang.ada Subject: How to access parent class/object? Date: 24 Mar 2005 22:57:10 -0800 Organization: http://groups.google.com Message-ID: <1111733830.271744.235420@f14g2000cwb.googlegroups.com> NNTP-Posting-Host: 219.95.230.55 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1111733834 29982 127.0.0.1 (25 Mar 2005 06:57:14 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 25 Mar 2005 06:57:14 +0000 (UTC) User-Agent: G2/0.2 Complaints-To: groups-abuse@google.com Injection-Info: f14g2000cwb.googlegroups.com; posting-host=219.95.230.55; posting-account=LKUaWwwAAABzCo8SD2jIIt5LtkPzH8ot Xref: g2news1.google.com comp.lang.ada:9969 Date: 2005-03-24T22:57:10-08:00 List-Id: Hi, I have the following codes (abbreviated): package A is type A_Object is tagged private; ... end A; package B is type B_Object is new A_Object with private; ... end B; package C is type C_Object is new B_Object with private; ... end C; package D is type D_Object is new C_Object with private; ... end D; Now, I have the following declaration: My_D_Object is D.D_Object; How can I reference the parent objects? procedure Process_C (C_Obj : access C_Object); procedure Process_D (D_Obj : access D_Object); How can I pass C_Object and D_Object into Process_C and Process_D respectively given only My_D_Object is D.D_Object? Thanks. -- Adrian Hoe