\hypertarget{class_ogre_1_1_archive_factory}{}\doxysection{Ogre\+::Archive\+Factory Class Reference}
\label{class_ogre_1_1_archive_factory}\index{Ogre::ArchiveFactory@{Ogre::ArchiveFactory}}


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




{\ttfamily \#include $<$Ogre\+Archive\+Factory.\+h$>$}



Inheritance diagram for Ogre\+::Archive\+Factory\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{class_ogre_1_1_archive_factory__inherit__graph}
\end{center}
\end{figure}
\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
virtual \mbox{\hyperlink{class_ogre_1_1_archive_factory_ad9799ad36b5e40eda7e755e13ec3ee06}{$\sim$\+Archive\+Factory}} ()
\item 
virtual \mbox{\hyperlink{class_ogre_1_1_archive}{Archive}} $\ast$ \mbox{\hyperlink{class_ogre_1_1_archive_factory_a29c98713d1e9463bc3ab19d17be5635c}{create\+Instance}} (const \mbox{\hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String}} \&name) \mbox{\hyperlink{_ogre_platform_8h_a11162eebee0099930c48076229cc6f04}{O\+G\+R\+E\+\_\+\+N\+O\+D\+I\+S\+C\+A\+RD}}
\begin{DoxyCompactList}\small\item\em Creates a new object. \end{DoxyCompactList}\item 
virtual \mbox{\hyperlink{class_ogre_1_1_archive}{Archive}} $\ast$ \mbox{\hyperlink{class_ogre_1_1_archive_factory_ac066010038914bc460a192d7d1ce9ce3}{create\+Instance}} (const \mbox{\hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String}} \&name, bool read\+Only) \mbox{\hyperlink{_ogre_platform_8h_a11162eebee0099930c48076229cc6f04}{O\+G\+R\+E\+\_\+\+N\+O\+D\+I\+S\+C\+A\+RD}}=0
\begin{DoxyCompactList}\small\item\em Creates a new object. \end{DoxyCompactList}\item 
virtual void \mbox{\hyperlink{class_ogre_1_1_factory_obj_adb934021afa323e7867bd3b52dffe1cc}{destroy\+Instance}} (\mbox{\hyperlink{class_ogre_1_1_archive}{Archive}} $\ast$ptr)=0
\begin{DoxyCompactList}\small\item\em Destroys an object which was created by this factory. \end{DoxyCompactList}\item 
virtual const \mbox{\hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String}} \& \mbox{\hyperlink{class_ogre_1_1_factory_obj_a3d8aef92fb9e0eac7ed41167fb686a10}{get\+Type}} () const=0
\begin{DoxyCompactList}\small\item\em Returns the factory type. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Abstract factory class, archive codec plugins can register concrete subclasses of this. 

\begin{DoxyRemark}{Remarks}
All access to \textquotesingle{}archives\textquotesingle{} (collections of files, compressed or just folders, maybe even remote) is managed via the abstract \mbox{\hyperlink{class_ogre_1_1_archive}{Archive}} class. Plugins are expected to provide the implementation for the actual codec itself, but because a subclass of \mbox{\hyperlink{class_ogre_1_1_archive}{Archive}} has to be created for every archive, a factory class is required to create the appropriate subclass. 
\end{DoxyRemark}
\begin{DoxyParagraph}{}
So archive plugins create a subclass of \mbox{\hyperlink{class_ogre_1_1_archive}{Archive}} A\+ND a subclass of \mbox{\hyperlink{class_ogre_1_1_archive_factory}{Archive\+Factory}} which creates instances of the \mbox{\hyperlink{class_ogre_1_1_archive}{Archive}} subclass. See the \textquotesingle{}Zip\textquotesingle{} and \textquotesingle{}File\+System\textquotesingle{} plugins for examples. Each \mbox{\hyperlink{class_ogre_1_1_archive}{Archive}} and \mbox{\hyperlink{class_ogre_1_1_archive_factory}{Archive\+Factory}} subclass pair deal with a single archive type (identified by a string). 
\end{DoxyParagraph}


