Class: TOddPageRange

Declaration: HighLevelPrint.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TPageRange

Inherited By:

None.

Purpose:

This is a page range containing only odd pages up to the limit of TPageRange::kPageCountLimit. It is a constant class whose contents cannot be modified.

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. However, it is still possible to change this class by a derived class without too much difficulty.

Concurrency:

Multithread safe.

Resource Use:

No special requirements.

Member Function: TOddPageRange::TOddPageRange

  1. TOddPageRange ()
  2. TOddPageRange (const TOddPageRange &)

Interface Category:

API.

Purpose:

  1. Default constructor. Creates a valid odd page range.
  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: TOddPageRange::~TOddPageRange

virtual ~ TOddPageRange ()

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: TOddPageRange::IsEmpty

virtual bool IsEmpty () const

Interface Category:

API.

Purpose:

Determines if a page range is empty. Because this class is never empty, this function 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 some odd pages.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TOddPageRange::IsFull

virtual bool IsFull () const

Interface Category:

API.

Purpose:

Determines if a page range is full. Returns false.

Calling Context:

Called directly to determine if a page range is full, which it never is.

Parameters:

Return Value:

Never returns true because not all pages are odd.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TOddPageRange::IsPageInRange

virtual bool IsPageInRange (unsigned long pageNumber) const

Interface Category:

API.

Purpose:

Returns true if pageNumber is odd.

Calling Context:

Called directly to determine when a particular page number is in the range.

Parameters:

Return Value:

Returns true if the page number is in the range.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TOddPageRange::IsNthPageInRange

virtual bool IsNthPageInRange (unsigned long & pageNumber) const

Interface Category:

API.

Purpose:

Determines if at least a given number of pages are in the range and obtains the actual page number of that page.

Calling Context:

Called directly to determine if at least a given number of pages are in the range and to obtain 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: TOddPageRange::GetPageCountInRange

virtual unsigned long GetPageCountInRange () const

Interface Category:

API.

Purpose:

Gets the total number of pages in the range.

Calling Context:

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

Parameters:

Return Value:

Returns the total number of pages that are odd. (Returns TPageRange::kPageCountLimit/2).

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TOddPageRange::GetFirstPageInRange

virtual unsigned long GetFirstPageInRange () const

Interface Category:

API.

Purpose:

Gets 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 return the page number of the first page in the range.

Parameters:

Return Value:

Returns the first odd page number, which is one.

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: TOddPageRange::GetLastPageInRange

virtual unsigned long GetLastPageInRange () const

Interface Category:

API.

Purpose:

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

Calling Context:

Called directly to return the last page within the range.

Parameters:

Return Value:

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

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

TOddPageRange & operator =(const TOddPageRange &)

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

virtual long Hash () const

Interface Category:

API.

Purpose:

Generates a hash value.

Calling Context:

Called directly and by the collection framework 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: TOddPageRange::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: TOddPageRange::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.