Boost logo

Boost :

From: Lassi A. Tuura (lassi.tuura_at_[hidden])
Date: 2008-01-11 10:02:44


Hi,

FWIW what's discussed here is known as multi-methods in some corners
of programming world. A multi-method with one "virtual" argument
would simply be a virtual function outside a class, which is probably
what the original poster was looking for. Some relatively dynamic
languages, e.g. clos and dylan, support multi-methods as a native
concept.

I believe there have been past discussions on multi-methods in
boost. I believe at least Jesse Jones was involved in one discussion
thread around September 2004.

I implemented multi-methods for C++ long time ago as a library.
We've used them in one data visualisation project, but not really
otherwise. See the links below for some documentation and examples.
I doubt that particular library in the form boost would like to have,
but perhaps it gives you ideas to take further. Note that the code
is GPLed.

http://cmslxr.fnal.gov/lxr/source/Iguana/Utilities/classlib/utils/
MultiMethod.h#093
http://cmslxr.fnal.gov/lxr/source/Iguana/Utilities/test/utils/
MultiMethod01.cpp
http://cmslxr.fnal.gov/lxr/source/Iguana/Utilities/test/utils/
MultiMethod02.cpp
http://cmslxr.fnal.gov/lxr/source/Iguana/Utilities/test/utils/
MultiMethod03.cpp

Lassi


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk