comp.lang.ada
 help / color / mirror / Atom feed
* Hiding details and protected types
@ 2007-04-24 13:44 Maciej Sobczak
  2007-04-24 15:04 ` Jean-Pierre Rosen
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Maciej Sobczak @ 2007-04-24 13:44 UTC (permalink / 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/



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-04-24 21:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-24 13:44 Hiding details and protected types Maciej Sobczak
2007-04-24 15:04 ` 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

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