\hypertarget{class_ogre_1_1_codec}{}\section{Ogre\+:\+:Codec Class Reference}
\label{class_ogre_1_1_codec}\index{Ogre\+::\+Codec@{Ogre\+::\+Codec}}


Abstract class that defines a \textquotesingle{}codec\textquotesingle{}.  




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



Inheritance diagram for Ogre\+:\+:Codec\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{class_ogre_1_1_codec__inherit__graph}
\end{center}
\end{figure}
\subsection*{Classes}
\begin{DoxyCompactItemize}
\item 
class \hyperlink{class_ogre_1_1_codec_1_1_codec_data}{Codec\+Data}
\end{DoxyCompactItemize}
\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
typedef \hyperlink{class_ogre_1_1_shared_ptr}{Shared\+Ptr}$<$ \hyperlink{class_ogre_1_1_codec_1_1_codec_data}{Codec\+Data} $>$ \hyperlink{class_ogre_1_1_codec_a29e31ad112b08ea7fb648b63f426ff1f}{Codec\+Data\+Ptr}
\item 
typedef \hyperlink{class_ogre_1_1_const_map_iterator}{Const\+Map\+Iterator}$<$ Codec\+List $>$ \hyperlink{class_ogre_1_1_codec_a21f4b8a16d070793d576f827c9fee218}{Codec\+Iterator}
\item 
typedef std\+::pair$<$ \hyperlink{namespace_ogre_af8656a2c0ef06642f70c4b3745ee80a2}{Memory\+Data\+Stream\+Ptr}, \hyperlink{class_ogre_1_1_codec_a29e31ad112b08ea7fb648b63f426ff1f}{Codec\+Data\+Ptr} $>$ \hyperlink{class_ogre_1_1_codec_a8cc81c85bd7d4e25393aa153c5e01454}{Decode\+Result}
\begin{DoxyCompactList}\small\item\em Result of a decoding; both a decoded data stream and \hyperlink{class_ogre_1_1_codec_1_1_codec_data}{Codec\+Data} metadata. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
virtual \hyperlink{class_ogre_1_1_codec_aee7d2a1126a22bbf3da40088495cb00b}{$\sim$\+Codec} ()
\item 
virtual \hyperlink{class_ogre_1_1_codec_a8cc81c85bd7d4e25393aa153c5e01454}{Decode\+Result} \hyperlink{class_ogre_1_1_codec_a1eae89f8ca897b68ba6473e7b3d058f4}{decode} (const \hyperlink{namespace_ogre_a8a2a961b4205aacff9c01e81e08d7781}{Data\+Stream\+Ptr} \&input) const =0
\begin{DoxyCompactList}\small\item\em Codes the data from the input chunk into the output chunk. \end{DoxyCompactList}\item 
virtual \hyperlink{namespace_ogre_a8a2a961b4205aacff9c01e81e08d7781}{Data\+Stream\+Ptr} \hyperlink{class_ogre_1_1_codec_a4134526fadbb63af778e17a8d6301c3c}{encode} (const \hyperlink{namespace_ogre_af8656a2c0ef06642f70c4b3745ee80a2}{Memory\+Data\+Stream\+Ptr} \&input, const \hyperlink{class_ogre_1_1_codec_a29e31ad112b08ea7fb648b63f426ff1f}{Codec\+Data\+Ptr} \&p\+Data) const =0
\begin{DoxyCompactList}\small\item\em Codes the data in the input stream and saves the result in the output stream. \end{DoxyCompactList}\item 
virtual void \hyperlink{class_ogre_1_1_codec_aa8c8c94007bd13ccab9ca54fb3e8bf81}{encode\+To\+File} (const \hyperlink{namespace_ogre_af8656a2c0ef06642f70c4b3745ee80a2}{Memory\+Data\+Stream\+Ptr} \&input, const \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String} \&out\+File\+Name, const \hyperlink{class_ogre_1_1_codec_a29e31ad112b08ea7fb648b63f426ff1f}{Codec\+Data\+Ptr} \&p\+Data) const =0
\begin{DoxyCompactList}\small\item\em Codes the data in the input chunk and saves the result in the output filename provided. \end{DoxyCompactList}\item 
virtual \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String} \hyperlink{class_ogre_1_1_codec_aeb344d293259ec352c308d81fdf3e94c}{get\+Data\+Type} () const =0
\begin{DoxyCompactList}\small\item\em Returns the type of the data that supported by this codec as a String. \end{DoxyCompactList}\item 
virtual \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String} \hyperlink{class_ogre_1_1_codec_ada1a5477ab6a563565f1b3599d7b806a}{get\+Type} () const =0
\begin{DoxyCompactList}\small\item\em Returns the type of the codec as a String. \end{DoxyCompactList}\item 
virtual bool \hyperlink{class_ogre_1_1_codec_a270be35471eb9ef28fdbd4b7dced21b9}{magic\+Number\+Match} (const char $\ast$magic\+Number\+Ptr, size\+\_\+t maxbytes) const
\begin{DoxyCompactList}\small\item\em Returns whether a magic number header matches this codec. \end{DoxyCompactList}\item 
virtual \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String} \hyperlink{class_ogre_1_1_codec_af90756f690827353e18347d328bc5180}{magic\+Number\+To\+File\+Ext} (const char $\ast$magic\+Number\+Ptr, size\+\_\+t maxbytes) const =0
\begin{DoxyCompactList}\small\item\em Maps a magic number header to a file extension, if this codec recognises it. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
static \hyperlink{class_ogre_1_1_codec}{Codec} $\ast$ \hyperlink{class_ogre_1_1_codec_acc4ee751f92b6e54051393e74e0a2884}{get\+Codec} (const \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String} \&extension)
\begin{DoxyCompactList}\small\item\em Gets the codec registered for the passed in file extension. \end{DoxyCompactList}\item 
static \hyperlink{class_ogre_1_1_codec}{Codec} $\ast$ \hyperlink{class_ogre_1_1_codec_ac8775b1052fb8ba72abdfb55df20a6af}{get\+Codec} (char $\ast$magic\+Number\+Ptr, size\+\_\+t maxbytes)
\begin{DoxyCompactList}\small\item\em Gets the codec that can handle the given \textquotesingle{}magic\textquotesingle{} identifier. \end{DoxyCompactList}\item 
static \hyperlink{class_ogre_1_1_codec_a21f4b8a16d070793d576f827c9fee218}{Codec\+Iterator} \hyperlink{class_ogre_1_1_codec_a55bf1d49e91958f8e412a583666bbd58}{get\+Codec\+Iterator} (void)
\begin{DoxyCompactList}\small\item\em Gets the iterator for the registered codecs. \end{DoxyCompactList}\item 
static \hyperlink{group___general_ga783e5227595f351519627abfb740ec85}{String\+Vector} \hyperlink{class_ogre_1_1_codec_a6092324fd74dd0221f7c63ca8bec4fc1}{get\+Extensions} (void)
\begin{DoxyCompactList}\small\item\em Gets the file extension list for the registered codecs. \end{DoxyCompactList}\item 
static bool \hyperlink{class_ogre_1_1_codec_ae5b74cfd0cb797a2ac139b4adb7ac557}{is\+Codec\+Registered} (const \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String} \&codec\+Type)
\begin{DoxyCompactList}\small\item\em Return whether a codec is registered already. \end{DoxyCompactList}\item 
static void \hyperlink{class_ogre_1_1_codec_a60f445cc6919df56af6611fd14eec47d}{register\+Codec} (\hyperlink{class_ogre_1_1_codec}{Codec} $\ast$p\+Codec)
\begin{DoxyCompactList}\small\item\em Registers a new codec in the database. \end{DoxyCompactList}\item 
static void \hyperlink{class_ogre_1_1_codec_a7aa2599cd9db05e590fb7f7786076852}{unregister\+Codec} (\hyperlink{class_ogre_1_1_codec}{Codec} $\ast$p\+Codec)
\begin{DoxyCompactList}\small\item\em Unregisters a codec from the database. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Abstract class that defines a \textquotesingle{}codec\textquotesingle{}. 

