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.
- TResolutionRange (const TGPoint & singleValueResolution)
- TResolutionRange (const TGPoint & min, const TGPoint & max, const TGPoint & step)
- TResolutionRange (const TResolutionRange & resolution)
- TResolutionRange ()
Interface Category:
API.
Purpose:
- Creates a resolution range with a single resolution value.
- Creates a resolution range between a minimum and maximum value.
- Copy constructor.
- Default constructor.
Calling Context:
- Called to construct a single valued range.
- Called to construct a multiple valued range.
- Called to copy an object.
- Called by the stream-in operators.
Parameters:
- const TGPoint & singleValueResolution -A single value to represent the range.
- const TGPoint & min -Represents the lowest bound of a range.
- const TGPoint & max -Represents the highest bound of a range.
- const TGPoint & step -Defines the quantum step between valid values within the minimum and maximum values.
- const TResolutionRange & resolution -The resolution range to copy.
- Takes no parameters.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
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.
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.
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.
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.
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.
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:
- const TGPoint & resolution -The range requested.
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:
- const TGPoint & resolution -The resolution to match.
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.