comp.lang.ada
 help / color / mirror / Atom feed
From: Maciej Sobczak <no.spam@no.spam.com>
Subject: Hiding details and protected types
Date: Tue, 24 Apr 2007 15:44:40 +0200
Date: 2007-04-24T15:44:40+02:00	[thread overview]
Message-ID: <f0l1kb$568$1@cernne03.cern.ch> (raw)

Hi,

Let's say there is a protected type:

protected type PT is
   procedure P;
private
   A : T;
end PT;

where T is some type that is really an implementation detail of PT.

It is not possible to declare this type in the private part of the 
protected type (why?), so it has to be declared outside PT:

type T is ...;
protected type PT is
   procedure P;
private
   A : T;
end PT;

The problem is that declaring T in the same declaration scope pollutes 
the name space and is against Good Engineering Principles (tm).

How can I hide it?
Some juggling with packages comes to mind - any recommendations?

-- 
Maciej Sobczak : http://www.msobczak.com/
Programming    : http://www.msobczak.com/prog/



             reply	other threads:[~2007-04-24 13:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-24 13:44 Maciej Sobczak [this message]
2007-04-24 15:04 ` Hiding details and protected types Jean-Pierre Rosen
2007-04-24 18:18   ` Randy Brukardt
2007-04-24 19:16 ` Jeffrey R. Carter
2007-04-24 21:31 ` Georg Bauhaus
replies disabled

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