FalloffFactory Class Reference
[Falloff Parameterizations]

Factory class to construct falloff function calculators. More...

#include <FalloffFactory.h>

Inheritance diagram for FalloffFactory:
Inheritance graph
[legend]
Collaboration diagram for FalloffFactory:
Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual void deleteFactory ()
 Virtual abstract function that deletes the factory.
virtual ~FalloffFactory ()
 Destructor doesn't do anything.
virtual FalloffnewFalloff (int type, const vector_fp &c)
 Return a pointer to a new falloff function calculator.

Static Public Member Functions

static FalloffFactoryfactory ()
 Return a pointer to the factory.
static void deleteFactories ()
 static function that deletes all factories in the internal registry maintained in a static variable

Private Member Functions

 FalloffFactory ()
 default constructor, which is defined as private

Static Private Attributes

static FalloffFactorys_factory = 0
 Pointer to the single instance of the factory.
static boost::mutex falloff_mutex
 Mutex for use when calling the factory.

Detailed Description

Factory class to construct falloff function calculators.

The falloff factory is accessed through static method factory:

 Falloff* f = FalloffFactory::factory()->newFalloff(type, c)

Definition at line 114 of file FalloffFactory.h.


Constructor & Destructor Documentation

virtual ~FalloffFactory (  )  [inline, virtual]

Destructor doesn't do anything.

We do not delete statically created single instance of this class here, because it would create an infinite loop if destructor is called for that single instance. Instead, to delete single instance, we call delete[] from FalloffMng's destructor.

Definition at line 148 of file FalloffFactory.h.

FalloffFactory (  )  [inline, private]

default constructor, which is defined as private

Definition at line 171 of file FalloffFactory.h.


Member Function Documentation

static void deleteFactories (  )  [inline, static, inherited]

static function that deletes all factories in the internal registry maintained in a static variable

Definition at line 33 of file FactoryBase.h.

References FactoryBase::s_vFactoryRegistry.

Referenced by Cantera::appdelete().

virtual void deleteFactory (  )  [inline, virtual]

Virtual abstract function that deletes the factory.

This must be properly defined in child objects.

Implements FactoryBase.

Definition at line 131 of file FalloffFactory.h.

References FalloffFactory::falloff_mutex, and FalloffFactory::s_factory.

static FalloffFactory* factory (  )  [inline, static]

Return a pointer to the factory.

On the first call, a new instance is created. Since there is no need to instantiate more than one factory, on all subsequent calls, a pointer to the existing factory is returned.

Definition at line 123 of file FalloffFactory.h.

References FalloffFactory::falloff_mutex, and FalloffFactory::s_factory.

Falloff * newFalloff ( int  type,
const vector_fp &  c 
) [virtual]

Return a pointer to a new falloff function calculator.

Parameters:
type Integer flag specifying the type of falloff function. The standard types are defined in file reaction_defs.h. A factory class derived from FalloffFactory may define other types as well.
c input vector of doubles which populates the falloff parameterization.
Returns:
Returns a pointer to a new Falloff class.

Definition at line 713 of file FalloffFactory.cpp.

References Falloff::init().


Member Data Documentation

boost::mutex falloff_mutex [static, private]

Mutex for use when calling the factory.

Definition at line 175 of file FalloffFactory.h.

Referenced by FalloffFactory::deleteFactory(), and FalloffFactory::factory().

FalloffFactory * s_factory = 0 [static, private]

Pointer to the single instance of the factory.

Definition at line 168 of file FalloffFactory.h.

Referenced by FalloffFactory::deleteFactory(), and FalloffFactory::factory().


The documentation for this class was generated from the following files:
Generated by  doxygen 1.6.3