Re: [Boost-users] [Boost.Parameter] How to Use Named Parameters in a Class Hierarchy?
On 10/26/06, *Wu Yinghui, Freddie*
mailto:yhwu@volumeinteractions.com> 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
participants (1)
-
Wu Yinghui, Freddie