OgreHaptics::ForceEffectAlgorithmFactory Class Reference

Abstract class defining the interface to be implemented by creators of ForceEffectAlgorithm subclasses. More...

#include <OgreHapticsForceEffectAlgorithm.h>

List of all members.

Public Member Functions

 ForceEffectAlgorithmFactory ()
 Standard constructor.
virtual ~ForceEffectAlgorithmFactory ()
 Virtual destructor.
virtual String getName (void) const =0
 Returns the name of the factory, which is the name to identify the type of algorithm this factory creates.
virtual ForceEffectAlgorithmcreateAlgorithm (void)=0
 Creates a new force effect algorithm instance.
virtual void destroyAlgorithm (ForceEffectAlgorithm *algorithm)
 Destroys the algorithm pointed to by the parameter (for early clean up if required).

Protected Attributes

ForceEffectAlgorithmList mAlgorithms
 List of force effect algorithms created by the factory.


Detailed Description

Abstract class defining the interface to be implemented by creators of ForceEffectAlgorithm subclasses.

Remarks:
Plugins or 3rd party applications can add new types of force effect algorithms to OgreHaptics by creating subclasses of the ForceEffectAlgorithm class. Because multiple instances of these algorithms may be required, a factory class to manage the instances is also required.
ForceEffectAlgorithmFactory subclasses must allow the creation and destruction of ForceEffectAlgorithm subclasses. They must also be registered with the ForceEffectManager. All factories have a name which identifies them, examples might be 'Constant', 'Viscous', or 'Spring', and these can be also be used from force effect scripts.

Definition at line 118 of file OgreHapticsForceEffectAlgorithm.h.


Constructor & Destructor Documentation

OgreHaptics::ForceEffectAlgorithmFactory::ForceEffectAlgorithmFactory (  ) 

Standard constructor.

Definition at line 122 of file OgreHapticsForceEffectAlgorithm.h.

virtual OgreHaptics::ForceEffectAlgorithmFactory::~ForceEffectAlgorithmFactory (  )  [virtual]

Virtual destructor.


Member Function Documentation

virtual String OgreHaptics::ForceEffectAlgorithmFactory::getName ( void   )  const [pure virtual]

Returns the name of the factory, which is the name to identify the type of algorithm this factory creates.

virtual ForceEffectAlgorithm* OgreHaptics::ForceEffectAlgorithmFactory::createAlgorithm ( void   )  [pure virtual]

Creates a new force effect algorithm instance.

Remarks:
Concrete implementations must add the new instance to the std::vector mAlgorithms.

virtual void OgreHaptics::ForceEffectAlgorithmFactory::destroyAlgorithm ( ForceEffectAlgorithm algorithm  )  [virtual]

Destroys the algorithm pointed to by the parameter (for early clean up if required).


Member Data Documentation

List of force effect algorithms created by the factory.

Definition at line 146 of file OgreHapticsForceEffectAlgorithm.h.


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

Last modified Tue Jan 6 22:31:26 2009