Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages

# Ogre::ArchiveFactory Class Reference

Abstract factory class, archive codec plugins can register concrete subclasses of this. More...

`#include <OgreArchiveFactory.h>`

Inheritance diagram for Ogre::ArchiveFactory:

[legend]
List of all members.

## Public Methods

virtual ArchiveEx * | createObj (const String &name)=0
| 'Produces' a new object.
virtual String | getType () const=0
| Returns the factory type.

## Detailed Description

Abstract factory class, archive codec plugins can register concrete subclasses of this.

Remarks:
  All access to 'archives' (collections of files, compressed or just folders, maybe even remote) is managed via the abstract ArchiveEx class. Plugins are expected to provide the implementation for the actual codec itself, but because a subclass of ArchiveEx has to be created for every archive, a factory class is required to create the appropriate subclass.

  So archive plugins create a subclass of ArchiveEx AND a subclass of ArchiveFactory which creates instances of the ArchiveEx subclass. See the 'Zip' and 'FileSystem' plugins for examples. Each ArchiveEx and ArchiveFactory subclass pair deal with a single archive type (identified by a string).

Definition at line 50 of file OgreArchiveFactory.h.

## Member Function Documentation

virtual ArchiveEx* Ogre::ArchiveFactory::createObj | ( | const String & | name | ) | `[pure virtual]`

'Produces' 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.

Implements Ogre::FactoryObj< ArchiveEx >.

Implemented in Ogre::ZipArchiveFactory.

virtual String Ogre::ArchiveFactory::getType | ( |  | ) | const`[pure virtual]`

Returns the factory type.

Returns:
  The factory type.

Implements Ogre::FactoryObj< ArchiveEx >.

Implemented in Ogre::ZipArchiveFactory.

Referenced by Ogre::ArchiveManager::addArchiveFactory().

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

- OgreArchiveFactory.h

Copyright © 2002-2003 by The OGRE Team
Last modified Sun Nov 28 19:50:47 2004