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:

Ogre::FactoryObj< ArchiveEx > Ogre::ZipArchiveFactory List of all members.

Public Methods

virtual ArchiveExcreateObj (const String &name)=0
virtual String getType ()=0

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).


Member Function Documentation

virtual ArchiveEx* Ogre::ArchiveFactory::createObj const String   name [pure virtual]
 

Implements Ogre::FactoryObj< ArchiveEx >.

Implemented in Ogre::ZipArchiveFactory.

virtual String Ogre::ArchiveFactory::getType   [pure virtual]
 

Implements Ogre::FactoryObj< ArchiveEx >.

Implemented in Ogre::ZipArchiveFactory.

Copyright © 2002 by The OGRE Team