\begin{DoxyRemark}{Remarks}
A codec class works like a two-\/way filter for data -\/ data entered on one end (the decode end) gets processed and transformed into easily usable data while data passed the other way around codes it back. 
\end{DoxyRemark}
\begin{DoxyParagraph}{}
The codec concept is a pretty generic one -\/ you can easily understand how it can be used for images, sounds, archives, even compressed data. 
\end{DoxyParagraph}


\subsection{Member Typedef Documentation}
\mbox{\Hypertarget{class_ogre_1_1_codec_a29e31ad112b08ea7fb648b63f426ff1f}\label{class_ogre_1_1_codec_a29e31ad112b08ea7fb648b63f426ff1f}} 
\index{Ogre\+::\+Codec@{Ogre\+::\+Codec}!Codec\+Data\+Ptr@{Codec\+Data\+Ptr}}
\index{Codec\+Data\+Ptr@{Codec\+Data\+Ptr}!Ogre\+::\+Codec@{Ogre\+::\+Codec}}
\subsubsection{\texorpdfstring{Codec\+Data\+Ptr}{CodecDataPtr}}
{\footnotesize\ttfamily typedef \hyperlink{class_ogre_1_1_shared_ptr}{Shared\+Ptr}$<$\hyperlink{class_ogre_1_1_codec_1_1_codec_data}{Codec\+Data}$>$ \hyperlink{class_ogre_1_1_codec_a29e31ad112b08ea7fb648b63f426ff1f}{Ogre\+::\+Codec\+::\+Codec\+Data\+Ptr}}

