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

Class storing all information needed to save an image. More...

#include <SaveInfo.hpp>

Public Member Functions

 SaveInfo (std::string fileName)
 A constructor. More...
 
 SaveInfo (std::string fileName, Formats::Enum format)
 A constructor. More...
 

Protected Member Functions

std::string fileName () const
 Returns the name of the file. More...
 
Formats::Enum format () const
 Returns format of the file. More...
 

Friends

class EncoderFactory
 

Detailed Description

Class storing all information needed to save an image.

The class stores the destination file name and other information such as the file format.

Todo:
Add some way to obtain format specific settings, such as quality.

Constructor & Destructor Documentation

FotoSHOCKcore::IO::SaveInfo::SaveInfo ( std::string  fileName)

A constructor.

Constructs a new SaveInfo for the file fileName. The file format is guessed from the file extension. If it is not possible to guess the format, an IOException is thrown.

Parameters
fileNamename of the destination file
FotoSHOCKcore::IO::SaveInfo::SaveInfo ( std::string  fileName,
Formats::Enum  format 
)

A constructor.

Constructs a new SaveInfo for the file fileName using the specified format. This constructor can thus be used to force a specific format no matter the file extensions (it can be used to eg. save image to file foo.png using the JPEG compression).

Parameters
fileNamename of the destination file
formatformat of the file

Member Function Documentation

std::string FotoSHOCKcore::IO::SaveInfo::fileName ( ) const
protected

Returns the name of the file.

Returns
name of the destination file
Formats::Enum FotoSHOCKcore::IO::SaveInfo::format ( ) const
protected

Returns format of the file.

Returns
format of the file

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