Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Ogre::ImageCodec Class Reference

Codec specialized in images. More...

#include <OgreImageCodec.h>

Inheritance diagram for Ogre::ImageCodec:

Inheritance graph
[legend]
Collaboration diagram for Ogre::ImageCodec:

Collaboration graph
[legend]
List of all members.

Public Methods

virtual void code (const DataChunk &input, DataChunk *output,...) const=0
 Codes the data in the input chunk and saves the result in the output chunk.

virtual CodecData * decode (const DataChunk &input, DataChunk *output,...) const=0
 Codes the data from the input chunk into the output chunk.

virtual void codeToFile (const DataChunk &input, const String &outFileName, CodecData *pData) const=0
 Encodes data to a file.

virtual String getType () const=0
 Returns the type of the codec as a String.


Static Public Methods

void registerCodec (Codec *pCodec)
 Registers a new codec in the database.

CodecgetCodec (const String &extension)
 Gets the codec registered for the passed in file extension.


Protected Types

typedef std::map< String,
Codec * > 
CodecList

Static Protected Attributes

CodecList ms_mapCodecs
 A map that contains all the registered codecs.


Detailed Description

Codec specialized in images.

Remarks:
The users implementing subclasses of ImageCodec are required to return a valid pointer to a ImageData class from the decode(...) function.

Definition at line 38 of file OgreImageCodec.h.


Member Typedef Documentation

typedef std::map< String, Codec* > Ogre::Codec::CodecList [protected, inherited]
 

Definition at line 44 of file OgreCodec.h.


Member Function Documentation

virtual void Ogre::ImageCodec::code const DataChunk   input,
DataChunk   output,
...   
const [pure virtual]
 

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

Note:
Has a variable number of arguments, which depend on the codec type.

Implements Ogre::Codec.

Implemented in Ogre::BMPCodec, Ogre::DDSCodec, Ogre::ILImageCodec, Ogre::JPEGCodec, Ogre::PNGCodec, and Ogre::TGACodec.

virtual void Ogre::ImageCodec::codeToFile const DataChunk   input,
const String   outFileName,
CodecData *    pData
const [pure virtual]
 

Encodes data to a file.

Parameters:
input  Chunk containing data to write
outFileName  Filename to output to (extension implies type)
pData  ImageData pointer

Implements Ogre::Codec.

Implemented in Ogre::ILImageCodec.

virtual CodecData* Ogre::ImageCodec::decode const DataChunk   input,
DataChunk   output,
...   
const [pure virtual]
 

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

Remarks:
The returned CodecData 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.
Note:
Has a variable number of arguments, which depend on the codec type.

Implements Ogre::Codec.

Implemented in Ogre::BMPCodec, Ogre::DDSCodec, Ogre::ILImageCodec, Ogre::JPEGCodec, and Ogre::TGACodec.

Codec * Ogre::Codec::getCodec const String   extension [static, inherited]
 

Gets the codec registered for the passed in file extension.

Definition at line 35 of file OgreCodec.cpp.

References Except, Ogre::Codec::ms_mapCodecs, and Ogre::String::toLowerCase().

virtual String Ogre::ImageCodec::getType   const [pure virtual]
 

Returns the type of the codec as a String.

Implements Ogre::Codec.

Implemented in Ogre::BMPCodec, Ogre::DDSCodec, Ogre::ILImageCodec, Ogre::JPEGCodec, Ogre::JPGCodec, Ogre::PNGCodec, and Ogre::TGACodec.

void Ogre::Codec::registerCodec Codec   pCodec [static, inherited]
 

Registers a new codec in the database.

Definition at line 63 of file OgreCodec.h.

References Ogre::Codec::getType().


Member Data Documentation

std::map< String, Codec * > Ogre::Codec::ms_mapCodecs [static, protected, inherited]
 

A map that contains all the registered codecs.

Definition at line 32 of file OgreCodec.cpp.

Referenced by Ogre::Codec::getCodec().


The documentation for this class was generated from the following file:

Copyright © 2002-2003 by The OGRE Team
Last modified Wed Jan 21 00:17:55 2004