\mbox{\Hypertarget{class_ogre_1_1_codec_a21f4b8a16d070793d576f827c9fee218}\label{class_ogre_1_1_codec_a21f4b8a16d070793d576f827c9fee218}} 
\index{Ogre\+::\+Codec@{Ogre\+::\+Codec}!Codec\+Iterator@{Codec\+Iterator}}
\index{Codec\+Iterator@{Codec\+Iterator}!Ogre\+::\+Codec@{Ogre\+::\+Codec}}
\subsubsection{\texorpdfstring{Codec\+Iterator}{CodecIterator}}
{\footnotesize\ttfamily typedef \hyperlink{class_ogre_1_1_const_map_iterator}{Const\+Map\+Iterator}$<$Codec\+List$>$ \hyperlink{class_ogre_1_1_codec_a21f4b8a16d070793d576f827c9fee218}{Ogre\+::\+Codec\+::\+Codec\+Iterator}}

\mbox{\Hypertarget{class_ogre_1_1_codec_a8cc81c85bd7d4e25393aa153c5e01454}\label{class_ogre_1_1_codec_a8cc81c85bd7d4e25393aa153c5e01454}} 
\index{Ogre\+::\+Codec@{Ogre\+::\+Codec}!Decode\+Result@{Decode\+Result}}
\index{Decode\+Result@{Decode\+Result}!Ogre\+::\+Codec@{Ogre\+::\+Codec}}
\subsubsection{\texorpdfstring{Decode\+Result}{DecodeResult}}
{\footnotesize\ttfamily typedef std\+::pair$<$\hyperlink{namespace_ogre_af8656a2c0ef06642f70c4b3745ee80a2}{Memory\+Data\+Stream\+Ptr}, \hyperlink{class_ogre_1_1_codec_a29e31ad112b08ea7fb648b63f426ff1f}{Codec\+Data\+Ptr}$>$ \hyperlink{class_ogre_1_1_codec_a8cc81c85bd7d4e25393aa153c5e01454}{Ogre\+::\+Codec\+::\+Decode\+Result}}



Result of a decoding; both a decoded data stream and \hyperlink{class_ogre_1_1_codec_1_1_codec_data}{Codec\+Data} metadata. 



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



