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


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}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
virtual \hyperlink{class_ogre_1_1_archive_factory_ad9799ad36b5e40eda7e755e13ec3ee06}{$\sim$\+Archive\+Factory} ()
\item 
virtual \hyperlink{class_ogre_1_1_archive}{Archive} $\ast$ \hyperlink{class_ogre_1_1_archive_factory_ac066010038914bc460a192d7d1ce9ce3}{create\+Instance} (const \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String} \&name, bool read\+Only) \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 \hyperlink{class_ogre_1_1_archive}{Archive} $\ast$ \hyperlink{class_ogre_1_1_archive_factory_a29c98713d1e9463bc3ab19d17be5635c}{create\+Instance} (const \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String} \&name) \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 void \hyperlink{class_ogre_1_1_factory_obj_adb934021afa323e7867bd3b52dffe1cc}{destroy\+Instance} (\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 \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String} \& \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}


\subsection{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 \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 \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 \hyperlink{class_ogre_1_1_archive}{Archive} A\+ND a subclass of \hyperlink{class_ogre_1_1_archive_factory}{Archive\+Factory} which creates instances of the \hyperlink{class_ogre_1_1_archive}{Archive} subclass. See the \textquotesingle{}Zip\textquotesingle{} and \textquotesingle{}File\+System\textquotesingle{} plugins for examples. Each \hyperlink{class_ogre_1_1_archive}{Archive} and \hyperlink{class_ogre_1_1_archive_factory}{Archive\+Factory} subclass pair deal with a single archive type (identified by a string). 
\end{DoxyParagraph}


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



References O\+G\+R\+E\+\_\+\+N\+O\+D\+I\+S\+C\+A\+RD.



\subsection{Member Function Documentation}
\mbox{\Hypertarget{class_ogre_1_1_archive_factory_ac066010038914bc460a192d7d1ce9ce3}\label{class_ogre_1_1_archive_factory_ac066010038914bc460a192d7d1ce9ce3}} 
\index{Ogre\+::\+Archive\+Factory@{Ogre\+::\+Archive\+Factory}!create\+Instance@{create\+Instance}}
\index{create\+Instance@{create\+Instance}!Ogre\+::\+Archive\+Factory@{Ogre\+::\+Archive\+Factory}}
\subsubsection{\texorpdfstring{create\+Instance()}{createInstance()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily virtual \hyperlink{class_ogre_1_1_archive}{Archive}$\ast$ Ogre\+::\+Archive\+Factory\+::create\+Instance (\begin{DoxyParamCaption}\item[{const \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 \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 \hyperlink{class_ogre_1_1_a_p_k_file_system_archive_factory_adb0ee59458754e564ec38d868fe2982f}{Ogre\+::\+A\+P\+K\+File\+System\+Archive\+Factory}, \hyperlink{class_ogre_1_1_embedded_zip_archive_factory_aaae296fd892af01d1505ba36bedb0848}{Ogre\+::\+Embedded\+Zip\+Archive\+Factory}, \hyperlink{class_ogre_1_1_zip_archive_factory_a51a7ddb1aefbe955cfc3aa466549876c}{Ogre\+::\+Zip\+Archive\+Factory}, and \hyperlink{class_ogre_1_1_file_system_archive_factory_abf77dd8271bb5c237ef56f888f666e34}{Ogre\+::\+File\+System\+Archive\+Factory}.



Referenced by Ogre\+::\+Zip\+Archive\+Factory\+::$\sim$\+Zip\+Archive\+Factory().

\mbox{\Hypertarget{class_ogre_1_1_archive_factory_a29c98713d1e9463bc3ab19d17be5635c}\label{class_ogre_1_1_archive_factory_a29c98713d1e9463bc3ab19d17be5635c}} 
\index{Ogre\+::\+Archive\+Factory@{Ogre\+::\+Archive\+Factory}!create\+Instance@{create\+Instance}}
\index{create\+Instance@{create\+Instance}!Ogre\+::\+Archive\+Factory@{Ogre\+::\+Archive\+Factory}}
\subsubsection{\texorpdfstring{create\+Instance()}{createInstance()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily virtual \hyperlink{class_ogre_1_1_archive}{Archive}$\ast$ Ogre\+::\+Archive\+Factory\+::create\+Instance (\begin{DoxyParamCaption}\item[{const \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 \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\+::\+Archive\+Factory@{Ogre\+::\+Archive\+Factory}!get\+Type@{get\+Type}}
\index{get\+Type@{get\+Type}!Ogre\+::\+Archive\+Factory@{Ogre\+::\+Archive\+Factory}}
\subsubsection{\texorpdfstring{get\+Type()}{getType()}}
{\footnotesize\ttfamily virtual const \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String}\& \hyperlink{class_ogre_1_1_factory_obj}{Ogre\+::\+Factory\+Obj}$<$ \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 \hyperlink{class_ogre_1_1_a_p_k_file_system_archive_factory_a9654b843fa2ea996172993c389ce6f3a}{Ogre\+::\+A\+P\+K\+File\+System\+Archive\+Factory}, \hyperlink{class_ogre_1_1_embedded_zip_archive_factory_aad4203d69a8382413bd74530318edee3}{Ogre\+::\+Embedded\+Zip\+Archive\+Factory}, \hyperlink{class_ogre_1_1_zip_archive_factory_a41f9f9e4204c07c26d4d685d1d41a18c}{Ogre\+::\+Zip\+Archive\+Factory}, and \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\+::\+Archive\+Factory@{Ogre\+::\+Archive\+Factory}!destroy\+Instance@{destroy\+Instance}}
\index{destroy\+Instance@{destroy\+Instance}!Ogre\+::\+Archive\+Factory@{Ogre\+::\+Archive\+Factory}}
\subsubsection{\texorpdfstring{destroy\+Instance()}{destroyInstance()}}
{\footnotesize\ttfamily virtual void \hyperlink{class_ogre_1_1_factory_obj}{Ogre\+::\+Factory\+Obj}$<$ \hyperlink{class_ogre_1_1_archive}{Archive}  $>$\+::destroy\+Instance (\begin{DoxyParamCaption}\item[{\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 \hyperlink{class_ogre_1_1_a_p_k_file_system_archive_factory_ab0ebdeda7a7d199507fb11d3ca191d71}{Ogre\+::\+A\+P\+K\+File\+System\+Archive\+Factory}, \hyperlink{class_ogre_1_1_zip_archive_factory_a84f0bbc7ca53b6e525a9a774a03341fe}{Ogre\+::\+Zip\+Archive\+Factory}, and \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 
\hyperlink{_ogre_archive_factory_8h}{Ogre\+Archive\+Factory.\+h}\end{DoxyCompactItemize}
