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

Class to create decoder corresponding to the given SaveInfo. More...

#include <CodecFactory.hpp>

Public Member Functions

 EncoderFactory (const SaveInfo info)
 A constructor. More...
 
 ~EncoderFactory ()
 A destructor. More...
 
EncodergetEncoder () const
 Get the encoder for the SaveInfo specified in the EncoderFactory constructor. More...
 

Detailed Description

Class to create decoder corresponding to the given SaveInfo.

Constructor & Destructor Documentation

FotoSHOCKcore::IO::EncoderFactory::EncoderFactory ( const SaveInfo  info)

A constructor.

The EncoderFactory constructor tries to find an encoder for the file format specified in the info parameter and creates the encoder, so that it can be used to save image under the name specified in the info parameter.

If the encoder can't be found for the requested file format, the constructor throws an IOException.

The EncoderFactory doesn't save the image. Instead, use the getEncoder() function to get the encoder that can be used to save an image.

Parameters
infoclass specifying the filename of the destination file and its format.
FotoSHOCKcore::IO::EncoderFactory::~EncoderFactory ( )

A destructor.

Frees the memory occupied by the encoder.

Member Function Documentation

Encoder * FotoSHOCKcore::IO::EncoderFactory::getEncoder ( ) const

Get the encoder for the SaveInfo specified in the EncoderFactory constructor.

Returns
encoder that can be used to save a buffer under a filename and format specified in the SaveInfo. The encoder is freed upon the EncoderFactory destruction.

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