\subsection{Member Function Documentation}
\mbox{\Hypertarget{class_ogre_1_1_codec_a60f445cc6919df56af6611fd14eec47d}\label{class_ogre_1_1_codec_a60f445cc6919df56af6611fd14eec47d}} 
\index{Ogre\+::\+Codec@{Ogre\+::\+Codec}!register\+Codec@{register\+Codec}}
\index{register\+Codec@{register\+Codec}!Ogre\+::\+Codec@{Ogre\+::\+Codec}}
\subsubsection{\texorpdfstring{register\+Codec()}{registerCodec()}}
{\footnotesize\ttfamily static void Ogre\+::\+Codec\+::register\+Codec (\begin{DoxyParamCaption}\item[{\hyperlink{class_ogre_1_1_codec}{Codec} $\ast$}]{p\+Codec }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



Registers a new codec in the database. 



References Ogre\+::\+Exception\+::\+E\+R\+R\+\_\+\+D\+U\+P\+L\+I\+C\+A\+T\+E\+\_\+\+I\+T\+EM, get\+Type(), and O\+G\+R\+E\+\_\+\+E\+X\+C\+E\+PT.

\mbox{\Hypertarget{class_ogre_1_1_codec_ae5b74cfd0cb797a2ac139b4adb7ac557}\label{class_ogre_1_1_codec_ae5b74cfd0cb797a2ac139b4adb7ac557}} 
\index{Ogre\+::\+Codec@{Ogre\+::\+Codec}!is\+Codec\+Registered@{is\+Codec\+Registered}}
\index{is\+Codec\+Registered@{is\+Codec\+Registered}!Ogre\+::\+Codec@{Ogre\+::\+Codec}}
\subsubsection{\texorpdfstring{is\+Codec\+Registered()}{isCodecRegistered()}}
{\footnotesize\ttfamily static bool Ogre\+::\+Codec\+::is\+Codec\+Registered (\begin{DoxyParamCaption}\item[{const \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String} \&}]{codec\+Type }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



Return whether a codec is registered already. 

\mbox{\Hypertarget{class_ogre_1_1_codec_a7aa2599cd9db05e590fb7f7786076852}\label{class_ogre_1_1_codec_a7aa2599cd9db05e590fb7f7786076852}} 
\index{Ogre\+::\+Codec@{Ogre\+::\+Codec}!unregister\+Codec@{unregister\+Codec}}
\index{unregister\+Codec@{unregister\+Codec}!Ogre\+::\+Codec@{Ogre\+::\+Codec}}
\subsubsection{\texorpdfstring{unregister\+Codec()}{unregisterCodec()}}
{\footnotesize\ttfamily static void Ogre\+::\+Codec\+::unregister\+Codec (\begin{DoxyParamCaption}\item[{\hyperlink{class_ogre_1_1_codec}{Codec} $\ast$}]{p\+Codec }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



Unregisters a codec from the database. 



References get\+Type().

\mbox{\Hypertarget{class_ogre_1_1_codec_a55bf1d49e91958f8e412a583666bbd58}\label{class_ogre_1_1_codec_a55bf1d49e91958f8e412a583666bbd58}} 
\index{Ogre\+::\+Codec@{Ogre\+::\+Codec}!get\+Codec\+Iterator@{get\+Codec\+Iterator}}
\index{get\+Codec\+Iterator@{get\+Codec\+Iterator}!Ogre\+::\+Codec@{Ogre\+::\+Codec}}
\subsubsection{\texorpdfstring{get\+Codec\+Iterator()}{getCodecIterator()}}
{\footnotesize\ttfamily static \hyperlink{class_ogre_1_1_codec_a21f4b8a16d070793d576f827c9fee218}{Codec\+Iterator} Ogre\+::\+Codec\+::get\+Codec\+Iterator (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



Gets the iterator for the registered codecs. 

\mbox{\Hypertarget{class_ogre_1_1_codec_a6092324fd74dd0221f7c63ca8bec4fc1}\label{class_ogre_1_1_codec_a6092324fd74dd0221f7c63ca8bec4fc1}} 
\index{Ogre\+::\+Codec@{Ogre\+::\+Codec}!get\+Extensions@{get\+Extensions}}
\index{get\+Extensions@{get\+Extensions}!Ogre\+::\+Codec@{Ogre\+::\+Codec}}
\subsubsection{\texorpdfstring{get\+Extensions()}{getExtensions()}}
{\footnotesize\ttfamily static \hyperlink{group___general_ga783e5227595f351519627abfb740ec85}{String\+Vector} Ogre\+::\+Codec\+::get\+Extensions (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Gets the file extension list for the registered codecs. 

\mbox{\Hypertarget{class_ogre_1_1_codec_acc4ee751f92b6e54051393e74e0a2884}\label{class_ogre_1_1_codec_acc4ee751f92b6e54051393e74e0a2884}} 
\index{Ogre\+::\+Codec@{Ogre\+::\+Codec}!get\+Codec@{get\+Codec}}
\index{get\+Codec@{get\+Codec}!Ogre\+::\+Codec@{Ogre\+::\+Codec}}
\subsubsection{\texorpdfstring{get\+Codec()}{getCodec()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily static \hyperlink{class_ogre_1_1_codec}{Codec}$\ast$ Ogre\+::\+Codec\+::get\+Codec (\begin{DoxyParamCaption}\item[{const \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String} \&}]{extension }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Gets the codec registered for the passed in file extension. 

\mbox{\Hypertarget{class_ogre_1_1_codec_ac8775b1052fb8ba72abdfb55df20a6af}\label{class_ogre_1_1_codec_ac8775b1052fb8ba72abdfb55df20a6af}} 
\index{Ogre\+::\+Codec@{Ogre\+::\+Codec}!get\+Codec@{get\+Codec}}
\index{get\+Codec@{get\+Codec}!Ogre\+::\+Codec@{Ogre\+::\+Codec}}
\subsubsection{\texorpdfstring{get\+Codec()}{getCodec()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily static \hyperlink{class_ogre_1_1_codec}{Codec}$\ast$ Ogre\+::\+Codec\+::get\+Codec (\begin{DoxyParamCaption}\item[{char $\ast$}]{magic\+Number\+Ptr,  }\item[{size\+\_\+t}]{maxbytes }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Gets the codec that can handle the given \textquotesingle{}magic\textquotesingle{} identifier. 


\begin{DoxyParams}{Parameters}
{\em magic\+Number\+Ptr} & Pointer to a stream of bytes which should identify the file. Note that this may be more than needed -\/ each codec may be looking for a different size magic number. \\
\hline
{\em maxbytes} & The number of bytes passed \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{class_ogre_1_1_codec_a4134526fadbb63af778e17a8d6301c3c}\label{class_ogre_1_1_codec_a4134526fadbb63af778e17a8d6301c3c}} 
\index{Ogre\+::\+Codec@{Ogre\+::\+Codec}!encode@{encode}}
\index{encode@{encode}!Ogre\+::\+Codec@{Ogre\+::\+Codec}}
\subsubsection{\texorpdfstring{encode()}{encode()}}
{\footnotesize\ttfamily virtual \hyperlink{namespace_ogre_a8a2a961b4205aacff9c01e81e08d7781}{Data\+Stream\+Ptr} Ogre\+::\+Codec\+::encode (\begin{DoxyParamCaption}\item[{const \hyperlink{namespace_ogre_af8656a2c0ef06642f70c4b3745ee80a2}{Memory\+Data\+Stream\+Ptr} \&}]{input,  }\item[{const \hyperlink{class_ogre_1_1_codec_a29e31ad112b08ea7fb648b63f426ff1f}{Codec\+Data\+Ptr} \&}]{p\+Data }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [pure virtual]}}



Codes the data in the input stream and saves the result in the output stream. 



Implemented in \hyperlink{class_ogre_1_1_d_d_s_codec_a56b7d2aad2647f9f4b4ddb72022f636b}{Ogre\+::\+D\+D\+S\+Codec}, \hyperlink{class_ogre_1_1_free_image_codec_a1a8577ada68a3b24678187d82021d847}{Ogre\+::\+Free\+Image\+Codec}, \hyperlink{class_ogre_1_1_e_t_c_codec_a54cdb649a57838232c4228ced7bcc680}{Ogre\+::\+E\+T\+C\+Codec}, \hyperlink{class_ogre_1_1_a_s_t_c_codec_a3a70a9e70e1f0e2a4b6b0e249242fedf}{Ogre\+::\+A\+S\+T\+C\+Codec}, \hyperlink{class_ogre_1_1_p_v_r_t_c_codec_a610c93c89c5247625f2277947ed29b17}{Ogre\+::\+P\+V\+R\+T\+C\+Codec}, \hyperlink{class_ogre_1_1_s_t_b_i_image_codec_a2218b499470d28eb0415b3b4f87e5eb3}{Ogre\+::\+S\+T\+B\+I\+Image\+Codec}, and \hyperlink{class_ogre_1_1_e_x_r_codec_aeb0b73dd8844f546c80d52d6137a2e47}{Ogre\+::\+E\+X\+R\+Codec}.

\mbox{\Hypertarget{class_ogre_1_1_codec_aa8c8c94007bd13ccab9ca54fb3e8bf81}\label{class_ogre_1_1_codec_aa8c8c94007bd13ccab9ca54fb3e8bf81}} 
\index{Ogre\+::\+Codec@{Ogre\+::\+Codec}!encode\+To\+File@{encode\+To\+File}}
\index{encode\+To\+File@{encode\+To\+File}!Ogre\+::\+Codec@{Ogre\+::\+Codec}}
\subsubsection{\texorpdfstring{encode\+To\+File()}{encodeToFile()}}
{\footnotesize\ttfamily virtual void Ogre\+::\+Codec\+::encode\+To\+File (\begin{DoxyParamCaption}\item[{const \hyperlink{namespace_ogre_af8656a2c0ef06642f70c4b3745ee80a2}{Memory\+Data\+Stream\+Ptr} \&}]{input,  }\item[{const \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String} \&}]{out\+File\+Name,  }\item[{const \hyperlink{class_ogre_1_1_codec_a29e31ad112b08ea7fb648b63f426ff1f}{Codec\+Data\+Ptr} \&}]{p\+Data }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [pure virtual]}}



Codes the data in the input chunk and saves the result in the output filename provided. 

Provided for efficiency since coding to memory is progressive therefore memory required is unknown leading to reallocations. 
\begin{DoxyParams}{Parameters}
{\em input} & The input data \\
\hline
{\em out\+File\+Name} & The filename to write to \\
\hline
{\em p\+Data} & Extra information to be passed to the codec (codec type specific) \\
\hline
\end{DoxyParams}


Implemented in \hyperlink{class_ogre_1_1_d_d_s_codec_ab3968255e9440f4a650d4e6349ade674}{Ogre\+::\+D\+D\+S\+Codec}, \hyperlink{class_ogre_1_1_free_image_codec_a50dbef0e524e07adffdd8486299dacff}{Ogre\+::\+Free\+Image\+Codec}, \hyperlink{class_ogre_1_1_e_t_c_codec_ad1d829b50e089fd5852e3f6c48b14ae0}{Ogre\+::\+E\+T\+C\+Codec}, \hyperlink{class_ogre_1_1_a_s_t_c_codec_a19214cb3ea9412e615c59f055b311afe}{Ogre\+::\+A\+S\+T\+C\+Codec}, \hyperlink{class_ogre_1_1_p_v_r_t_c_codec_a74717bad37175f2121ef13d1c0e5ce08}{Ogre\+::\+P\+V\+R\+T\+C\+Codec}, \hyperlink{class_ogre_1_1_s_t_b_i_image_codec_a07b3bd71ae44517eaf316340f09bfd01}{Ogre\+::\+S\+T\+B\+I\+Image\+Codec}, and \hyperlink{class_ogre_1_1_e_x_r_codec_a1adf85669c35cd7a24a13201b22421a0}{Ogre\+::\+E\+X\+R\+Codec}.

\mbox{\Hypertarget{class_ogre_1_1_codec_a1eae89f8ca897b68ba6473e7b3d058f4}\label{class_ogre_1_1_codec_a1eae89f8ca897b68ba6473e7b3d058f4}} 
\index{Ogre\+::\+Codec@{Ogre\+::\+Codec}!decode@{decode}}
\index{decode@{decode}!Ogre\+::\+Codec@{Ogre\+::\+Codec}}
\subsubsection{\texorpdfstring{decode()}{decode()}}
{\footnotesize\ttfamily virtual \hyperlink{class_ogre_1_1_codec_a8cc81c85bd7d4e25393aa153c5e01454}{Decode\+Result} Ogre\+::\+Codec\+::decode (\begin{DoxyParamCaption}\item[{const \hyperlink{namespace_ogre_a8a2a961b4205aacff9c01e81e08d7781}{Data\+Stream\+Ptr} \&}]{input }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [pure virtual]}}



Codes the data from the input chunk into the output chunk. 


\begin{DoxyParams}{Parameters}
{\em input} & Stream containing the encoded data \\
\hline
\end{DoxyParams}


Implemented in \hyperlink{class_ogre_1_1_d_d_s_codec_a5d53fcf42ad11ad222060a1460868634}{Ogre\+::\+D\+D\+S\+Codec}, \hyperlink{class_ogre_1_1_free_image_codec_a8b9d53f163d250a657c9f7ef5d3be983}{Ogre\+::\+Free\+Image\+Codec}, \hyperlink{class_ogre_1_1_e_t_c_codec_a08fedb6931c1f44297ce9f4d0ab7b2cd}{Ogre\+::\+E\+T\+C\+Codec}, \hyperlink{class_ogre_1_1_a_s_t_c_codec_aaf530dfcac7b4c9c8c4a64b87c6dd1ab}{Ogre\+::\+A\+S\+T\+C\+Codec}, \hyperlink{class_ogre_1_1_p_v_r_t_c_codec_adeb85a566abcb2dc06bd6ebba64dd23b}{Ogre\+::\+P\+V\+R\+T\+C\+Codec}, \hyperlink{class_ogre_1_1_s_t_b_i_image_codec_aef0eb6d70068813c59f4be30af564516}{Ogre\+::\+S\+T\+B\+I\+Image\+Codec}, and \hyperlink{class_ogre_1_1_e_x_r_codec_a3e9fc86e03eb15d5a7e4d09f60cf1de9}{Ogre\+::\+E\+X\+R\+Codec}.

\mbox{\Hypertarget{class_ogre_1_1_codec_ada1a5477ab6a563565f1b3599d7b806a}\label{class_ogre_1_1_codec_ada1a5477ab6a563565f1b3599d7b806a}} 
\index{Ogre\+::\+Codec@{Ogre\+::\+Codec}!get\+Type@{get\+Type}}
\index{get\+Type@{get\+Type}!Ogre\+::\+Codec@{Ogre\+::\+Codec}}
\subsubsection{\texorpdfstring{get\+Type()}{getType()}}
{\footnotesize\ttfamily virtual \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String} Ogre\+::\+Codec\+::get\+Type (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [pure virtual]}}



Returns the type of the codec as a String. 



Implemented in \hyperlink{class_ogre_1_1_d_d_s_codec_aa5729e422a6e6a84ca0bd7489aacae96}{Ogre\+::\+D\+D\+S\+Codec}, \hyperlink{class_ogre_1_1_free_image_codec_a15a3c8900c2002970c537e9f83d4a24e}{Ogre\+::\+Free\+Image\+Codec}, \hyperlink{class_ogre_1_1_e_t_c_codec_a048e36f958d0b2c8133ef3d611fcfc6d}{Ogre\+::\+E\+T\+C\+Codec}, \hyperlink{class_ogre_1_1_a_s_t_c_codec_a02c09d20cedebbd768784f4a07b1d528}{Ogre\+::\+A\+S\+T\+C\+Codec}, \hyperlink{class_ogre_1_1_p_v_r_t_c_codec_a9909076c79f9534d2d185a48f7219204}{Ogre\+::\+P\+V\+R\+T\+C\+Codec}, \hyperlink{class_ogre_1_1_s_t_b_i_image_codec_a1763365ccd236b49d56e9c8b60f16844}{Ogre\+::\+S\+T\+B\+I\+Image\+Codec}, and \hyperlink{class_ogre_1_1_e_x_r_codec_a15e6dc21ef3b3e6ea388f4c0fcca125a}{Ogre\+::\+E\+X\+R\+Codec}.



Referenced by register\+Codec(), and unregister\+Codec().

\mbox{\Hypertarget{class_ogre_1_1_codec_aeb344d293259ec352c308d81fdf3e94c}\label{class_ogre_1_1_codec_aeb344d293259ec352c308d81fdf3e94c}} 
\index{Ogre\+::\+Codec@{Ogre\+::\+Codec}!get\+Data\+Type@{get\+Data\+Type}}
\index{get\+Data\+Type@{get\+Data\+Type}!Ogre\+::\+Codec@{Ogre\+::\+Codec}}
\subsubsection{\texorpdfstring{get\+Data\+Type()}{getDataType()}}
{\footnotesize\ttfamily virtual \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String} Ogre\+::\+Codec\+::get\+Data\+Type (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [pure virtual]}}



Returns the type of the data that supported by this codec as a String. 



Implemented in \hyperlink{class_ogre_1_1_image_codec_a6e9a3bb697c7249e822725eda274615c}{Ogre\+::\+Image\+Codec}.

\mbox{\Hypertarget{class_ogre_1_1_codec_a270be35471eb9ef28fdbd4b7dced21b9}\label{class_ogre_1_1_codec_a270be35471eb9ef28fdbd4b7dced21b9}} 
\index{Ogre\+::\+Codec@{Ogre\+::\+Codec}!magic\+Number\+Match@{magic\+Number\+Match}}
\index{magic\+Number\+Match@{magic\+Number\+Match}!Ogre\+::\+Codec@{Ogre\+::\+Codec}}
\subsubsection{\texorpdfstring{magic\+Number\+Match()}{magicNumberMatch()}}
{\footnotesize\ttfamily virtual bool Ogre\+::\+Codec\+::magic\+Number\+Match (\begin{DoxyParamCaption}\item[{const char $\ast$}]{magic\+Number\+Ptr,  }\item[{size\+\_\+t}]{maxbytes }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}



Returns whether a magic number header matches this codec. 


\begin{DoxyParams}{Parameters}
{\em magic\+Number\+Ptr} & Pointer to a stream of bytes which should identify the file. Note that this may be more than needed -\/ each codec may be looking for a different size magic number. \\
\hline
{\em maxbytes} & The number of bytes passed \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{class_ogre_1_1_codec_af90756f690827353e18347d328bc5180}\label{class_ogre_1_1_codec_af90756f690827353e18347d328bc5180}} 
\index{Ogre\+::\+Codec@{Ogre\+::\+Codec}!magic\+Number\+To\+File\+Ext@{magic\+Number\+To\+File\+Ext}}
\index{magic\+Number\+To\+File\+Ext@{magic\+Number\+To\+File\+Ext}!Ogre\+::\+Codec@{Ogre\+::\+Codec}}
\subsubsection{\texorpdfstring{magic\+Number\+To\+File\+Ext()}{magicNumberToFileExt()}}
{\footnotesize\ttfamily virtual \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String} Ogre\+::\+Codec\+::magic\+Number\+To\+File\+Ext (\begin{DoxyParamCaption}\item[{const char $\ast$}]{magic\+Number\+Ptr,  }\item[{size\+\_\+t}]{maxbytes }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [pure virtual]}}



Maps a magic number header to a file extension, if this codec recognises it. 


\begin{DoxyParams}{Parameters}
{\em magic\+Number\+Ptr} & Pointer to a stream of bytes which should identify the file. Note that this may be more than needed -\/ each codec may be looking for a different size magic number. \\
\hline
{\em maxbytes} & The number of bytes passed \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A blank string if the magic number was unknown, or a file extension. 
\end{DoxyReturn}


Implemented in \hyperlink{class_ogre_1_1_d_d_s_codec_a85c3b9be4e9c7d2f8df8cbb24003e716}{Ogre\+::\+D\+D\+S\+Codec}, \hyperlink{class_ogre_1_1_free_image_codec_a840388051a13d5bdb53c779e288136ce}{Ogre\+::\+Free\+Image\+Codec}, \hyperlink{class_ogre_1_1_e_t_c_codec_ae7e50ebd9dfe6376faff3b8b9ac36ad3}{Ogre\+::\+E\+T\+C\+Codec}, \hyperlink{class_ogre_1_1_a_s_t_c_codec_ad9072a8530d43873924eb02ebae91569}{Ogre\+::\+A\+S\+T\+C\+Codec}, \hyperlink{class_ogre_1_1_p_v_r_t_c_codec_ad2bb763bae77c3ac206e528ec2c68a4e}{Ogre\+::\+P\+V\+R\+T\+C\+Codec}, \hyperlink{class_ogre_1_1_s_t_b_i_image_codec_ad70f382ca4da6f2f55de053f80ebea0e}{Ogre\+::\+S\+T\+B\+I\+Image\+Codec}, and \hyperlink{class_ogre_1_1_e_x_r_codec_a840da35f4727b6f90c4d809f0a2c6661}{Ogre\+::\+E\+X\+R\+Codec}.



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