JPEG Wrap  0.0.1-2561
C++ JPEG Wrap for IJG's jpeglib
JW Class Reference

Base class. Use JWCompress or JWDecompress instead of this class. More...

#include <JW.hpp>

Inheritance diagram for JW:
Collaboration diagram for JW:

Public Member Functions

virtual ~JW (void)
 Destructor. More...
 
virtual std::string get_filename (void) const
 The filename used for input (decompress) or output (compress) if set via set_file(). More...
 

Public Attributes

jpeg_error_mgr jerr
 IJG's structures and pointers to those structures used by derived classes. More...
 
jpeg_error_mgr * jerr_ptr
 IJG's structures and pointers to those structures used by derived classes. More...
 
jpeg_compress_struct * cinfo_ptr
 IJG's structures and pointers to those structures used by derived classes. More...
 
jpeg_decompress_struct * dinfo_ptr
 IJG's structures and pointers to those structures used by derived classes. More...
 

Protected Member Functions

 JW (void)
 Constructor is protected. Use the derived classes JWCompress and JWDecompress, not this base class. More...
 
virtual JWset_file (const std::string &filename)
 Protected method to set the input or output file. More...
 
virtual JWset_file (FILE *f)
 

Protected Attributes

std::string fname
 The filename used for input (decompress) or output (compress) if set via set_file(). More...
 
FILE * file
 Input/output file. Used for output when compressing, and input when decompressing. More...
 

Detailed Description

Base class. Use JWCompress or JWDecompress instead of this class.

Constructor & Destructor Documentation

◆ ~JW()

JW::~JW ( void  )
virtual

Destructor.

◆ JW()

JW::JW ( void  )
protected

Constructor is protected. Use the derived classes JWCompress and JWDecompress, not this base class.

Member Function Documentation

◆ get_filename()

virtual std::string JW::get_filename ( void  ) const
inlinevirtual

The filename used for input (decompress) or output (compress) if set via set_file().

The only way to set the input or output file is to call JWCompress::set_output_file() or JWDecompress::set_input_file().

◆ set_file() [1/2]

JW & JW::set_file ( const std::string &  filename)
protectedvirtual

Protected method to set the input or output file.

Use the equivalent functions in the derived classes instead.

See also
JWCompress::set_output_file()
JWDecompress::set_input_file()
Exceptions
std::runtime_errorif the named file cannot be opened
Here is the caller graph for this function:

◆ set_file() [2/2]

JW & JW::set_file ( FILE *  f)
protectedvirtual
Exceptions
std::runtime_errorif the file pointer is null

Member Data Documentation

◆ cinfo_ptr

jpeg_compress_struct* JW::cinfo_ptr

IJG's structures and pointers to those structures used by derived classes.

◆ dinfo_ptr

jpeg_decompress_struct* JW::dinfo_ptr

IJG's structures and pointers to those structures used by derived classes.

◆ file

FILE* JW::file
protected

Input/output file. Used for output when compressing, and input when decompressing.

◆ fname

std::string JW::fname
protected

The filename used for input (decompress) or output (compress) if set via set_file().

See also
get_filename()

◆ jerr

jpeg_error_mgr JW::jerr

IJG's structures and pointers to those structures used by derived classes.

◆ jerr_ptr

jpeg_error_mgr* JW::jerr_ptr

IJG's structures and pointers to those structures used by derived classes.


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