Xface Core Library: XFace::InfluenceCalculatorMaker Class Reference

XFace / XEngine / XMath

XFace::InfluenceCalculatorMaker Class Reference
[XFace]

#include <InfluenceCalculatorMaker.h>

Inheritance diagram for XFace::InfluenceCalculatorMaker:

XFace::RaisedCosInfluenceSphMaker XFace::RaisedCosInfluenceWaveXMaker XFace::RaisedCosInfluenceWaveYMaker XFace::RaisedCosInfluenceWaveZMaker List of all members.

Detailed Description

Author:
Koray Balci
Version:
1.0
Date:
April 2004
Implementation of "Pluggable Factory" design pattern. This class is responsible for creation of IInfluenceCalculator derived classes. Note that it is an abstract base class, you should always derive a class and implement InfluenceCalculatorMaker::makeInfluenceCalculator function with proper return value specialization for correct IInfluenceCalculator type.

An IInfluenceCalculator derived class must always have a InfluenceCalculatorMaker derived class complementing it. XFaceEd automatically adds available IInfluenceCalculator derived classes to its influence set and exposes it to the end user. In addition, only this way the core library can use the influence calculation mechanism properly, for utilizing correct influence calculator.


Static Public Member Functions

static std::vector< std::string > getMakerList ()
static IInfluenceCalculatornewInfluenceCalculator (const std::string &, float w, unsigned short fapID)

Protected Member Functions

 InfluenceCalculatorMaker (const std::string &className)
 ctor only accessible to derived classes.
virtual IInfluenceCalculatormakeInfluenceCalculator (float w, unsigned short fapID) const =0
 Derived classes should reimplement this pure virtual.

Constructor & Destructor Documentation

XFace::InfluenceCalculatorMaker::InfluenceCalculatorMaker const std::string &  className  )  [protected]
 

Base class constructor registers the derived class identifier to its list of influencers.

Parameters:
className derived class identifier (should be unique for every influence calc.)


Member Function Documentation

std::vector< std::string > XFace::InfluenceCalculatorMaker::getMakerList  )  [static]
 

Returns the list of influence calculator makers as a vector.

Note:
Do NOT call this method frequently, every time a new vector is created and returned.

IInfluenceCalculator * XFace::InfluenceCalculatorMaker::newInfluenceCalculator const std::string &  className,
float  weight,
unsigned short  fapID
[static]
 

Clients should call this static method, to create influence calculators. It accesses the proper factory (maker) and requests a new influence calculator and returns it.

Parameters:
className derived class unique maker identifier.
weight with this weight value,
fapID and used for this FAP.


The documentation for this class was generated from the following files:
Generated on Mon Aug 28 15:39:26 2006 for Xface Core Library by  doxygen 1.4.6-NO