|
Boost Users : |
From: Wu Yinghui, Freddie (yhwu_at_[hidden])
Date: 2006-10-25 06:06:03
Dear all,
I'm implementing a hierarchy of classes to handle different types of
objects. The characteristics of these objects are mostly similar (so I
can put them into a container that knows only about the pure abstract
base interface type), but some properties are specific to each object types.
I plan to use Boost.Parameter for its capability of providing named
parameter to these object types. However, I have one problem in this
approach: Since Boost.Parameter requires that the function processing
the ArgumentPack to be a template, I cannot make it virtual (a member
function template cannot be virtual) in my pure abstract base interface.
Furthermore, due to the lack of "virtual" member function, I cannot use
the base class pointer to provide these named parameters to some subclasses.
So my question is: Is there a way to tackle this problem? (Use
Boost.Parameter with virtual member functions? Or avoid using
Boost.Parameter, but provide a way to access subclass properties that
are not know directly via the base class?)
Any suggestion is welcomed!
Cheers,
Freddie
-- Wu Yinghui, Freddie Research & Development Senior Software Engineer Volume Interactions Pte Ltd 1 Kim Seng Promenade, #12-01 Great World City East Tower Singapore 237994 Tel: +65 62226962 (Ext 216) Fax: +65 62226215 Email: yhwu_at_[hidden] URL: http://www.volumeinteractions.com Important: This message is intended for the recipient(s) addressed above. It contains privileged and confidential information. If you are not the intended recipient, please notify the sender immediately by replying to this message and then delete it from your system. You must not read, copy, use, or disseminate this communication in any form. Thank you.
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