FotoSHOCK
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | List of all members
FotoSHOCKcore::IO::DecoderFactory Class Reference

Class to find a decoder that can be used to decode a file. More...

#include <CodecFactory.hpp>

Public Member Functions

 DecoderFactory (const std::string fileName)
 A constructor. More...
 
 ~DecoderFactory ()
 A destructor. More...
 
DecodergetDecoder () const
 Get the decoder for the file specified in the DecoderFactory constructor. More...
 

Detailed Description

Class to find a decoder that can be used to decode a file.

Constructor & Destructor Documentation

FotoSHOCKcore::IO::DecoderFactory::DecoderFactory ( const std::string  fileName)

A constructor.

The DecoderFactory constructor tries to find a decoder, that is able to decode the file specified by fileName.

The DecoderFactory doesn't load the image. Instead use the getDecoder() function to get the decoder and use this decoder to load the image.

If there is no such decoder, an IOException is thrown.

Parameters
fileNamename of the file to load.
FotoSHOCKcore::IO::DecoderFactory::~DecoderFactory ( )

A destructor.

Frees the memory occupied by the decoder.

Member Function Documentation

Decoder * FotoSHOCKcore::IO::DecoderFactory::getDecoder ( ) const

Get the decoder for the file specified in the DecoderFactory constructor.

Returns
decoder that can be used to load an image into a buffer. The decoder is freed upon the DecoderFactory destruction.

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