\doxysubsection{Constructor \& Destructor Documentation}
\mbox{\Hypertarget{class_ogre_1_1_archive_factory_ad9799ad36b5e40eda7e755e13ec3ee06}\label{class_ogre_1_1_archive_factory_ad9799ad36b5e40eda7e755e13ec3ee06}} 
\index{Ogre::ArchiveFactory@{Ogre::ArchiveFactory}!````~ArchiveFactory@{$\sim$ArchiveFactory}}
\index{````~ArchiveFactory@{$\sim$ArchiveFactory}!Ogre::ArchiveFactory@{Ogre::ArchiveFactory}}
\doxysubsubsection{\texorpdfstring{$\sim$ArchiveFactory()}{~ArchiveFactory()}}
{\footnotesize\ttfamily virtual Ogre\+::\+Archive\+Factory\+::$\sim$\+Archive\+Factory (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}



\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{class_ogre_1_1_archive_factory_ac066010038914bc460a192d7d1ce9ce3}\label{class_ogre_1_1_archive_factory_ac066010038914bc460a192d7d1ce9ce3}} 
\index{Ogre::ArchiveFactory@{Ogre::ArchiveFactory}!createInstance@{createInstance}}
\index{createInstance@{createInstance}!Ogre::ArchiveFactory@{Ogre::ArchiveFactory}}
\doxysubsubsection{\texorpdfstring{createInstance()}{createInstance()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily virtual \mbox{\hyperlink{class_ogre_1_1_archive}{Archive}}$\ast$ Ogre\+::\+Archive\+Factory\+::create\+Instance (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String}} \&}]{name,  }\item[{bool}]{read\+Only }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Creates a new object. 


\begin{DoxyParams}{Parameters}
{\em name} & Name of the object to create \\
\hline
{\em read\+Only} & whether the \mbox{\hyperlink{class_ogre_1_1_archive}{Archive}} is read only \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
An object created by the factory. The type of the object depends on the factory. 
\end{DoxyReturn}


Implemented in \mbox{\hyperlink{class_ogre_1_1_a_p_k_file_system_archive_factory_adb0ee59458754e564ec38d868fe2982f}{Ogre\+::\+A\+P\+K\+File\+System\+Archive\+Factory}}, \mbox{\hyperlink{class_ogre_1_1_embedded_zip_archive_factory_aaae296fd892af01d1505ba36bedb0848}{Ogre\+::\+Embedded\+Zip\+Archive\+Factory}}, \mbox{\hyperlink{class_ogre_1_1_zip_archive_factory_a51a7ddb1aefbe955cfc3aa466549876c}{Ogre\+::\+Zip\+Archive\+Factory}}, and \mbox{\hyperlink{class_ogre_1_1_file_system_archive_factory_abf77dd8271bb5c237ef56f888f666e34}{Ogre\+::\+File\+System\+Archive\+Factory}}.

\mbox{\Hypertarget{class_ogre_1_1_archive_factory_a29c98713d1e9463bc3ab19d17be5635c}\label{class_ogre_1_1_archive_factory_a29c98713d1e9463bc3ab19d17be5635c}} 
\index{Ogre::ArchiveFactory@{Ogre::ArchiveFactory}!createInstance@{createInstance}}
\index{createInstance@{createInstance}!Ogre::ArchiveFactory@{Ogre::ArchiveFactory}}
\doxysubsubsection{\texorpdfstring{createInstance()}{createInstance()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily virtual \mbox{\hyperlink{class_ogre_1_1_archive}{Archive}}$\ast$ Ogre\+::\+Archive\+Factory\+::create\+Instance (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String}} \&}]{name }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}



Creates a new object. 


\begin{DoxyParams}{Parameters}
{\em name} & Name of the object to create \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
An object created by the factory. The type of the object depends on the factory. 
\end{DoxyReturn}


Implements \mbox{\hyperlink{class_ogre_1_1_factory_obj_a0a4a382d89b01a0c24e27b02af71153a}{Ogre\+::\+Factory\+Obj$<$ Archive $>$}}.



