example of factory where derived class constructors have different signatures

Hi, How factory can be used when derived classes need constructing with different args? Could someone show an sample? Thank you, Vic

struct IFactory
{ virtual boost:: intrusive_ptr<IClass> createIClass(
const std::vectorboost::any &) const = 0;
};
or even arguments by name:
struct IFactory
{ virtual boost:: intrusive_ptr<IClass> createIClass(
const std::map

Look in the serialization library. There is a sublibrary - extended_type_info which implements this functionality. Robert Ramey Victor Whiskey Yankee wrote:
Hi,
How factory can be used when derived classes need constructing with different args?
Could someone show an sample?
Thank you, Vic
participants (3)
-
peter_foelscheļ¼ agilent.com
-
Robert Ramey
-
Victor Whiskey Yankee