Canola  0.8.D001
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
program_card_functor_image_png Class Reference

#include <png.h>

Inheritance diagram for program_card_functor_image_png:
program_card_functor_image program_card_functor

List of all members.

Public Member Functions

virtual ~program_card_functor_image_png ()
void operator() (unsigned card_num, unsigned card_count, const unsigned char *data, size_t data_size)

Static Public Member Functions

static pointer create (const std::string &filename)

Private Member Functions

 program_card_functor_image_png (const std::string &filename)
 program_card_functor_image_png ()
 program_card_functor_image_png (const program_card_functor_image_png &rhs)
program_card_functor_image_pngoperator= (const program_card_functor_image_png &rhs)

Private Attributes

std::string filename

Detailed Description

The program_card_functor_image_png class is used to represent the processing required to draw program card images into a PNG file.

Definition at line 30 of file png.h.


Constructor & Destructor Documentation

The destructor.

Definition at line 26 of file png.cc.

program_card_functor_image_png::program_card_functor_image_png ( const std::string &  filename) [private]

The constructor. It is private on purpose, use the create class method instead.

Parameters:
filenameThe name of the file to be written.

Definition at line 31 of file png.cc.

The default constructor. Do not use.

The copy constructor. Do not use.

Parameters:
rhsThe right hand side of the initialization.

Member Function Documentation

The create class method is used to create a new dynamically allocated instance of this class.

Parameters:
filenameThe path of the output file to be written.
Returns:
a managed pointer to a new instance of this class.

Definition at line 40 of file png.cc.

void program_card_functor_image_png::operator() ( unsigned  card_num,
unsigned  card_count,
const unsigned char *  data,
size_t  data_size 
) [virtual]

The function call operator is overloaded to implement the functionality (that's why it's called a functor).

Parameters:
card_numThe number of the card within the set (1 based).
card_countThe number of cards in the set.
dataThe base of the array of bytes containing the program.
data_sizeThe number of bytes in this card image (> 0, <= 40).

Implements program_card_functor.

Definition at line 47 of file png.cc.

program_card_functor_image_png& program_card_functor_image_png::operator= ( const program_card_functor_image_png rhs) [private]

The assignment operator. Do not use.

Parameters:
rhsThe right hand side of the assignment.

Member Data Documentation

The filename instance variable is used to remember the name of the file to be created.

Definition at line 68 of file png.h.


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