comp.lang.ada
 help / color / mirror / Atom feed
* Enforcing initialization protocol for protected type
@ 2009-09-07 15:15 Maciej Sobczak
  2009-09-07 17:01 ` Georg Bauhaus
  2009-09-10 16:39 ` Per Sandberg
  0 siblings, 2 replies; 13+ messages in thread
From: Maciej Sobczak @ 2009-09-07 15:15 UTC (permalink / raw)


Consider the Needs_Constructor type from the code example in the Ada
wikibook:

http://en.wikibooks.org/wiki/Ada_Programming/Types/limited#Initialisi...

Is it possible to ensure a given initialization protocol for protected
types as well?

The problem is that protected types cannot have unknown discriminants.
How can I ensure that objects of a given protected type are always
initialized with a call to proper constructor function?

Note that wrapping a protected object in another one (presumably
limited and private) would limit the possibility to perform timed
entry calls on the target protected object and preserving this
possibility is essential in my actual use case.

--
Maciej Sobczak * www.msobczak.com * www.inspirel.com

Database Access Library for Ada: www.inspirel.com/soci-ada



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

end of thread, other threads:[~2009-09-15  0:27 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-07 15:15 Enforcing initialization protocol for protected type Maciej Sobczak
2009-09-07 17:01 ` Georg Bauhaus
2009-09-07 20:19   ` Maciej Sobczak
2009-09-10 17:07     ` Georg Bauhaus
2009-09-11  5:01     ` AdaMagica
2009-09-11  9:03       ` Dmitry A. Kazakov
2009-09-11 15:25         ` AdaMagica
2009-09-11 16:27           ` Dmitry A. Kazakov
2009-09-11 22:24             ` Randy Brukardt
2009-09-12  8:44               ` Dmitry A. Kazakov
2009-09-10 16:39 ` Per Sandberg
2009-09-14 21:15   ` Adam Beneschan
2009-09-15  0:27     ` Randy Brukardt

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