<html> <head> <title>Ogre::Codec 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.2.16 --> <center> <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">Compound 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">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> <a class="qindex" href="pages.html">Related Pages</a> </center> <hr><h1>Ogre::Codec Class Reference</h1>Abstract class that defines a 'codec'. <a href="#_details">More...</a> <p> <code>#include <<a class="el" href="OgreCodec_8h-source.html">OgreCodec.h</a>></code> <p> Inheritance diagram for Ogre::Codec:<p><center><img src="classOgre_1_1Codec__inherit__graph.png" border="0" usemap="#Ogre_1_1Codec__inherit__map" alt="Inheritance graph"></center> <map name="Ogre_1_1Codec__inherit__map"> <area href="classOgre_1_1ImageCodec.html" shape="rect" coords="12,105,132,86" alt=""> <area href="classOgre_1_1ILImageCodec.html" shape="rect" coords="7,174,137,156" alt=""> </map> <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="classOgre_1_1Codec-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0> <tr><td colspan=2><br><h2>Public Methods</h2></td></tr> <tr><td nowrap align=right valign=top>virtual void </td><td valign=bottom><a class="el" href="classOgre_1_1Codec.html#Ogre_1_1Codeca0">code</a> (const <a class="el" href="classOgre_1_1DataChunk.html">DataChunk</a> &input, <a class="el" href="classOgre_1_1DataChunk.html">DataChunk</a> *output,...) const=0</td></tr> <tr><td> </td><td><font size=-1><em>Codes the data in the input chunk and saves the result in the output chunk.</em> <a href="#Ogre_1_1Codeca0"></a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>virtual void </td><td valign=bottom><a class="el" href="classOgre_1_1Codec.html#Ogre_1_1Codeca1">codeToFile</a> (const <a class="el" href="classOgre_1_1DataChunk.html">DataChunk</a> &input, const <a class="el" href="classOgre_1_1String.html">String</a> &outFileName, <a class="el" href="classOgre_1_1Codec_1_1CodecData.html">CodecData</a> *pData) const=0</td></tr> <tr><td> </td><td><font size=-1><em>Codes the data in the input chunk and saves the result in the output filename provided.</em> <a href="#Ogre_1_1Codeca1"></a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>virtual <a class="el" href="classOgre_1_1Codec_1_1CodecData.html">CodecData</a> * </td><td valign=bottom><a class="el" href="classOgre_1_1Codec.html#Ogre_1_1Codeca2">decode</a> (const <a class="el" href="classOgre_1_1DataChunk.html">DataChunk</a> &input, <a class="el" href="classOgre_1_1DataChunk.html">DataChunk</a> *output,...) const=0</td></tr> <tr><td> </td><td><font size=-1><em>Codes the data from the input chunk into the output chunk.</em> <a href="#Ogre_1_1Codeca2"></a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>virtual <a class="el" href="classOgre_1_1String.html">String</a> </td><td valign=bottom><a class="el" href="classOgre_1_1Codec.html#Ogre_1_1Codeca3">getType</a> () const=0</td></tr> <tr><td> </td><td><font size=-1><em>Returns the type of the codec as a <a class="el" href="classOgre_1_1String.html">String</a>.</em> <a href="#Ogre_1_1Codeca3"></a><em></em></font><br><br></td></tr> <tr><td colspan=2><br><h2>Static Public Methods</h2></td></tr> <tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classOgre_1_1Codec.html#Ogre_1_1TGACodecd0">registerCodec</a> (Codec *pCodec)</td></tr> <tr><td> </td><td><font size=-1><em>Registers a new codec in the database.</em> <a href="#Ogre_1_1TGACodecd0"></a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>Codec * </td><td valign=bottom><a class="el" href="classOgre_1_1Codec.html#Ogre_1_1TGACodecd1">getCodec</a> (const <a class="el" href="classOgre_1_1String.html">String</a> &extension)</td></tr> <tr><td> </td><td><font size=-1><em>Gets the codec registered for the passed in file extension.</em> <a href="#Ogre_1_1TGACodecd1"></a><em></em></font><br><br></td></tr> <tr><td colspan=2><br><h2>Protected Types</h2></td></tr> <tr><td nowrap align=right valign=top>typedef std::map< <a class="el" href="classOgre_1_1String.html">String</a>,<br> Codec * > </td><td valign=bottom><a class="el" href="classOgre_1_1Codec.html#Ogre_1_1TGACodect0">CodecList</a></td></tr> <tr><td colspan=2><br><h2>Static Protected Attributes</h2></td></tr> <tr><td nowrap align=right valign=top><a class="el" href="classOgre_1_1Codec.html#Ogre_1_1TGACodect0">CodecList</a> </td><td valign=bottom><a class="el" href="classOgre_1_1Codec.html#Ogre_1_1TGACodecq0">ms_mapCodecs</a></td></tr> <tr><td> </td><td><font size=-1><em>A map that contains all the registered codecs.</em> <a href="#Ogre_1_1TGACodecq0"></a><em></em></font><br><br></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> Abstract class that defines a 'codec'. <p> <dl compact><dt><b> Remarks: </b><dd> 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. <p> The codec concept is a pretty generic one - you can easily understand how it can be used for images, sounds, archives, even compressed data. </dl> <p> <p> Definition at line <a class="el" href="OgreCodec_8h-source.html#l00041">41</a> of file <a class="el" href="OgreCodec_8h-source.html">OgreCodec.h</a>.<hr><h2>Member Typedef Documentation</h2> <a name="Ogre_1_1TGACodect0" doxytag="Ogre::Codec::CodecList"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> typedef std::map< <a class="el" href="classOgre_1_1String.html">String</a>, Codec* > Ogre::Codec::CodecList<code> [protected]</code> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> <p> Definition at line <a class="el" href="OgreCodec_8h-source.html#l00044">44</a> of file <a class="el" href="OgreCodec_8h-source.html">OgreCodec.h</a>. </td> </tr> </table> <hr><h2>Member Function Documentation</h2> <a name="Ogre_1_1Codeca0" doxytag="Ogre::Codec::code"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> virtual void Ogre::Codec::code </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="el" href="classOgre_1_1DataChunk.html">DataChunk</a> & </td> <td class="mdname" nowrap> <em>input</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap><a class="el" href="classOgre_1_1DataChunk.html">DataChunk</a> * </td> <td class="mdname" nowrap> <em>output</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>... </td> <td class="mdname" nowrap> </td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"> const<code> [pure virtual]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Codes the data in the input chunk and saves the result in the output chunk. <p> <dl compact><dt><b> Note: </b><dd> Has a variable number of arguments, which depend on the codec type. </dl> <p> Implemented in <a class="el" href="classOgre_1_1BMPCodec.html#Ogre_1_1BMPCodeca0">Ogre::BMPCodec</a>, <a class="el" href="classOgre_1_1DDSCodec.html#Ogre_1_1DDSCodeca0">Ogre::DDSCodec</a>, <a class="el" href="classOgre_1_1ILImageCodec.html#Ogre_1_1ILImageCodeca2">Ogre::ILImageCodec</a>, <a class="el" href="classOgre_1_1ImageCodec.html#Ogre_1_1ImageCodeca0">Ogre::ImageCodec</a>, <a class="el" href="classOgre_1_1JPEGCodec.html#Ogre_1_1JPGCodeca1">Ogre::JPEGCodec</a>, <a class="el" href="classOgre_1_1PNGCodec.html#Ogre_1_1PNGCodeca0">Ogre::PNGCodec</a>, and <a class="el" href="classOgre_1_1TGACodec.html#Ogre_1_1TGACodeca0">Ogre::TGACodec</a>. </td> </tr> </table> <a name="Ogre_1_1Codeca1" doxytag="Ogre::Codec::codeToFile"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> virtual void Ogre::Codec::codeToFile </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="el" href="classOgre_1_1DataChunk.html">DataChunk</a> & </td> <td class="mdname" nowrap> <em>input</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>const <a class="el" href="classOgre_1_1String.html">String</a> & </td> <td class="mdname" nowrap> <em>outFileName</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap><a class="el" href="classOgre_1_1Codec_1_1CodecData.html">CodecData</a> * </td> <td class="mdname" nowrap> <em>pData</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"> const<code> [pure virtual]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Codes the data in the input chunk and saves the result in the output filename provided. <p> Provided for efficiency since coding to memory is progressive therefore memory required is unknown leading to reallocations. <dl compact><dt><b> Parameters: </b><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>input</em> </td><td> The input data </td></tr> <tr><td valign=top><em>outFileName</em> </td><td> The filename to write to </td></tr> <tr><td valign=top><em>pData</em> </td><td> Extra information to be passed to the codec (codec type specific) </td></tr> </table> </dl> <p> Implemented in <a class="el" href="classOgre_1_1ILImageCodec.html#Ogre_1_1TGACodeca4">Ogre::ILImageCodec</a>, and <a class="el" href="classOgre_1_1ImageCodec.html#Ogre_1_1ImageCodeca2">Ogre::ImageCodec</a>. <p> Referenced by <a class="el" href="OgreWin32Window_8cpp-source.html#l00282">Ogre::Win32Window::writeContentsToFile</a>(), <a class="el" href="OgreSDLWindow_8cpp-source.html#l00141">Ogre::SDLWindow::writeContentsToFile</a>(), <a class="el" href="OgreD3D9RenderWindow_8cpp-source.html#l00483">Ogre::D3D9RenderWindow::writeContentsToFile</a>(), and <a class="el" href="OgreD3D7RenderWindow_8cpp-source.html#l00635">Ogre::D3D7RenderWindow::writeContentsToFile</a>(). </td> </tr> </table> <a name="Ogre_1_1Codeca2" doxytag="Ogre::Codec::decode"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> virtual <a class="el" href="classOgre_1_1Codec_1_1CodecData.html">CodecData</a>* Ogre::Codec::decode </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="el" href="classOgre_1_1DataChunk.html">DataChunk</a> & </td> <td class="mdname" nowrap> <em>input</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap><a class="el" href="classOgre_1_1DataChunk.html">DataChunk</a> * </td> <td class="mdname" nowrap> <em>output</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>... </td> <td class="mdname" nowrap> </td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"> const<code> [pure virtual]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Codes the data from the input chunk into the output chunk. <p> <dl compact><dt><b> Remarks: </b><dd> The returned <a class="el" href="classOgre_1_1Codec_1_1CodecData.html">CodecData</a> pointer is a pointer to a class that holds information about the decoded buffer. For an image, this would be the size, the bitdepht, etc. </dl><dl compact><dt><b> Note: </b><dd> Has a variable number of arguments, which depend on the codec type. </dl> <p> Implemented in <a class="el" href="classOgre_1_1BMPCodec.html#Ogre_1_1BMPCodeca1">Ogre::BMPCodec</a>, <a class="el" href="classOgre_1_1DDSCodec.html#Ogre_1_1DDSCodeca1">Ogre::DDSCodec</a>, <a class="el" href="classOgre_1_1ILImageCodec.html#Ogre_1_1PNGCodeca4">Ogre::ILImageCodec</a>, <a class="el" href="classOgre_1_1ImageCodec.html#Ogre_1_1ImageCodeca1">Ogre::ImageCodec</a>, <a class="el" href="classOgre_1_1JPEGCodec.html#Ogre_1_1JPGCodeca2">Ogre::JPEGCodec</a>, and <a class="el" href="classOgre_1_1TGACodec.html#Ogre_1_1TGACodeca1">Ogre::TGACodec</a>. <p> Referenced by <a class="el" href="OgreImage_8cpp-source.html#l00226">Ogre::Image::load</a>(). </td> </tr> </table> <a name="Ogre_1_1TGACodecd1" doxytag="Ogre::Codec::getCodec"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> Codec * Ogre::Codec::getCodec </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="el" href="classOgre_1_1String.html">String</a> & </td> <td class="mdname1" valign="top" nowrap> <em>extension</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap><code> [static]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Gets the codec registered for the passed in file extension. <p> <p> Definition at line <a class="el" href="OgreCodec_8cpp-source.html#l00035">35</a> of file <a class="el" href="OgreCodec_8cpp-source.html">OgreCodec.cpp</a>. <p> References <a class="el" href="OgreException_8h-source.html#l00033">Except</a>, <a class="el" href="OgreCodec_8cpp-source.html#l00032">ms_mapCodecs</a>, and <a class="el" href="OgreString_8cpp-source.html#l00101">Ogre::String::toLowerCase</a>(). </td> </tr> </table> <a name="Ogre_1_1Codeca3" doxytag="Ogre::Codec::getType"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> virtual <a class="el" href="classOgre_1_1String.html">String</a> Ogre::Codec::getType </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap> const<code> [pure virtual]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Returns the type of the codec as a <a class="el" href="classOgre_1_1String.html">String</a>. <p> <p> Implemented in <a class="el" href="classOgre_1_1BMPCodec.html#Ogre_1_1BMPCodeca2">Ogre::BMPCodec</a>, <a class="el" href="classOgre_1_1DDSCodec.html#Ogre_1_1DDSCodeca2">Ogre::DDSCodec</a>, <a class="el" href="classOgre_1_1ILImageCodec.html#Ogre_1_1ILImageCodeca5">Ogre::ILImageCodec</a>, <a class="el" href="classOgre_1_1ImageCodec.html#Ogre_1_1ImageCodeca3">Ogre::ImageCodec</a>, <a class="el" href="classOgre_1_1JPEGCodec.html#Ogre_1_1JPEGCodeca2">Ogre::JPEGCodec</a>, <a class="el" href="classOgre_1_1JPGCodec.html#Ogre_1_1JPGCodeca0">Ogre::JPGCodec</a>, <a class="el" href="classOgre_1_1PNGCodec.html#Ogre_1_1PNGCodeca2">Ogre::PNGCodec</a>, and <a class="el" href="classOgre_1_1TGACodec.html#Ogre_1_1TGACodeca2">Ogre::TGACodec</a>. <p> Referenced by <a class="el" href="OgreCodec_8h-source.html#l00063">registerCodec</a>(). </td> </tr> </table> <a name="Ogre_1_1TGACodecd0" doxytag="Ogre::Codec::registerCodec"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> void Ogre::Codec::registerCodec </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">Codec * </td> <td class="mdname1" valign="top" nowrap> <em>pCodec</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap><code> [static]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Registers a new codec in the database. <p> <p> Definition at line <a class="el" href="OgreCodec_8h-source.html#l00063">63</a> of file <a class="el" href="OgreCodec_8h-source.html">OgreCodec.h</a>. <p> References <a class="el" href="classOgre_1_1Codec.html#Ogre_1_1Codeca3">getType</a>(). </td> </tr> </table> <hr><h2>Member Data Documentation</h2> <a name="Ogre_1_1TGACodecq0" doxytag="Ogre::Codec::ms_mapCodecs"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> std::map< <a class="el" href="classOgre_1_1String.html">String</a>, Codec * > Ogre::Codec::ms_mapCodecs<code> [static, protected]</code> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> A map that contains all the registered codecs. <p> <p> Definition at line <a class="el" href="OgreCodec_8cpp-source.html#l00032">32</a> of file <a class="el" href="OgreCodec_8cpp-source.html">OgreCodec.cpp</a>. <p> Referenced by <a class="el" href="OgreCodec_8cpp-source.html#l00035">getCodec</a>(). </td> </tr> </table> <hr>The documentation for this class was generated from the following files:<ul> <li><a class="el" href="OgreCodec_8h-source.html">OgreCodec.h</a><li><a class="el" href="OgreCodec_8cpp-source.html">OgreCodec.cpp</a></ul> <p> Copyright © 2002-2003 by The OGRE Team<br /> Last modified Wed Jan 21 00:17:03 2004 </p> </body> </html>