How to access parent class/object?
From: Adrian Hoe (byhoe_at_greenlime.com)
Date: 03/25/05
- Next message: Simon Wright: "Re: Ada bench : count words"
- Previous message: Jerry Coffin: "Re: Teaching new tricks to an old dog (C++ -->Ada)"
- Next in thread: Dmitry A. Kazakov: "Re: How to access parent class/object?"
- Reply: Dmitry A. Kazakov: "Re: How to access parent class/object?"
- Reply: Adrian Hoe: "Re: How to access parent class/object?"
- Reply: Adrian Hoe: "Re: How to access parent class/object?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 24 Mar 2005 22:57:10 -0800
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
- Next message: Simon Wright: "Re: Ada bench : count words"
- Previous message: Jerry Coffin: "Re: Teaching new tricks to an old dog (C++ -->Ada)"
- Next in thread: Dmitry A. Kazakov: "Re: How to access parent class/object?"
- Reply: Dmitry A. Kazakov: "Re: How to access parent class/object?"
- Reply: Adrian Hoe: "Re: How to access parent class/object?"
- Reply: Adrian Hoe: "Re: How to access parent class/object?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|