Boost logo

Boost Users :

From: Wu Yinghui, Freddie (yhwu_at_[hidden])
Date: 2006-10-29 21:30:30


> On 10/26/06, *Wu Yinghui, Freddie* <yhwu_at_[hidden]
> <mailto:yhwu_at_[hidden]>> wrote:
>
>
> My situation is like this:
>
> I have a class hierarchy briefly shown as below (assuming virtual member
> function template is allowed, just to demonstrate the idea):
> ===== CODE =====
<snip>
> ===== CODE =====
>
> To use the class hierarchy, my program loads the DLL requested by user
> using LoadLibrary() (We're using Windows, but it should be similar to
> Linux, I suppose), and makes use of the Derived1/Derived2 classes via a
> pointer to the Base class.
>
> Since I have no information about the derived classes when building my
> main executable (only Base class is known then), I cannot make direct
> use of Derived1/Derived2 types in my main program. -- Yet, I need a way
> to provide some arbitrary set of arguments to the derived classes.
>
> Hope my explanation clears your doubts. Do you have any suggestion or
> alternative design in mind?
>
>
> Pass your params packaged in a adobe::dictionary_t (opensource.adobe.com
> <http://opensource.adobe.com>) or something like that - not sure what
> the boost equivalent is.
>
> Tony

Thanks Tony. Due to our development policy, however, I cannot easily
introduce the libraries from Adobe. :(

But looking at the reference for adobe::dictionary_t, however, makes me
believe that I can replace it with std::map<std::string, boost::any> to
certain extent.

In any case, I've been trying to build something that use
Boost.Parameter naturally (as named parameters to a function). I'll
consider if the alternative approach can satisfy all our requirements first.

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