comp.lang.ada
 help / color / mirror / Atom feed
From: Jerry van Dijk <jvandyk@attglobal.net>
Subject: Re: Problems with the GNAT/C++ Interface.
Date: 03 Nov 2001 21:39:38 +0100
Date: 2001-11-03T21:39:38+01:00	[thread overview]
Message-ID: <wkofmjlhbp.fsf@attglobal.net> (raw)
In-Reply-To: 3BE3BEA1.D4C66864@cs.tu-berlin.de


The problem is that the compiler refuses the tagged declaration after the 
forwarding declaration. I'm no language lawyer, but normally I would expect
this to work here. Maybe it's a CPP interface limitation.

with Interfaces.CPP;

package Chainable_Type is

--   type Chainable;
--   type Chainable_Class_Access is access all Chainable'Class;

   type Chainable is tagged
      record
--           next   : Chainable_Class_Access;
--           prev   : Chainable_Class_Access;
         Vtable : Interfaces.CPP.Vtable_Ptr;
      end record;

   function Constructor return Chainable'Class;  -- default constructor
   procedure reset;

   pragma CPP_Class (Chainable);

   pragma Import (CPP, Constructor, "chainable");
   pragma CPP_Constructor (Constructor);

   pragma Import (CPP, reset);

end Chainable_Type;

-- 
--  Jerry van Dijk   | email: jvandyk@attglobal.net
--  Leiden, Holland  | web:   home.trouwweb.nl/Jerry



  reply	other threads:[~2001-11-03 20:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-02  3:13 Problems with the GNAT/C++ Interface Volkert
2001-11-03  9:53 ` Volkert Barr
2001-11-03 20:39   ` Jerry van Dijk [this message]
2001-11-05 15:24     ` Volkert Barr
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox