Class: TPrinter

Declaration: Printer.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

MBasePrinter

Inherited By:

None.

Purpose:

TPrinter is a class that represents a physical printer. Because you do not normally have knowledge about availability, location, or administration of printers, do not instantiate TPrinter objects directly. Instead, get them from the system, which provides printers to clients upon request or as required by the printing process. A TPrinter provides information about a specific printer, such as available page descriptions, but it is mainly used as the target of print operations. Print operations are called print jobs, or simply jobs. To begin a print operation, you must get a print job description from a TPrinter object and use it to specify how to print and where to target the output. The job description, obtained from the printer, can be combined with a client job description, which, in turn can be used to print a complete job.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

Nothing special.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TPrinter::TPrinter

  • TPrinter (const TPrinter &)
  • TPrinter (TPrinter :: ESpecialPrinterValue)
  • TPrinter ()
  • Interface Category:

    API.

    Purpose:

    1. Copy constructor.
    2. Special constructor used to create the system printer.
    3. Default constructor.

    Calling Context:

    1. Called to copy an object.
    2. Called to create a default system printer.
    3. Only for internal use by Resurrect. Developers should treat as protected.

    Parameters:

    Return Value:

    None.

    Exceptions:

    Throws no exceptions, passes all exceptions through.

    Concurrency:

    Not multithread safe.

    Other Considerations:

    None.

    Member Function: TPrinter::~TPrinter

    virtual ~ TPrinter ()

    Interface Category:

    API.

    Purpose:

    Destructor.

    Calling Context:

    Called to destroy an object.

    Parameters:

    Return Value:

    None.

    Exceptions:

    Throws no exceptions, passes all exceptions through.

    Concurrency:

    Not multithread safe.

    Other Considerations:

    None.

    Member Function: TPrinter::CopyName

    virtual TStandardText * CopyName () const

    Interface Category:

    API.

    Purpose:

    Returns the name of this printer.

    Calling Context:

    Call this function directly.

    Parameters:

    Return Value:

    Returns a pointer to the TStandardText containing the printer name. Clients must delete this pointer when done.

    Exceptions:

    Throws no exceptions, passes all exceptions through.

    Concurrency:

    Not multithread safe.

    Other Considerations:

    None.

    Member Function: TPrinter::CreateDefaultPageDescription

    virtual TPageDescription * CreateDefaultPageDescription ()

    Interface Category:

    API.

    Purpose:

    Returns the default page description (TPageDescription) for this printer.

    Calling Context:

    Call this function directly.

    Parameters:

    Return Value:

    A pointer to a TPageDescription that clients must delete when done.

    Exceptions:

    Throws no exceptions, passes all exceptions through.

    Concurrency:

    Not multithread safe.

    Other Considerations:

    None.

    Member Function: TPrinter::CreateCurrentPageDescription

    virtual TPageDescription * CreateCurrentPageDescription ()

    Interface Category:

    API.

    Purpose:

    Returns the current page description (TPageDescription) for this printer.

    Calling Context:

    Call this function directly.

    Parameters:

    Return Value:

    A pointer to a TPageDescription that clients must delete when done.

    Exceptions:

    Throws no exceptions, passes all exceptions through.

    Concurrency:

    Not multithread safe.

    Other Considerations:

    None.

    Member Function: TPrinter::CreatePageDescriptionIterator

    virtual TPageDescriptionIterator * CreatePageDescriptionIterator () const

    Interface Category:

    API.

    Purpose:

    Returns an iterator for TPageDescriptions available on this printer.

    Calling Context:

    Call this function directly.

    Parameters:

    Return Value:

    A pointer to a TPageDescriptionIterator that clients must delete when done.

    Exceptions:

    Throws no exceptions, passes all exceptions through.

    Concurrency:

    Not multithread safe.

    Other Considerations:

    None.

    Member Function: TPrinter::CreatePrintMediaIterator

    virtual TPrintMediaIterator * CreatePrintMediaIterator () const

    Interface Category:

    API.

    Purpose:

    Returns an iterator for TPrintMedias available on this printer.

    Calling Context:

    Call this function directly.

    Parameters:

    Return Value:

    A pointer to a TPrintMediaIterator that clients must delete when done.

    Exceptions:

    Throws no exceptions, passes all exceptions through.

    Concurrency:

    Not multithread safe.

    Other Considerations:

    None.

    Member Function: TPrinter::CreateSourceTrayIterator

    virtual TSourceTrayIterator * CreateSourceTrayIterator () const

    Interface Category:

    API.

    Purpose:

    Returns an iterator for TSourceTrays available on this printer.

    Calling Context:

    Call this function directly.

    Parameters:

    Return Value:

    A pointer to a TSourceTrayIterator that clients must delete when done.

    Exceptions:

    Throws no exceptions, passes all exceptions through.

    Concurrency:

    Not multithread safe.

    Other Considerations:

    None.

    Member Function: TPrinter::CreateDocumentFinishIterator

    virtual TDocumentFinishIterator * CreateDocumentFinishIterator () const

    Interface Category:

    API.

    Purpose:

    Returns an iterator for TDocumentFinishes available on this printer.

    Calling Context:

    Call this function directly.

    Parameters:

    Return Value:

    A pointer to a TDocumentFinishIterator that clients must delete when done.

    Exceptions:

    Throws no exceptions, passes all exceptions through.

    Concurrency:

    Not multithread safe.

    Other Considerations:

    None.

    Member Function: TPrinter::CreateDestinationBinIterator

    virtual TDestinationBinIterator * CreateDestinationBinIterator () const

    Interface Category:

    API.

    Purpose:

    Returns an iterator for TDestinationBins available on this printer.

    Calling Context:

    Call this function directly.

    Parameters:

    Return Value:

    A pointer to a TDestinationBinIterator that clients must delete when done.

    Exceptions:

    Throws no exceptions, passes all exceptions through.

    Concurrency:

    Not multithread safe.

    Other Considerations:

    None.

    Member Function: TPrinter::CreateResolutionIterator

    virtual TIteratorOver < TResolutionRange > * CreateResolutionIterator () const

    Interface Category:

    API.

    Purpose:

    This function creates an iterator that can be used to interrogate a device for the possible resolution ranges available on it. The iterator created might have only one resolution if that's all capability the device has.

    Calling Context:

    Called directly to acquire a collection of available resolutions on a device.

    Parameters:

    Return Value:

    A pointer to a resolution iterator is returned which is then owned by the caller.

    Exceptions:

    Throws no exceptions, passes all exceptions through.

    Concurrency:

    Not multithread safe.

    Other Considerations:

    None.

    Member Function: TPrinter::CreateJobDescription

    virtual TDeviceJobDescription * CreateJobDescription () const

    Interface Category:

    API.

    Purpose:

    Returns the device job description object (TDeviceJobDescription) for this printer.

    Calling Context:

    Call this function directly.

    Parameters:

    Return Value:

    None.

    Exceptions:

    Throws no exceptions, passes all exceptions through.

    Concurrency:

    Not multithread safe.

    Other Considerations:

    None.

    Member Function: TPrinter::CopyAllJobs

    virtual void CopyAllJobs (TPrintJobCollection &) const

    Interface Category:

    API.

    Purpose:

    Copies all TPrintJobHandles in the collection supplied.

    Calling Context:

    Call this function directly.

    Parameters:

    Return Value:

    None.

    Exceptions:

    Throws no exceptions, passes all exceptions through.

    Concurrency:

    Not multithread safe.

    Other Considerations:

    None.

    Member Function: TPrinter::CancelAllJobs

    virtual void CancelAllJobs ()

    Interface Category:

    API.

    Purpose:

    Cancels all print jobs in this printers queue.

    Calling Context:

    Call this function directly.

    Parameters:

    Return Value:

    None.

    Exceptions:

    Throws no exceptions, passes all exceptions through.

    Concurrency:

    Not multithread safe.

    Other Considerations:

    None.

    Member Function: TPrinter::DeferAllJobs

    virtual void DeferAllJobs ()

    Interface Category:

    API.

    Purpose:

    Defers all jobs in this printers queue indefinitely.

    Calling Context:

    Call this function directly.

    Parameters:

    Return Value:

    None.

    Exceptions:

    Throws no exceptions, passes all exceptions through.

    Concurrency:

    Not multithread safe.

    Other Considerations:

    None.

    Member Function: TPrinter::DeferAllJobsUntil

    virtual void DeferAllJobsUntil (const TTime & when)

    Interface Category:

    API.

    Purpose:

    Defers all jobs in this printers queue until the specified time.

    Calling Context:

    Call this function directly.

    Parameters:

    Return Value:

    None.

    Exceptions:

    Throws no exceptions, passes all exceptions through.

    Concurrency:

    Not multithread safe.

    Other Considerations:

    None.

    Member Function: TPrinter::UndeferAllJobs

    virtual void UndeferAllJobs ()

    Interface Category:

    API.

    Purpose:

    Resumes all jobs. Makes them all ready to print.

    Calling Context:

    Call this function directly.

    Parameters:

    Return Value:

    None.

    Exceptions:

    Throws no exceptions, passes all exceptions through.

    Concurrency:

    Not multithread safe.

    Other Considerations:

    None.

    Member Function: TPrinter::AddJob

    virtual void AddJob (TPrintJobHandle & job)

    Interface Category:

    API.

    Purpose:

    Adds a print job to the printers queue.

    Calling Context:

    Call this function directly.

    Parameters:

    Return Value:

    None.

    Exceptions:

    Throws no exceptions, passes all exceptions through.

    Concurrency:

    Not multithread safe.

    Other Considerations:

    None.

    Member Function: TPrinter::RemoveJob

    virtual void RemoveJob (TPrintJobHandle & job)

    Interface Category:

    API.

    Purpose:

    Removes the given print job from the queue.

    Calling Context:

    Call this function directly.

    Parameters:

    Return Value:

    None.

    Exceptions:

    Throws no exceptions, passes all exceptions through.

    Concurrency:

    Not multithread safe.

    Other Considerations:

    None.

    Member Function: TPrinter::PauseJob

    virtual void PauseJob (TPrintJobHandle &)

    Interface Category:

    API.

    Purpose:

    Pauses the given print job.

    Calling Context:

    Call this function directly.

    Parameters:

    Return Value:

    None.

    Exceptions:

    Throws no exceptions, passes all exceptions through.

    Concurrency:

    Not multithread safe.

    Other Considerations:

    None.

    Member Function: TPrinter::DeferJob

    virtual void DeferJob (TPrintJobHandle &)

    Interface Category:

    API.

    Purpose:

    Defers the given print job.

    Calling Context:

    Call this function directly.

    Parameters:

    Return Value:

    None.

    Exceptions:

    Throws no exceptions, passes all exceptions through.

    Concurrency:

    Not multithread safe.

    Other Considerations:

    None.

    Member Function: TPrinter::DeferJobUntil

    virtual void DeferJobUntil (TPrintJobHandle &, const TTime &)

    Interface Category:

    API.

    Purpose:

    Defers the given print job until a certain time.

    Calling Context:

    Call this function directly.

    Parameters:

    Return Value:

    None.

    Exceptions:

    Throws no exceptions, passes all exceptions through.

    Concurrency:

    Not multithread safe.

    Other Considerations:

    None.

    Member Function: TPrinter::UndeferJob

    virtual void UndeferJob (TPrintJobHandle &)

    Interface Category:

    API.

    Purpose:

    Resumes the given job.

    Calling Context:

    Call this function directly.

    Parameters:

    Return Value:

    None.

    Exceptions:

    Throws no exceptions, passes all exceptions through.

    Concurrency:

    Not multithread safe.

    Other Considerations:

    None.

    Member Function: TPrinter::operator=

    TPrinter & operator =(const TPrinter &)

    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: TPrinter::operator<<=

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

    Interface Category:

    API.

    Purpose:

    Stream-in operator.

    Calling Context:

    Called 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: TPrinter::operator>>=

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

    Interface Category:

    API.

    Purpose:

    Stream-out operator.

    Calling Context:

    Called 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.

    Member Function: TPrinter::IsEqual

    virtual bool IsEqual (const MCollectible *) const

    Interface Category:

    API.

    Purpose:

    Compares two objects for equality.

    Calling Context:

    Called to compare compatible objects.

    Parameters:

    Return Value:

    Returns true if the objects match.

    Exceptions:

    Throws no exceptions, passes all exceptions through.

    Concurrency:

    Not multithread safe.

    Other Considerations:

    None.

    Member Function: TPrinter::Hash

    virtual long Hash () const

    Interface Category:

    API.

    Purpose:

    Generates a hash value.

    Calling Context:

    Called to generate a hash value.

    Parameters:

    Return Value:

    A long hash value.

    Exceptions:

    Throws no exceptions, passes all exceptions through.

    Concurrency:

    Not multithread safe.

    Other Considerations:

    None.

    Member Function: TPrinter::Match

    virtual EPrinterMatch Match (const TPrinter &) const

    Interface Category:

    API.

    Purpose:

    Compares two printers and returns an indication as to how good a match they are.

    Calling Context:

    Call this function directly.

    Parameters:

    Return Value:

    Returns one of the EPrinterMatch enumeration values.

    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.