From: Bill Findlay <news@findlayw.plus.com>
Subject: Ada 2005 OOP : newbie questions
Date: Thu, 27 Jan 2011 14:54:01 +0000
Date: 2011-01-27T14:54:01+00:00 [thread overview]
Message-ID: <C9673789.51E3%news@findlayw.plus.com> (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;
next reply other threads:[~2011-01-27 14:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-27 14:54 Bill Findlay [this message]
2011-01-27 15:15 ` Ada 2005 OOP : newbie questions Dmitry A. Kazakov
2011-01-27 15:50 ` Bill Findlay
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox