From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,57c2a52b53b360c2 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Path: g2news1.google.com!news2.google.com!news.glorb.com!feeder.erje.net!feeder.news-service.com!94.75.214.39.MISMATCH!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Multiple dispatch Date: Sat, 11 Jun 2011 13:52:05 +0200 Organization: cbb software GmbH Message-ID: <7loar137gjid$.qrn6ghii6ee$.dlg@40tude.net> References: Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: FbOMkhMtVLVmu7IwBnt1tw.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: g2news1.google.com comp.lang.ada:19744 Date: 2011-06-11T13:52:05+02:00 List-Id: 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