Class: TStandardResolution

Declaration: Printer.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TResolution

Inherited By:

None.

Purpose:

This is one concrete example of a TResolution object that is quite general. It can be used by developers for their own device handlers to provide a set of TResolutionRanges, or clients are free to derive their own. This class allows various ranges to be added or removed by a client to create a completely personalized set for any printer or device.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

This class is not intended for general derivation. If clients wish to create a resolution set, use TResolution as the base class.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Other Considerations:

None.

Member Function: TStandardResolution::TStandardResolution

  1. TStandardResolution (const TToken & name)
  2. TStandardResolution (const TToken & name, TResolutionRange * resolutionRange)
  3. TStandardResolution ()
  4. TStandardResolution (const TStandardResolution &)

Interface Category:

API.

Purpose:

  1. Client named default constructor.
  2. Client named constructor for a specific resolution range.
  3. Default constructor.
  4. Copy constructor.

Calling Context:

  1. Called to create a default resolution object with a personalized name for the client.
  2. Called to create a personalized object with a specific range.
  3. Called by the stream-in operators and deriving classes.
  4. 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: TStandardResolution::~TStandardResolution

virtual ~ TStandardResolution ()

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: TStandardResolution::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: TStandardResolution::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: TStandardResolution::Hash

virtual long Hash () const

Interface Category:

API.

Purpose:

Hash function used by collections.

Calling Context:

Called by collection classes.

Parameters:

Return Value:

Returns a semi unique hash value for this object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TStandardResolution::GetName

virtual TToken GetName () const

Interface Category:

API.

Purpose:

Retrieves the clients or owners name for this object.

Calling Context:

Called to get the name of this object.

Parameters:

Return Value:

Returns the name of the object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TStandardResolution::Add

void Add (TResolutionRange * resolutionRange)

Interface Category:

API.

Purpose:

Called to add a resolution range to the object. The resolution range is adopted and becomes the property of this class.

Calling Context:

Called to add a new range to the object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TStandardResolution::Delete

void Delete (const TResolutionRange & resolutionRange)

Interface Category:

API.

Purpose:

Called to remove a specific range from the object.

Calling Context:

Called to remove a specific range from the object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TStandardResolution::DeleteAll

void DeleteAll ()

Interface Category:

API.

Purpose:

All resolution ranges contained in this object are removed and deleted.

Calling Context:

Called to empty the resolution object of all resolution ranges.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TStandardResolution::CreateResolutionRangeIterator

TIteratorOver < TResolutionRange > * CreateResolutionRangeIterator () const

Interface Category:

API.

Purpose:

Creates a range iterator that can be used to parse or examine all the resolution range objects contained in this class object.

Calling Context:

Called to obtain an iterator of all ranges available.

Parameters:

Return Value:

Returns the iterator created.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

The created range iterator is owned by the calling client who is then responsible for deleting it.

Member Function: TStandardResolution::MatchResolution

virtual TGPoint MatchResolution (const TGPoint & resolution) const

Interface Category:

API.

Purpose:

Given a desired resolution, this function returns the closest match to that resolution that is contained in this object.

Calling Context:

Called to find the closest match to a given resolution.

Parameters:

Return Value:

Returns the closest match to the given resolution.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TStandardResolution::operator=

TStandardResolution & operator =(const TStandardResolution &)

Interface Category:

API.

Purpose:

Assignment operator.

Calling Context:

Called when an object is assigned to another compatible object.

Parameters:

Return Value:

A reference to the left-hand side object.

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.