Rosetta 3.3
Classes | Namespaces
src/utility/factory/Factory.hh File Reference

Pluggable factory. More...

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

Classes

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

Namespaces

namespace  utility
 

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


namespace  utility::factory
 

A pluggable class factory system.



Detailed Description

Pluggable factory.

Author:
Stuart G. Mentzer (Stuart_Mentzer@objexx.com)
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
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines