Class: TResolutionRange

Declaration: Printer.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

MCollectible

Inherited By:

None.

Purpose:

Used to represent a simple continuous range of resolutions that a given device can produce. The range can be used to represent a single value or a continuous range of values from one minimum to one maximum. Discontinuous ranges can be represented by adding several resolution ranges to a TStandardResolution (or some other derived class of TResolution) capable of creating an iterator of all possible ranges.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

It is usually not necessary to derive from this class but clients can create their own versions if desired.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Other Considerations:

None.

Member Function: TResolutionRange::TResolutionRange

  1. TResolutionRange (const TGPoint & singleValueResolution)
  2. TResolutionRange (const TGPoint & min, const TGPoint & max, const TGPoint & step)
  3. TResolutionRange (const TResolutionRange & resolution)
  4. TResolutionRange ()

Interface Category:

API.

Purpose:

  1. Creates a resolution range with a single resolution value.
  2. Creates a resolution range between a minimum and maximum value.
  3. Copy constructor.
  4. Default constructor.

Calling Context:

  1. Called to construct a single valued range.
  2. Called to construct a multiple valued range.
  3. Called to copy an object.
  4. Called by the stream-in operators.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TResolutionRange::operator=

TResolutionRange & operator =(const TResolutionRange & resolution)

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.

Member Function: TResolutionRange::~TResolutionRange

virtual ~ TResolutionRange ()

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

virtual long Hash () const

Interface Category:

API.

Purpose:

Generates hash value for this object.

Calling Context:

Called by collections to obtain a semi unique hash value.

Parameters:

Return Value:

Returns a semi unique value.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TResolutionRange::GetMaximumResolution

TGPoint GetMaximumResolution () const

Interface Category:

API.

Purpose:

Returns the maximum range value.

Calling Context:

Called directly to obtain the maximum range.

Parameters:

Return Value:

Returns the maximum range value.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TResolutionRange::GetMinimumResolution

TGPoint GetMinimumResolution () const

Interface Category:

API.

Purpose:

Returns the minimum range value.

Calling Context:

Called directly to obtain the minimum range.

Parameters:

Return Value:

Returns the minimum range value.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TResolutionRange::GetResolutionStep

TGPoint GetResolutionStep () const

Interface Category:

API.

Purpose:

Provides access to the quantum step between range values in this range.

Calling Context:

Called to obtain the difference between successive range values in this range.

Parameters:

Return Value:

Returns the magnitude of the difference between range values in this range.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TResolutionRange::IsInRange

bool IsInRange (const TGPoint & resolution) const

Interface Category:

API.

Purpose:

Returns whether or not a given resolution is within this range.

Calling Context:

Called to check whether a given resolution is within the bounds of this range.

Parameters:

Return Value:

Returns true if the resolution provided is between the minimum and maximum values of the range.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TResolutionRange::MatchResolution

virtual TGPoint MatchResolution (const TGPoint & resolution) const

Interface Category:

API.

Purpose:

This function provides a resolution that is contained in this range which is closest to the given resolution provided.

Calling Context:

Called to obtain the closest match to the resolution provided.

Parameters:

Return Value:

Returns the closest match to the given resolution that is contained in this range.

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.