Rosetta
Classes | Namespaces
Factory.hh File Reference

Pluggable factory. More...

#include <utility/factory/Factory.fwd.hh>
#include <utility/assert.hh>
#include <map>
#include <utility>

Classes

class  utility::factory::Factory< P >
 Pluggable factory. More...
 

Namespaces

 utility
 unresizable vector whose size is known at compile time, which may be allocated on the stack, and which indexes from 0.
 
 utility::factory
 

Detailed Description

Pluggable factory.

Author
Stuart G. Mentzer (Stuar.nosp@m.t_Me.nosp@m.ntzer.nosp@m.@obj.nosp@m.exx.c.nosp@m.om)
Remarks
  • Creates objects of registered concrete products in a common hierarchy
  • Product base class must typedef some types (see Types section)
  • Use Key pointers when keys are globals that may not be constructed yet
  • Use Key functions when keys are globals that may not be constructed yet or for generic registrants
  • Supports creation functions with 0 and 1 argument(s)
  • Place static Registrant members in concrete product classes to register with Factory