Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages

SctFitter::FitStrategyFactory Class Reference

Factory allows dynamic choice of FitStrategies which can be asked for by name. More...

#include <FitStrategy.h>

Collaboration diagram for SctFitter::FitStrategyFactory:

Collaboration graph
[legend]

Public Member Functions

FitStrategygetStrategy (string name) throw (LogicError)
 Get a FitStrategy by name.

bool addToMap (const string &className, FitStrategy &s) throw ()
 Concrete strategies should add themselves to the map, using the same name as they give in getName();.

std::list< std::string > listStrategies () const
 make a list of all strategies


Static Public Member Functions

FitStrategyFactoryinstance () throw ()
 a reference to the singleton


Private Member Functions

 ~FitStrategyFactory () throw ()
 singleton


Private Attributes

std::map< string, FitStrategy * > strategyMap
 a map of the sub-classes and their names


Static Private Attributes

FitStrategyFactorybertha
 pointer to the singleton.


Detailed Description

Factory allows dynamic choice of FitStrategies which can be asked for by name.

Definition at line 75 of file FitStrategy.h.


Constructor & Destructor Documentation

SctFitter::FitStrategyFactory::~FitStrategyFactory  )  throw () [inline, private]
 

singleton

Definition at line 94 of file FitStrategy.h.


Member Function Documentation

bool SctFitter::FitStrategyFactory::addToMap const string &  className,
FitStrategy s
throw ()
 

Concrete strategies should add themselves to the map, using the same name as they give in getName();.

Definition at line 39 of file FitStrategy.cpp.

FitStrategy * SctFitter::FitStrategyFactory::getStrategy string  name  )  throw (LogicError)
 

Get a FitStrategy by name.

Definition at line 30 of file FitStrategy.cpp.

FitStrategyFactory & SctFitter::FitStrategyFactory::instance  )  throw () [static]
 

a reference to the singleton

Definition at line 25 of file FitStrategy.cpp.

std::list< std::string > SctFitter::FitStrategyFactory::listStrategies  )  const
 

make a list of all strategies

Definition at line 47 of file FitStrategy.cpp.

References strategyMap.


Field Documentation

FitStrategyFactory * SctFitter::FitStrategyFactory::bertha [static, private]
 

pointer to the singleton.

Definition at line 57 of file FitStrategy.cpp.

std::map<string, FitStrategy*> SctFitter::FitStrategyFactory::strategyMap [private]
 

a map of the sub-classes and their names

Definition at line 93 of file FitStrategy.h.

Referenced by listStrategies().


The documentation for this class was generated from the following files:
Generated on Fri Dec 16 19:44:08 2005 for SCT DAQ/DCS Software - C++ by doxygen 1.3.5