no bug - Bumping Firefox l10n changesets r=release a=l10n-bump DONTBUILD CLOSED TREE
[gecko.git] / xpcom / ds / nsArrayEnumerator.h
bloba406a9ea66f6b6a13cc2dd9018f8e58967869832
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef nsArrayEnumerator_h__
8 #define nsArrayEnumerator_h__
10 // enumerator implementation for nsIArray
12 #include "nsISupports.h"
14 class nsISimpleEnumerator;
15 class nsIArray;
16 class nsCOMArray_base;
18 // Create an enumerator for an existing nsIArray implementation
19 // The enumerator holds an owning reference to the array.
20 nsresult NS_NewArrayEnumerator(nsISimpleEnumerator** aResult, nsIArray* aArray,
21 const nsID& aEntryIID = NS_GET_IID(nsISupports));
23 // create an enumerator for an existing nsCOMArray<T> implementation
24 // The enumerator will hold an owning reference to each ELEMENT in
25 // the array. This means that the nsCOMArray<T> can safely go away
26 // without its objects going away.
27 nsresult NS_NewArrayEnumerator(nsISimpleEnumerator** aResult,
28 const nsCOMArray_base& aArray,
29 const nsID& aEntryIID = NS_GET_IID(nsISupports));
31 #endif