Trouble with factory pattern

From: Boogie El Aceitoso (frr149_at_telefonica.net)
Date: 10/16/03


Date: Thu, 16 Oct 2003 16:22:04 +0200

Hi,

I'd like to have a function factory that returns objects of a class hierarchy.
What's the best way to deal with the fact that different subclasses will have
different constructor arguments?

How do you keep the factory interface as clean as possible? O:-)

TIA



Relevant Pages

  • Trouble with factory pattern
    ... I'd like to have a function factory that returns objects of a class hierarchy. ... What's the best way to deal with the fact that different subclasses will have ... TIA ...
    (comp.object)
  • Trouble with factory pattern
    ... I'd like to have a function factory that returns objects of a class hierarchy. ... What's the best way to deal with the fact that different subclasses will have ... TIA ...
    (comp.lang.cpp)