comp.lang.ada
 help / color / mirror / Atom feed
From: Maciej Sobczak <see.my.homepage@gmail.com>
Subject: Enforcing initialization protocol for protected type
Date: Mon, 7 Sep 2009 08:15:43 -0700 (PDT)
Date: 2009-09-07T08:15:43-07:00	[thread overview]
Message-ID: <1fcccc80-0142-4f07-8852-8d151ea96ee2@c37g2000yqi.googlegroups.com> (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



             reply	other threads:[~2009-09-07 15:15 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-07 15:15 Maciej Sobczak [this message]
2009-09-07 17:01 ` Enforcing initialization protocol for protected type 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
replies disabled

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