ModuleFactory Class Reference

A singleton factory class for creating modules. More...

#include <modules.h>

Collaboration diagram for ModuleFactory:

Collaboration graph

List of all members.

Static Public Member Functions

template<class M >
static int getModuleID ()
 Returns the ID of a module-type.
static void init ()
 Method to instantiate the singleton.
static void destroy ()
 Method to delete the singleton.
static const Moduleprototype (int id)
 Returns a reference to the module prototype with given id.
static ModulenewModule (int id, Module::CloneMethod method=Module::DeepCopy)
 Returns a new instance of the module-type with given id.
static void changeDefaultSettings (const Module &module)
 Sets appropriate prototype settings according to given module's settings.

Private Member Functions

 ModuleFactory ()
 Private constructor to avoid uncontrolled instantiation.
 ~ModuleFactory ()
 Deletes the prototypes.
void initialize ()
 The real constructing routine.

Static Private Member Functions

static void instantiateModules ()
 Never called, only exists for certain templates to be instantiated in modules.cpp.

Private Attributes

std::vector< Module * > prototypes
 Pointers to the prototypes for every module type (indexed by their ID's).

Static Private Attributes

static ModuleFactoryinstance = 0
 Static pointer to the only instance of the ModuleFactory.

Detailed Description

A singleton factory class for creating modules.

Definition at line 245 of file modules.h.

The documentation for this class was generated from the following files:

Generated on Thu Aug 6 22:33:15 2009 for Fractal Image Compressor by  doxygen 1.5.8