Class: TEvenPageRange

Declaration: HighLevelPrint.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TPageRange

Inherited By:

None.

Purpose:

A constant class whose page range only contains even pages up to the limit of TPageRange::kPageCountLimit. Its contents cannot be modified but it can be used to modify other page ranges.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

This class is not intended to be derived. To change its behavior, it is better to derive directly from TPageRange.

Concurrency:

Multithread safe.

Resource Use:

No special requirements.

Member Function: TEvenPageRange::TEvenPageRange

  1. TEvenPageRange ()
  2. TEvenPageRange (const TEvenPageRange &)

Interface Category:

API.

Purpose:

  1. Default constructor. Produces a valid TEvenPageRange.
  2. Copy constructor. Standard copy constructor.

Calling Context:

  1. Called by the stream-in operators and to construct a valid object.
  2. Called to copy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TEvenPageRange::~TEvenPageRange

virtual ~ TEvenPageRange ()

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:

Multithread safe.

Other Considerations:

None.

Member Function: TEvenPageRange::IsEmpty

virtual bool IsEmpty () const

Interface Category:

API.

Purpose:

Determines if a page range is empty. Always returns false.

Calling Context:

Called directly to polymorphically determine if a page range is empty.

Parameters:

Return Value:

Never returns true because there are always even pages.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TEvenPageRange::IsFull

virtual bool IsFull () const

Interface Category:

API.

Purpose:

Determines if a page range is full. Always returns false.

Calling Context:

Called directly to polymorphically determine if a page range is full.

Parameters:

Return Value:

Never returns true because odd pages are never in the range.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TEvenPageRange::IsPageInRange

virtual bool IsPageInRange (unsigned long pageNumber) const

Interface Category:

API.

Purpose:

Returns true if the page number is even, false otherwise.

Calling Context:

Called directly to determine if a page number is within the range.

Parameters:

Return Value:

Returns true if the page number is even.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TEvenPageRange::IsNthPageInRange

virtual bool IsNthPageInRange (unsigned long & pageNumber) const

Interface Category:

API.

Purpose:

Determines if there are a given number of pages within the range and returns the actual page number of that page.

Calling Context:

Called directly to determine if there are a given number of pages within the range, and, if so, to return the actual page number of that page.

Parameters:

Return Value:

Returns true if the Nth page in the range exists.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TEvenPageRange::GetPageCountInRange

virtual unsigned long GetPageCountInRange () const

Interface Category:

API.

Purpose:

Returns the total number of pages in the range, TPageRange::kPageCountLimit/2 + 1.

Calling Context:

Called directly to determine the total number of pages in the range.

Parameters:

Return Value:

Returns the total number of pages in the range.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TEvenPageRange::GetFirstPageInRange

virtual unsigned long GetFirstPageInRange () const

Interface Category:

API.

Purpose:

Determines the page number of the first page in the range. If there are no pages in the range (the range is empty), then the result is undefined.

Calling Context:

Called directly to polymorphically determine the page number of the first page in the range.

Parameters:

Return Value:

Returns the first even page number, which is zero.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

If there are no pages in the range (the range is empty), then the result is undefined.

Member Function: TEvenPageRange::GetLastPageInRange

virtual unsigned long GetLastPageInRange () const

Interface Category:

API.

Purpose:

Determines the page number of the last page in the range. If there are no pages in the range (the range is empty), then the result is undefined.

Calling Context:

Called directly to polymorphically determine the page number of the last page in the range.

Parameters:

Return Value:

Returns the last even page number, which is TPageRange::kLastPageNumber if it is even or TPageRange::kLastPageNumber -1 if TPageRange::kLastPageNumber is odd.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

If there are no pages in the range (the range is empty), then the result is undefined.

Member Function: TEvenPageRange::operator=

TEvenPageRange & operator =(const TEvenPageRange &)

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:

Multithread safe.

Other Considerations:

None.

Member Function: TEvenPageRange::Hash

virtual long Hash () const

Interface Category:

API.

Purpose:

Generates a hash value.

Calling Context:

Called directly and when placed in a collection.

Parameters:

Return Value:

A hash value.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TEvenPageRange::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:

Multithread safe.

Other Considerations:

None.

Member Function: TEvenPageRange::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:

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.