Boost logo

Boost Users :

From: vicente.botet (vicente.botet_at_[hidden])
Date: 2008-07-15 11:50:12


----- Original Message -----
From: "Hansi" <hansipet_at_[hidden]>
To: <boost-users_at_[hidden]>
Sent: Tuesday, July 15, 2008 9:24 AM
Subject: [Boost-users] Beginner design question

Hello,

I have to make a library which provides a few classes with different
implementation. This classes should have a common interface. Normally I
would use derived classes from the common interface, but this classes
should be really fast.
What is the best way to provide a common interface and to not have the
overhead of polymorphic classes?

--
Hi,
The question is if you need runtime polymorphism or static one?
If you have some performances constraints, I propose you to use static 
polymorphism as far as you can and switch to runtime polymorphism when 
statics no work any more. The Adobe Poly library helps you to make the 
switch (see http://stlab.adobe.com/wiki/images/c/c9/Boost_poly.pdf and 
http://homepages.fh-regensburg.de/~mpool/mpool07/proceedings/5.pdf)
Hopping that helps you.
Vicente 

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net