comp.lang.ada
 help / color / mirror / Atom feed
From: Brian May <bam@snoopy.apana.org.au>
Subject: Re: APQ
Date: Wed, 22 Dec 2004 10:29:01 +1100
Date: 2004-12-22T10:29:01+11:00	[thread overview]
Message-ID: <sa4sm5zmds2.fsf@snoopy.apana.org.au> (raw)
In-Reply-To: 2hju7i5ft73q$.x4md24pt913v.dlg@40tude.net

>>>>> "Dmitry" == Dmitry A Kazakov <mailbox@dmitry-kazakov.de> writes:

    >> procedure Connect(C : in out Root_Connection_Type; Same_As :
    >> Root_Connection_Type'Class) is abstract;

    Dmitry> Are you going to clone connections between different DBs?
    Dmitry> The above looks like an attempt to emulate multiple
    Dmitry> dispatch.!

I read a documentation somewhere that said the code below is not
legal, and the above had to be used instead... The documentation said
the code body could check the types were correct. However, on advice
from Dmitry, I tried a test case with the code below, and it seems to
work fine. Need to keep my eyes open for that reference. Wonder if it
was that dodgy guide on the web about Ada for C++ programmers...

    Dmitry> It should be:

    Dmitry> procedure Connect
    Dmitry> (  C : in out Root_Connection_Type;
    Dmitry> Same_As : Root_Connection_Type   -- Same types required!
    Dmitry> )  is abstract;

    Dmitry> However would be is pretty useless, when you have a
    Dmitry> class-wide object at hand.

    Dmitry> I suppose that the idea was to make a copy of a limited
    Dmitry> object. Then it should better be:

    Dmitry> function Copy (C : Root_Connection_Type)
    Dmitry> return Root_Connection_Ptr is abstract;

    Dmitry> This would allocate a copy and connect it to the same
    Dmitry> DB. Because reference counting is intended you will need
    Dmitry> dynamic allocation anyway. The user will of course do it
    Dmitry> all with handles:

I have a suspicion this would not work as Root_Connection_Type is a
limited type. Or am I yet again mistaken?

Can somebody please let me know what applications a cloning function
has? I frequently hear of such functions, but rarely (if ever) needed
to use one.
-- 
Brian May <bam@snoopy.apana.org.au>



  parent reply	other threads:[~2004-12-21 23:29 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-15 23:31 APQ Brian May
2004-12-16 11:34 ` APQ Warren W. Gay VE3WWG
2004-12-16 23:58   ` APQ Randy Brukardt
2004-12-17  3:45     ` APQ Brian May
2004-12-17  4:03       ` APQ Warren W. Gay VE3WWG
2004-12-17  4:38         ` APQ Brian May
2004-12-17  9:06           ` APQ Egil H. H�vik
2004-12-17 11:42             ` APQ Brian May
2004-12-17 22:55               ` APQ Brian May
2004-12-18 15:52                 ` APQ Warren W. Gay VE3WWG
2004-12-18 18:23                   ` APQ Dmitry A. Kazakov
2004-12-21 23:34                     ` APQ Brian May
2004-12-22  8:57                       ` APQ Dmitry A. Kazakov
2004-12-22 10:07                   ` APQ Martin Krischik
2004-12-22 13:15                     ` APQ Dmitry A. Kazakov
2004-12-22 16:53                       ` APQ Martin Krischik
2004-12-22 17:21                         ` APQ Dmitry A. Kazakov
2004-12-22 18:23                           ` APQ Martin Krischik
2004-12-17  8:59       ` APQ Stephen Leake
2004-12-17 14:12       ` APQ Dmitry A. Kazakov
2004-12-17 23:20         ` APQ Brian May
2004-12-18 16:13           ` APQ Dmitry A. Kazakov
2004-12-21 23:29         ` Brian May [this message]
2004-12-22  9:14           ` APQ Dmitry A. Kazakov
2005-01-04 21:32             ` APQ Brian May
2005-01-05 11:58               ` APQ Dmitry A. Kazakov
2004-12-23 17:04           ` APQ (Connection Cloning) Warren W. Gay VE3WWG
2004-12-23 17:55             ` Georg Bauhaus
2004-12-23 18:52               ` Warren W. Gay VE3WWG
2005-01-03  7:40                 ` Frank Piron
2004-12-17 13:54 ` APQ Dmitry A. Kazakov
  -- strict thread matches above, loose matches on Subject: below --
2004-12-16  4:37 APQ Christoph Karl Walter Grein
replies disabled

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