comp.lang.ada
 help / color / mirror / Atom feed
* Ada 2005 OOP : newbie questions
@ 2011-01-27 14:54 Bill Findlay
  2011-01-27 15:15 ` Dmitry A. Kazakov
  0 siblings, 1 reply; 3+ messages in thread
From: Bill Findlay @ 2011-01-27 14:54 UTC (permalink / raw)


I have a package P that declares

   type R is new Limited_Controlled with private;

The private extension of R contains a number of fields that I want to be
common to future derived types S, T, etc; P declares a number of primitive
operation signatures of R that I want S, T, etc, to override; and there are
some operations on R'Class in P as well.

1. Can I prevent objects of type P.R from being declared,
   while allowing objects of types S, T, etc?

2. Can I prevent a useless primitive of P.R, say P.Op from being called?
   At the moment the body of P.Op raises an exception, but I would much
   prefer to have a compile-time check (of course).

I feel sure that there is a general way of dealing with such issues,
but at the moment I can't seem to see the wood for the trees.

-- 
Bill Findlay
with blueyonder.co.uk;
use  surname & forename;




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

end of thread, other threads:[~2011-01-27 15:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-27 14:54 Ada 2005 OOP : newbie questions Bill Findlay
2011-01-27 15:15 ` Dmitry A. Kazakov
2011-01-27 15:50   ` Bill Findlay

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