Doublecpp - double dispatch in C++

by Lorenzo Bettini

Doublecpp is a preprocessor for C++ that handles a new linguistic construct for defining branches of a multi-method.  The "right'' branch of such a method will be selected dynamically at run-time according to the actual type of the object on which the method is invoked and to the actual type of the first argument: double dispatch.

Doublecpp is free software; you are free to use, share and modify it under the terms of the GNU General Public License (see COPYING).

You can download Doublecpp from here:
http://sourceforge.net/projects/doublecpp

The steps to perform for the installation are standard for packages in source form: once you have unpacked the sources in a directory, `cd' to the directory containing the package's source code and execute the following steps:

./configure
make
make install
Note: unless you specify a different install directory by --prefix option of configure (e.g. ./configure --prefix=<your home>), you must be root to 'make install'.

You can also obtain the most recent sources via anonymous CVS (just hit enter when prompted for the password):

cvs -d:pserver:anonymous@doublecpp.cvs.sourceforge.net:/cvsroot/doublecpp login
 
cvs -z3 -d:pserver:anonymous@doublecpp.cvs.sourceforge.net:/cvsroot/doublecpp co -P doublecpp


If you obtain sources from CVS, before running configure, you must run the script autogen.sh; This will run the autotools commands in the correct order, and also copy possibly missing files. You should have installed recent versions of automake and autoconf in order for this to succeed. You will also need flex and bison.

You can build doublecpp also under Windows, using cygwin (http://www.cygwin.com).  If you have problems with that, you can request the windows binaries directly to me.

IMPORTANT: you have to use a 3.x version of gcc: earlier versions have problems handling code generated by doublecpp.

Documentation can be found in the included doublecpp.pdf, or can be downloaded from here:
http://prdownloads.sourceforge.net/doublecpp/doublecpp.pdf?download.

Bibliography

Translating Double-Dispatch into Single-Dispatch
Lorenzo Bettini, Sara Capecchi, Betti Venneri.
Proceedings of the Second Workshop on Object Oriented Developments (WOOD 2004). pp. 59-78. ENTCS vol. 138 no. 2. Elsevier. 2005. abstract doubledisp.pdf bibtex
Double Dispatch in C++
Lorenzo Bettini, Sara Capecchi, Betti Venneri.
Software - Practice and Experience. pp. 581 - 613. vol. 36 no. 6. 2006. abstract spelxb.ps.gz bibtex

SourceForge.net Logo