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

#include <pdf.h>

Inheritance diagram for program_card_functor_image_pdf:
program_card_functor_image program_card_functor

List of all members.

Public Member Functions

virtual ~program_card_functor_image_pdf ()
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_pdf (const std::string &filename)
 program_card_functor_image_pdf ()
 program_card_functor_image_pdf (const program_card_functor_image_pdf &rhs)
program_card_functor_image_pdfoperator= (const program_card_functor_image_pdf &rhs)

Private Attributes

std::string filename
Cairo::RefPtr< Cairo::Surface > img
Cairo::RefPtr< Cairo::Context > cr

Detailed Description

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

Definition at line 31 of file pdf.h.


Constructor & Destructor Documentation

The destructor.

Definition at line 26 of file pdf.cc.

program_card_functor_image_pdf::program_card_functor_image_pdf ( 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 47 of file pdf.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 32 of file pdf.cc.

void program_card_functor_image_pdf::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 58 of file pdf.cc.

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

The assignment operator. Do not use.

Parameters:
rhsThe right hand side of the assignment.

Member Data Documentation

Cairo::RefPtr<Cairo::Context> program_card_functor_image_pdf::cr [private]

Definition at line 73 of file pdf.h.

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

Definition at line 69 of file pdf.h.

Cairo::RefPtr<Cairo::Surface> program_card_functor_image_pdf::img [private]

Definition at line 71 of file pdf.h.


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