On 10/26/06, Wu Yinghui, Freddie <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 =====
class Base
{
   //...

   // This is the function that makes use of Boost.Parameter
   template <typename ArgumentPack>
   virtual void Configure(ArgumentPack const &arguments) = 0;
};

// This class resides in Derived1.dll
class Derived1 : public Base
{
   template <typename ArgumentPack>
   void Configure(ArgumentPack const &arguments)
   {
      //...
   }
};

// This class resides in Derived2.dll
class Derived2 : public Base
{
   template <typename ArgumentPack>
   void Configure(ArgumentPack const &arguments)
   {
      //...
   }
};
===== 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 ) or something like that - not sure what the boost equivalent is.

Cheers,

Freddie


Tony