From: Thomas Bruns <newsgroup@donbruno.de>
Subject: how can i allocate an objekt with initialization???
Date: Sun, 05 Dec 2004 17:54:45 +0100
Date: 2004-12-05T17:54:45+01:00 [thread overview]
Message-ID: <covegl$qvq$04$1@news.t-online.com> (raw)
Hello
i have a problem, with initialzie objekt with ada...
i want to do a new, to allocate the objekt...
--------------------------------------------------------------
with ADA.FINALIZATION; use ADA.FINALIZATION;
package class_test_package is
type FATHER_CLASS is new CONTROLLED with
record
INT1 : INTEGER;
end record;
type FATHER_CLASS_PTR is access FATHER_CLASS'Class;
function GETINT1 return INTEGER is abstract;
end class_test_package;
with class_test_package; use class_test_package;
package class_test_package_ableitung is
type CHILD_CLASS is new FATHER_CLASS with private;
type CHILD_CLASS_PTR is access CHILD_CLASS'CLASS;
private
procedure Initialize (OBJECT : in out KIND_CLASS);
procedure Finalize (OBJECT : in out KIND_CLASS);
procedure ADJUST (OBJECT : in out KIND_CLASS);
type CHILD_CLASS is new FATHER_CLASS with
record
INT2 : INTEGER;
end record;
end class_test_package_ableitung;
main:
TEST : FATHER_CLASS_PTR;
begin
TEST:= new CHILD_CLASS'(INT=>1); -- i will initialze the objekt here,but
-- it wrong??
--class_test.adb:11:57: expected private type "KIND_CLASS" defined at
--class_test_package_ableitung.ads:16
--class_test.adb:11:57: found a composite type
end;
next reply other threads:[~2004-12-05 16:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-05 16:54 Thomas Bruns [this message]
2004-12-05 22:51 ` how can i allocate an objekt with initialization??? Stephen Leake
2004-12-06 8:52 ` Martin Krischik
2004-12-06 10:04 ` Ole-Hjalmar Kristensen
2004-12-06 11:49 ` Adrien Plisson
2004-12-06 13:34 ` Martin Krischik
2004-12-13 6:38 ` Dave Thompson
2004-12-13 11:11 ` Martin Krischik
2004-12-06 11:55 ` Martin Krischik
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox