comp.lang.ada
 help / color / mirror / Atom feed
From: Stephen Leake <Stephe.Leake@nasa.gov>
Subject: Re: List of packages ?!
Date: 22 May 2003 12:24:55 -0400
Date: 2003-05-22T16:40:44+00:00	[thread overview]
Message-ID: <uel2rymnc.fsf@nasa.gov> (raw)
In-Reply-To: 3ECCD541.50200@alcatel.de

Mirko Aigner <Mirko.Aigner@alcatel.de> writes:

> Hello I am a Student and I got the following problem.
> I got c++ Code and now I should reimplement it in Ada.
> My Problem is: I have a C++ Class only containing methods. In Ada this
> is a package, right ?!

Actually, a C++ class corresponds most closely to an Ada tagged type
in a package.

> In C++ I can create a list containing this methods-only-class, is
> that possible for ada, too ?!

Yes. Here is a "null data class with methods":

package Null_Data_Class is

   type Object_Type is tagged null record;

   procedure Method_1 (Object : in Object_Type);

   procedure Method_2 (Object : in Object_Type);

end Null_Data_Class;

There are several list packages for Ada available; see www.adapower.com.

> thanks for the help

You're welcome. 

-- 
-- Stephe



  reply	other threads:[~2003-05-22 16:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-22 13:48 List of packages ?! Mirko Aigner
2003-05-22 16:24 ` Stephen Leake [this message]
2003-05-22 16:25 ` Xavier Nicollin
2003-05-23  5:07   ` Mirko Aigner
2003-05-22 18:21 ` Noivet
replies disabled

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