c++ - how to design system so users can generate their own objects using dlls -
I have a server which takes some message X and winks some messages out. Currently y is mapping right from x. Therefore x1 will always generate y1 with related fields.
But now I want to be able to configure it so that users can put their own DLL which can generate x1 to y2, y3 or they want if they do not handle it Must take a default mapping that is x1 to y1
One more thing is that most of my output messages y1, y2, y3 are already objects that are all from the base class and I want to be able to do the same thing in another way Am ... meaning y2 (incoming message) is to be converted to user x1 on the basis of DLL. Can we get it using DLL? Or is there a better way of doing this ?? Is it a design pattern (factory pattern or something) to do it properly, so that it is also flexible in the future. Thanks!
It is not very difficult, but you must provide an interface header (.h file) DLL authors You will also need to tell them which compiler to use, or use a com-friendly interface.
A quick sketch will be an interface which is provided by
- A
query type supported
function, DLL and to determine supported type Called by EXE - a
std :: auto_ptr
function. - Enter a
virtual std :: string Ybase :: serialize () const
function on the message in the text.
Comments
Post a Comment