Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Private Member Functions | Private Attributes | Friends
nsSelectionIterator Class Reference
Inheritance diagram for nsSelectionIterator:
Inheritance graph
[legend]
Collaboration diagram for nsSelectionIterator:
Collaboration graph
[legend]

List of all members.

Public Member Functions

NS_DECL_ISUPPORTS
NS_DECL_NSIENUMERATOR
NS_DECL_NSIBIDIRECTIONALENUMERATOR
NS_IMETHOD 
CurrentItem (nsIDOMRange **aRange)
void last ()
 Last will reset the list to the end.
void prev ()
 Prev will decrement the list.
void first ()
 First will reset the list.
void next ()
 Next will advance the list.
nsISupports currentItem ()
 CurrentItem will return the CurrentItem item it will fail if the list is empty.
void isDone ()
 return if the collection is at the end.

Private Member Functions

 nsSelectionIterator (nsTypedSelection *)
virtual ~nsSelectionIterator ()

Private Attributes

PRInt32 mIndex
nsTypedSelectionmDomSelection
SelectionType mType

Friends

class nsTypedSelection
class nsSelection

Detailed Description

Definition at line 593 of file nsSelection.cpp.


Constructor & Destructor Documentation

Definition at line 847 of file nsSelection.cpp.

:mIndex(0)
{
  if (!aList)
  {
    NS_NOTREACHED("nsSelection");
    return;
  }
  mDomSelection = aList;
}

Definition at line 860 of file nsSelection.cpp.

{
}

Member Function Documentation

nsISupports nsIEnumerator::currentItem ( ) [inherited]

CurrentItem will return the CurrentItem item it will fail if the list is empty.

Definition at line 918 of file nsSelection.cpp.

{
  if (!aItem)
    return NS_ERROR_NULL_POINTER;

  if (mIndex < 0 || mIndex >= (PRInt32)mDomSelection->mRanges.Length()) {
    return NS_ERROR_FAILURE;
  }

  return CallQueryInterface(mDomSelection->mRanges[mIndex].mRange,
                            aItem);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void nsIEnumerator::first ( ) [inherited]

First will reset the list.

will return NS_FAILED if no items

void nsIEnumerator::isDone ( ) [inherited]

return if the collection is at the end.

that is the beginning following a call to Prev and it is the end of the list following a call to next

Last will reset the list to the end.

will return NS_FAILED if no items

void nsIEnumerator::next ( ) [inherited]

Next will advance the list.

will return failed if already at end

Prev will decrement the list.

will return failed if already at beginning


Friends And Related Function Documentation

friend class nsSelection [friend]

Definition at line 613 of file nsSelection.cpp.

friend class nsTypedSelection [friend]

Definition at line 610 of file nsSelection.cpp.


Member Data Documentation

Definition at line 618 of file nsSelection.cpp.

Definition at line 617 of file nsSelection.cpp.

Definition at line 619 of file nsSelection.cpp.


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