comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Multiple dispatch
Date: Sat, 11 Jun 2011 13:52:05 +0200
Date: 2011-06-11T13:52:05+02:00	[thread overview]
Message-ID: <7loar137gjid$.qrn6ghii6ee$.dlg@40tude.net> (raw)
In-Reply-To: op.vwwpcjicule2fv@douda-yannick

On Sat, 11 Jun 2011 12:13:21 +0200, Yannick Duchêne (Hibou57) wrote:

> This would end into…
> 
> Steps for the serialization of an object to a container :
> 
> 1) Determine the object serialization method to use depending on its type.
> 2) The object is composed of properties of types Property_1_Type,  
> Property_2_Type, and so on.
> 3) The containers provides methods Serialize_Property_Type_1,  
> Serialize_Property_Type_2, and so on.
> 4) The object's serialization method invokes these container's methods,  
> via dispatching calls.
> 
> Seems OK ?

Yes, that looks like the usual pattern for protocols and similar stuff,
when objects do not depend on the containers. The opposite case is
represented by drivers, when objects are maintained by the driver, you
might first dispatch on the driver type and then on the type of its
objects.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



  reply	other threads:[~2011-06-11 11:52 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-11 10:13 Multiple dispatch Yannick Duchêne (Hibou57)
2011-06-11 11:52 ` Dmitry A. Kazakov [this message]
2011-06-11 13:19   ` Yannick Duchêne (Hibou57)
2011-06-11 13:57     ` Dmitry A. Kazakov
2011-06-11 18:42       ` Emmanuel Briot
2011-06-11 19:12         ` Dmitry A. Kazakov
2011-06-15 10:30       ` Natasha Kerensikova
2011-06-15 11:10         ` Yannick Duchêne (Hibou57)
2011-06-15 11:19           ` Yannick Duchêne (Hibou57)
2011-06-15 14:59         ` Georg Bauhaus
2011-06-15 15:18           ` Yannick Duchêne (Hibou57)
2011-06-15 16:21             ` Georg Bauhaus
2011-06-12  5:13 ` 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