Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

halftoner::HalftonerFactory::Repository Class Reference

List of all members.

Detailed Description

Class Repository is a wrapper on a std::map that holds Instanciators accessed by string keys.

It creates the default std::map when constructed, new algorithm can be inserted at runtime, and destroys the it at the end of its lifetime.

Definition at line 54 of file HalftonerFactory.h.

Public Methods

Instance methods

Private Methods


Private Attributes

Instance variable

Constructor & Destructor Documentation

halftoner::HalftonerFactory::Repository::Repository   throw ()


figure out why calling methods, such as add() in the constructor do not work.

Definition at line 48 of file HalftonerFactory.cxx.

halftoner::HalftonerFactory::Repository::~Repository   throw ()


Definition at line 107 of file HalftonerFactory.cxx.

Member Function Documentation

void halftoner::HalftonerFactory::Repository::add const char *    name,
const Instanciator   instanciator
throw (std::invalid_argument)

Adds a new algorithm at runtime.

name  the name of the new algorithm, it must be unique.
instanciator  the object creating new instance of the algorithm.
std::invalid_argument  if an algorithm with the same name has already been added.

Definition at line 140 of file HalftonerFactory.cxx.

Referenced by halftoner::HalftonerFactory::addHalftoner().

const Instanciator * halftoner::HalftonerFactory::Repository::get const char *    key throw ()

Returns the requested Instanciator.

key  the key attached to the algorithm.
Returns :
an Instanciator capable of instanciating a new algorithm object, 0 if the key does not map.

Definition at line 160 of file HalftonerFactory.cxx.

Referenced by halftoner::HalftonerFactory::getInstance().

std::map< const char *, const Instanciator * > & halftoner::HalftonerFactory::Repository::getMap   throw () [private]

Gets the map.

Returns :
the underlying map.

Definition at line 130 of file HalftonerFactory.cxx.

Member Data Documentation

std::map<const char*, const Instanciator*> halftoner::HalftonerFactory::Repository::depot [private]

The map holding Instanciators.

Definition at line 60 of file HalftonerFactory.h.

The documentation for this class was generated from the following files:
Generated on Sat Sep 7 16:35:51 2002 for Halftoning Library by doxygen1.2.17