Boost logo

Boost Users :

Subject: Re: [Boost-users] Abstract factory
From: Jason Felice (jfelice_at_[hidden])
Date: 2008-12-13 10:03:18


Michiel Helvensteijn wrote:
>
> Why would you need a library solution to implement an abstract factory? The
> class structure of the AF pattern is highly dependent on your needs, but is
> rather simple to write. I can't think of any library solution that would
> make the job easier.

I don't have it in front of me, but in essence, "Modern C++ Design"
describes:

(1) a template that, when instantiated with a type list, provides a class
    with separate pure virtual methods for instantiating each type in the
    type list
(2) another template that provides a concrete implementation of (1) based
    on another type list

  (Note that the types in (2) are derived from the types in (1). The types
  in (1) are normally just abstract).

While it's not hard to code by hand, it is a lot of hand-written,
repetitive code. All of the dull, mind-numbing sort.

> Can you explain what it is you are looking for?

I don't have a particular problem to solve at the moment, I'm just a
chronic self-study. It's a class of problem I've worked with before.




Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net