Loading...
Searching...
No Matches
Ogre::FactoryObj< T > Class Template Referenceabstract
Core » General

Abstract factory class. More...

`#include <OgreFactoryObj.h>`

## Public Member Functions

virtual | ~FactoryObj ()
virtual T * | createInstance (const String &name)=0
| Creates a new object.
virtual void | destroyInstance (T *ptr)
| Destroys an object which was created by this factory.
virtual const String & | getType () const =0
| Returns the factory type.

## Detailed Description

template<typename T>
class Ogre::FactoryObj< T >

Abstract factory class.

Does nothing by itself, but derived classes can add functionality.

## Constructor & Destructor Documentation

## ~FactoryObj()

template<typename T>

virtual Ogre::FactoryObj< T >::~FactoryObj | ( |  | ) |

inline virtual

## Member Function Documentation

## getType()

template<typename T>

virtual const String & Ogre::FactoryObj< T >::getType | ( |  | ) | const

pure virtual

Returns the factory type.

Returns
  The factory type.

Implemented in Ogre::APKFileSystemArchiveFactory, Ogre::BillboardParticleRendererFactory, Ogre::EmbeddedZipArchiveFactory, Ogre::FileSystemArchiveFactory, and Ogre::ZipArchiveFactory.

## createInstance()

template<typename T>

virtual T * Ogre::FactoryObj< T >::createInstance | ( | const String & | name | ) |

pure virtual

Creates a new object.

Parameters

  name | Name of the object to create

Returns
  An object created by the factory. The type of the object depends on the factory.

Implemented in Ogre::ArchiveFactory, and Ogre::BillboardParticleRendererFactory.

## destroyInstance()

template<typename T>

virtual void Ogre::FactoryObj< T >::destroyInstance | ( | T * | ptr | ) |

inline virtual

Destroys an object which was created by this factory.

Parameters

  ptr | Pointer to the object to destroy

Reimplemented in Ogre::EmbeddedZipArchiveFactory.

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

- OgreFactoryObj.h