xpcom/ds/nsISimpleEnumerator.idl

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
     2 /* This Source Code Form is subject to the terms of the Mozilla Public
     3  * License, v. 2.0. If a copy of the MPL was not distributed with this
     4  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     6 #include "nsISupports.idl"
     8 /**
     9  * Used to enumerate over elements defined by its implementor.
    10  * Although hasMoreElements() can be called independently of getNext(),
    11  * getNext() must be pre-ceeded by a call to hasMoreElements(). There is
    12  * no way to "reset" an enumerator, once you obtain one.
    13  *
    14  * @version 1.0
    15  */
    17 [scriptable, uuid(D1899240-F9D2-11D2-BDD6-000064657374)]
    18 interface nsISimpleEnumerator : nsISupports {
    19   /**
    20    * Called to determine whether or not the enumerator has
    21    * any elements that can be returned via getNext(). This method
    22    * is generally used to determine whether or not to initiate or
    23    * continue iteration over the enumerator, though it can be
    24    * called without subsequent getNext() calls. Does not affect
    25    * internal state of enumerator.
    26    *
    27    * @see getNext()
    28    * @return true if there are remaining elements in the enumerator.
    29    *         false if there are no more elements in the enumerator.
    30    */                                            
    31   boolean hasMoreElements();
    33   /**
    34    * Called to retrieve the next element in the enumerator. The "next"
    35    * element is the first element upon the first call. Must be
    36    * pre-ceeded by a call to hasMoreElements() which returns PR_TRUE.
    37    * This method is generally called within a loop to iterate over
    38    * the elements in the enumerator.
    39    *
    40    * @see hasMoreElements()
    41    * @throws NS_ERROR_FAILURE if there are no more elements
    42    *                          to enumerate.
    43    * @return the next element in the enumeration.
    44    */
    45   nsISupports getNext();
    46 };

mercurial