References create\+Instance().



Referenced by create\+Instance().

\mbox{\Hypertarget{class_ogre_1_1_factory_obj_a3d8aef92fb9e0eac7ed41167fb686a10}\label{class_ogre_1_1_factory_obj_a3d8aef92fb9e0eac7ed41167fb686a10}} 
\index{Ogre::ArchiveFactory@{Ogre::ArchiveFactory}!getType@{getType}}
\index{getType@{getType}!Ogre::ArchiveFactory@{Ogre::ArchiveFactory}}
\doxysubsubsection{\texorpdfstring{getType()}{getType()}}
{\footnotesize\ttfamily virtual const \mbox{\hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String}}\& \mbox{\hyperlink{class_ogre_1_1_factory_obj}{Ogre\+::\+Factory\+Obj}}$<$ \mbox{\hyperlink{class_ogre_1_1_archive}{Archive}}  $>$\+::get\+Type (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [pure virtual]}, {\ttfamily [inherited]}}



Returns the factory type. 

\begin{DoxyReturn}{Returns}
The factory type. 
\end{DoxyReturn}


Implemented in \mbox{\hyperlink{class_ogre_1_1_a_p_k_file_system_archive_factory_a9654b843fa2ea996172993c389ce6f3a}{Ogre\+::\+A\+P\+K\+File\+System\+Archive\+Factory}}, \mbox{\hyperlink{class_ogre_1_1_embedded_zip_archive_factory_aad4203d69a8382413bd74530318edee3}{Ogre\+::\+Embedded\+Zip\+Archive\+Factory}}, \mbox{\hyperlink{class_ogre_1_1_zip_archive_factory_a41f9f9e4204c07c26d4d685d1d41a18c}{Ogre\+::\+Zip\+Archive\+Factory}}, and \mbox{\hyperlink{class_ogre_1_1_file_system_archive_factory_a0aa13f124f25755334dcc35a28076ce1}{Ogre\+::\+File\+System\+Archive\+Factory}}.

\mbox{\Hypertarget{class_ogre_1_1_factory_obj_adb934021afa323e7867bd3b52dffe1cc}\label{class_ogre_1_1_factory_obj_adb934021afa323e7867bd3b52dffe1cc}} 
\index{Ogre::ArchiveFactory@{Ogre::ArchiveFactory}!destroyInstance@{destroyInstance}}
\index{destroyInstance@{destroyInstance}!Ogre::ArchiveFactory@{Ogre::ArchiveFactory}}
\doxysubsubsection{\texorpdfstring{destroyInstance()}{destroyInstance()}}
{\footnotesize\ttfamily virtual void \mbox{\hyperlink{class_ogre_1_1_factory_obj}{Ogre\+::\+Factory\+Obj}}$<$ \mbox{\hyperlink{class_ogre_1_1_archive}{Archive}}  $>$\+::destroy\+Instance (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{class_ogre_1_1_archive}{Archive}}  $\ast$}]{ptr }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}, {\ttfamily [inherited]}}



Destroys an object which was created by this factory. 


\begin{DoxyParams}{Parameters}
{\em ptr} & Pointer to the object to destroy \\
\hline
\end{DoxyParams}


Implemented in \mbox{\hyperlink{class_ogre_1_1_a_p_k_file_system_archive_factory_ab0ebdeda7a7d199507fb11d3ca191d71}{Ogre\+::\+A\+P\+K\+File\+System\+Archive\+Factory}}, \mbox{\hyperlink{class_ogre_1_1_zip_archive_factory_a84f0bbc7ca53b6e525a9a774a03341fe}{Ogre\+::\+Zip\+Archive\+Factory}}, and \mbox{\hyperlink{class_ogre_1_1_file_system_archive_factory_a1eb9e2ef1abd9aa441091438c44daef4}{Ogre\+::\+File\+System\+Archive\+Factory}}.



The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{_ogre_archive_factory_8h}{Ogre\+Archive\+Factory.\+h}}\end{DoxyCompactItemize}
