DSIExtBookmarkSource Class Reference

An abstract class representing an iterator for relation bookmarks. More...

List of all members.

Public Member Functions

const simba_byte * GetBookmark () const
 Retrieve a pointer to data for the current bookmark.
const IBookmarkComparatorGetBookmarkComparator () const
 Gets the bookmark comparator object for the bookmarks returned by GetBookmark().
virtual bool IsInBookmarkComparatorOrder () const =0
 Whether the bookmarks returned from this object are sorted w.r.t. to the associated bookmark comparator.
virtual bool MoveNext ()=0
 Moves to the next bookmark.
virtual bool MustRespectOrder () const =0
 Whether rows from a DSIExtResultSet which has this object set on it must be returned in the same order as the associated bookmarks are returned from this object.
virtual bool Reset ()=0
 Resets the bookmark source so that it may be traversed again.
virtual ~DSIExtBookmarkSource ()
 Virtual destructor.

Protected Member Functions

 DSIExtBookmarkSource (const IBookmarkComparator *in_bookmarkComparator)
 Constructor.

Protected Attributes

const simba_byte * m_currBookmark
 A pointer to data for the current bookmark. (NOT OWN).

Detailed Description

An abstract class representing an iterator for relation bookmarks.

This class is used by (see DSIExtResultSet::SetBookmarkSource()) to specify a list of rows the resultset should iterate through.

                      ------------------> GetBookmark() - 
                      | (returns true)                   |
        MoveNext() ---|                                  |
            ^         | (returns false)                  |
            |         ------------------> Reset() ------>|
            ----------------------------------------------
        

Constructor & Destructor Documentation

virtual ~DSIExtBookmarkSource (  )  [inline, virtual]

Virtual destructor.

DSIExtBookmarkSource ( const IBookmarkComparator in_bookmarkComparator  )  [inline, protected]

Constructor.

Parameters:
in_bookmarkComparator The bookmark comparator which can be used to compare this object's bookmarks. (NOT OWN)
Exceptions:
SEInvalidArgumentException if in_bookmarkComparator is NULL.

Member Function Documentation

const simba_byte* GetBookmark (  )  const [inline]

Retrieve a pointer to data for the current bookmark.

The size of the bookmark should always be that of returned by this->GetBookmarkComparator()->GetBookmarkSize().

The lifetime of the returned pointer is until the next call to MoveNext(), Reset(), or until this object is destroyed.

Exceptions:
SEInvalidOperationException If SupportsTableBookmarks() returns false, or this index is not positioned on a row.
Returns:
A pointer to a buffer holding the bookmark data for the current row. (NOT OWN)
const IBookmarkComparator* GetBookmarkComparator (  )  const [inline]

Gets the bookmark comparator object for the bookmarks returned by GetBookmark().

Returns:
The bookmark comparator object for the bookmarks returned by GetBookmark(). (NOT OWN)
virtual bool IsInBookmarkComparatorOrder (  )  const [pure virtual]

Whether the bookmarks returned from this object are sorted w.r.t. to the associated bookmark comparator.

Returns:
True if the bookmarks returned from this object are sorted w.r.t. to the associated bookmark comparator, False otherwise.
virtual bool MoveNext (  )  [pure virtual]

Moves to the next bookmark.

Returns:
True if there was another bookmark, false otherwise.
virtual bool MustRespectOrder (  )  const [pure virtual]

Whether rows from a DSIExtResultSet which has this object set on it must be returned in the same order as the associated bookmarks are returned from this object.

Returns:
True if a DSIExtResultSet, when it has this object set on it, must traverse its rows in the same order as the bookmarks returned from this object. False otherwise.
virtual bool Reset (  )  [pure virtual]

Resets the bookmark source so that it may be traversed again.

Note: The return value of this function denotes whether the list of bookmarks returned from this object will be the same after the reset, as it was the last time it was iterated through. This is for caching purposes, as if the results of the previous iteration through this object were cached, and Reset() returns False, that cache may be reused instead of iterating through this object directly.

This method may return different values on distinct invocations, so this cacheability may not be 'forever'.

Returns:
True if the bookmark source will return a different set of bookmarks this time, False otherwise.

Member Data Documentation

const simba_byte* m_currBookmark [protected]

A pointer to data for the current bookmark. (NOT OWN).

Should be NULL if the bookmark source is not currently positioned on a row. That is, either the last MoveNext() returned false, or there has not been a call to MoveNext() since the last Reset(), or since this object was constructed.

The DSIExtBookmarkSource implementation is responsible for updating m_currBookmark on every call to MoveNext() and Reset().


The documentation for this class was generated from the following file:

Generated on Wed May 17 14:21:17 2017 for SimbaEngine 10.1.3.1011 by simba