Class: TPrintChannel

Declaration: PrintChannel.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

MBasePrintChannel

Inherited By:

None.

Purpose:

A concrete, instantiable derived class of MBasePrintChannel. A print channel is used to print pages of a document. It defines the scope of a print job, the job's beginning and end, and how it gets wrapped into something that a printer can use. Think of a print channel as a conduit into which a print job (defined by a print job description) gets dumped during the printing process. It is a passive iterator for pages.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

Do not derive from this class. Derive from MBasePrintChannel instead.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TPrintChannel::TPrintChannel

  1. TPrintChannel ()
  2. TPrintChannel (const TPrintChannel &)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Copy constructor.

Calling Context:

  1. Called by the stream-in operators and clients.
  2. Called to copy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TPrintChannel::~TPrintChannel

virtual ~ TPrintChannel ()

Interface Category:

API.

Purpose:

Destructor.

Calling Context:

Called to destroy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws an exception if the object is deleted without calling EndJob. Passes all other exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TPrintChannel::BeginJob

virtual void BeginJob (const TPrintJobDescription &)

Interface Category:

API.

Purpose:

Indicates the start of a print job.

Calling Context:

Called directly to begin printing the document. Also called by the Printing Framework.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TPrintChannel::EndJob

virtual void EndJob ()

Interface Category:

API.

Purpose:

When the job is completed (that is, all pages have been printed and other operations fully specified), then EndJob must be called to signal to the job object that no more data is forthcoming. If this function is not called, the object raises an exception when the job is deleted, unless the job has been otherwise aborted.

Calling Context:

Called directly when all pages of the document have been printed. Also called by the Printing Framework.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TPrintChannel::EndJobAndCreateJobHandle

virtual TPrintJobHandle * EndJobAndCreateJobHandle ()

Interface Category:

API.

Purpose:

Indicates the end of a print job and returns a pointer to the TPrintJobHandle object, from which clients can do things like get the status of the job, pause it, and cancel it.

Calling Context:

Called directly when all pages of the document have been printed. Call this function to hold on to a handle to the job in order to perform job manipulation operations on it. Also called by the Printing Framework.

Parameters:

Return Value:

Returns a pointer to TPrintJobHandle. The client is responsible for deleting it.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TPrintChannel::CancelJob

virtual void CancelJob ()

Interface Category:

API.

Purpose:

Cancels all job activity for the current job, if there is one. Any data or operation that has occurred up to the point of call is deleted or ignored. All data is flushed and the channel is returned to an empty state.

Calling Context:

Call this function directly to cancel an already begun print job. Also called by the Printing Framework.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TPrintChannel::PrintPage

virtual void PrintPage (const MDrawable &, const TPageDescription &)

Interface Category:

API.

Purpose:

This function draws one page of a print job. The drawable object can be as simple or as complex as needed to draw the desired page. The call generates a new clean page on which to draw the graphic.

Calling Context:

Called directly to draw a new page to be printed into a pending print job. Also called by the printing framework.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TPrintChannel::operator=

TPrintChannel & operator =(const TPrintChannel &)

Interface Category:

API.

Purpose:

Assignment operator.

Calling Context:

Called when an object is assigned to another compatible object.

Parameters:

Return Value:

A non-const reference to the left-hand side object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TPrintChannel::operator<<=

virtual TStream & operator <<= (TStream & fromwhere)

Interface Category:

API.

Purpose:

Stream-in operator.

Calling Context:

Called directly to stream in data.

Parameters:

Return Value:

Returns a reference to the stream the object streams itself in from.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TPrintChannel::operator>>=

virtual TStream & operator >>=(TStream & towhere) const

Interface Category:

API.

Purpose:

Stream-out operator.

Calling Context:

Called directly to stream out data.

Parameters:

Return Value:

Returns a reference to the stream the object streams itself out to.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.