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.
- TOddPageRange ()
- TOddPageRange (const TOddPageRange &)
Interface Category:
API.
Purpose:
- Default constructor. Creates a valid odd page range.
- Copy constructor. Standard copy constructor.
Calling Context:
- Called by the stream-in operators and to construct a valid object.
- Called to copy an object.
Parameters:
- Takes no parameters.
- const TOddPageRange & -The page range to copy.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
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.
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.
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:
- unsigned long pageNumber -The number of the page to check if it is in the range.
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:
- unsigned long & pageNumber -This is the Nth page number expected to be in the range. If this number, counting only pages in the range, is in the range, the parameter is changed to be the actual page number.
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.
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:
- TStream & fromWhere -The stream the object streams itself in from.
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:
- TStream & toWhere -The stream the object streams itself out to.
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.