<html> <head> <title>Ogre::ArchiveFactory class Reference - OGRE Documentation</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link type="text/css" rel="stylesheet" href="style.css"> </head> <body> <!-- Generated by Doxygen 1.3.6 --> <div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html">Class Members</a> | <a class="qindex" href="globals.html">File Members</a> | <a class="qindex" href="pages.html">Related Pages</a></div> <h1>Ogre::ArchiveFactory Class Reference</h1>Abstract factory class, archive codec plugins can register concrete subclasses of this. <a href="#_details">More...</a> <p> <code>#include <<a class="el" href="OgreArchiveFactory_8h-source.html">OgreArchiveFactory.h</a>></code> <p> Inheritance diagram for Ogre::ArchiveFactory:<p><center><img src="classOgre_1_1ArchiveFactory__inherit__graph.png" border="0" usemap="#Ogre_1_1ArchiveFactory__inherit__map" alt="Inheritance graph"></center> <map name="Ogre_1_1ArchiveFactory__inherit__map"> <area href="classOgre_1_1FileSystemArchiveFactory.html" shape="rect" coords="7,156,209,174" alt=""> <area href="classOgre_1_1ZipArchiveFactory.html" shape="rect" coords="233,156,391,174" alt=""> <area href="classOgre_1_1FactoryObj.html" shape="rect" coords="119,17,300,36" alt=""> </map> <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="classOgre_1_1ArchiveFactory-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0> <tr><td></td></tr> <tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top>virtual const <a class="el" href="namespaceOgre.html#a426">String</a> & </td><td class="memItemRight" valign=bottom><a class="el" href="classOgre_1_1FactoryObj.html#Ogre_1_1FactoryObja1">getType</a> () const =0</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the factory type. <a href="#Ogre_1_1FactoryObja1"></a><br><br></td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top>virtual <a class="el" href="classOgre_1_1Archive.html">Archive</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="classOgre_1_1FactoryObj.html#Ogre_1_1FactoryObja2">createInstance</a> (const <a class="el" href="namespaceOgre.html#a426">String</a> &name)=0</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Creates a new object. <a href="#Ogre_1_1FactoryObja2"></a><br><br></td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void </td><td class="memItemRight" valign=bottom><a class="el" href="classOgre_1_1FactoryObj.html#Ogre_1_1FactoryObja3">destroyInstance</a> (<a class="el" href="classOgre_1_1Archive.html">Archive</a> *)=0</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Destroys an object which was created by this factory. <a href="#Ogre_1_1FactoryObja3"></a><br><br></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> Abstract factory class, archive codec plugins can register concrete subclasses of this. <p> <dl compact><dt><b>Remarks:</b></dt><dd>All access to 'archives' (collections of files, compressed or just folders, maybe even remote) is managed via the abstract <a class="el" href="classOgre_1_1Archive.html">Archive</a> class. Plugins are expected to provide the implementation for the actual codec itself, but because a subclass of <a class="el" href="classOgre_1_1Archive.html">Archive</a> has to be created for every archive, a factory class is required to create the appropriate subclass. </dd></dl> <dl compact><dt><b></b></dt><dd>So archive plugins create a subclass of <a class="el" href="classOgre_1_1Archive.html">Archive</a> AND a subclass of <a class="el" href="classOgre_1_1ArchiveFactory.html">ArchiveFactory</a> which creates instances of the <a class="el" href="classOgre_1_1Archive.html">Archive</a> subclass. See the 'Zip' and 'FileSystem' plugins for examples. Each <a class="el" href="classOgre_1_1Archive.html">Archive</a> and <a class="el" href="classOgre_1_1ArchiveFactory.html">ArchiveFactory</a> subclass pair deal with a single archive type (identified by a string). </dd></dl> <p> <p> Definition at line <a class="el" href="OgreArchiveFactory_8h-source.html#l00050">50</a> of file <a class="el" href="OgreArchiveFactory_8h-source.html">OgreArchiveFactory.h</a>.<hr><h2>Member Function Documentation</h2> <a class="anchor" name="Ogre_1_1FactoryObja2" doxytag="Ogre::ArchiveFactory::createInstance" ></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> virtual <a class="el" href="classOgre_1_1Archive.html">Archive</a> * <a class="el" href="classOgre_1_1FactoryObj.html">Ogre::FactoryObj</a>< <a class="el" href="classOgre_1_1Archive.html">Archive</a> >::createInstance </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="el" href="namespaceOgre.html#a426">String</a> & </td> <td class="mdname1" valign="top" nowrap> <em>name</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [pure virtual, inherited]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Creates a new object. <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign=top><em>name</em> </td><td>Name of the object to create </td></tr> </table> </dl> <dl compact><dt><b>Returns:</b></dt><dd>An object created by the factory. The type of the object depends on the factory. </dd></dl> <p> Implemented in <a class="el" href="classOgre_1_1FileSystemArchiveFactory.html#Ogre_1_1FileSystemArchiveFactorya2">Ogre::FileSystemArchiveFactory</a>, and <a class="el" href="classOgre_1_1ZipArchiveFactory.html#Ogre_1_1ZipArchiveFactorya2">Ogre::ZipArchiveFactory</a>. </td> </tr> </table> <a class="anchor" name="Ogre_1_1FactoryObja3" doxytag="Ogre::ArchiveFactory::destroyInstance" ></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> virtual void <a class="el" href="classOgre_1_1FactoryObj.html">Ogre::FactoryObj</a>< <a class="el" href="classOgre_1_1Archive.html">Archive</a> >::destroyInstance </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="classOgre_1_1Archive.html">Archive</a> * </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [pure virtual, inherited]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Destroys an object which was created by this factory. <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign=top><em>ptr</em> </td><td>Pointer to the object to destroy </td></tr> </table> </dl> <p> Implemented in <a class="el" href="classOgre_1_1FileSystemArchiveFactory.html#Ogre_1_1FileSystemArchiveFactorya3">Ogre::FileSystemArchiveFactory</a>, and <a class="el" href="classOgre_1_1ZipArchiveFactory.html#Ogre_1_1ZipArchiveFactorya3">Ogre::ZipArchiveFactory</a>. </td> </tr> </table> <a class="anchor" name="Ogre_1_1FactoryObja1" doxytag="Ogre::ArchiveFactory::getType" ></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> virtual const <a class="el" href="namespaceOgre.html#a426">String</a>& <a class="el" href="classOgre_1_1FactoryObj.html">Ogre::FactoryObj</a>< <a class="el" href="classOgre_1_1Archive.html">Archive</a> >::getType </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">void </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap> const<code> [pure virtual, inherited]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Returns the factory type. <p> <dl compact><dt><b>Returns:</b></dt><dd>The factory type. </dd></dl> <p> Implemented in <a class="el" href="classOgre_1_1FileSystemArchiveFactory.html#Ogre_1_1FileSystemArchiveFactorya1">Ogre::FileSystemArchiveFactory</a>, and <a class="el" href="classOgre_1_1ZipArchiveFactory.html#Ogre_1_1ZipArchiveFactorya1">Ogre::ZipArchiveFactory</a>. </td> </tr> </table> <hr>The documentation for this class was generated from the following file:<ul> <li><a class="el" href="OgreArchiveFactory_8h-source.html">OgreArchiveFactory.h</a></ul> <p> Copyright © 2000-2005 by The OGRE Team<br /> Last modified Wed Feb 23 00:19:27 2005 </p> </body> </html>