#include <algorithm>
#include <nsCOMArray.h>
#include <nsComponentManagerUtils.h>
#include <nsIMutableArray.h>
#include <nsISimpleEnumerator.h>
Go to the source code of this file.
|
template<class T > |
nsresult | sbCOMArrayTonsIArray (T &aCOMArray, nsIArray **aOutArray) |
|
template<class T > |
nsresult | sbAppendnsCOMArray (T const &aSource, T &aDest, PRUint32 aElementsToCopy=0) |
|
nsresult | sbAppendnsIArray (nsIArray *aSrc, nsIMutableArray *aDest, PRBool aWeak=PR_FALSE, PRUint32 aElementsToCopy=0) |
|
nsresult | sbClonensIArray (nsIArray *aSrc, nsIArray **aClonedArray, PRBool aWeak=PR_FALSE) |
|
template<class T > |
nsresult | sbClonensIArray (nsIArray *aSrc, nsCOMArray< T > &aDest) |
|
#define SB_THREADSAFE_ARRAY_CONTRACTID "@songbirdnest.com/moz/xpcom/threadsafe-array;1" |
template<class T >
nsresult sbAppendnsCOMArray |
( |
T const & |
aSource, |
|
|
T & |
aDest, |
|
|
PRUint32 |
aElementsToCopy = 0 |
|
) |
| |
nsresult sbAppendnsIArray |
( |
nsIArray * |
aSrc, |
|
|
nsIMutableArray * |
aDest, |
|
|
PRBool |
aWeak = PR_FALSE , |
|
|
PRUint32 |
aElementsToCopy = 0 |
|
) |
| |
|
inline |
Clones a nsIArray into a new one
- Parameters
-
aSrc | [in] the array to copy from |
aDest | [in|out] the array to append to |
aWeak | [in] Whether to store as a weak reference |
aElementsToCopy | [in] Allows partial appending of source. 0 means copy everything |
Definition at line 87 of file sbArrayUtils.h.
nsresult sbClonensIArray |
( |
nsIArray * |
aSrc, |
|
|
nsIArray ** |
aClonedArray, |
|
|
PRBool |
aWeak = PR_FALSE |
|
) |
| |
|
inline |
Clones a nsIArray into a new one
- Parameters
-
aSrc | [in] the array to clone |
aClonedArray | [out] the newly created array |
aWeak | [in] Whether to store as a weak reference |
Definition at line 125 of file sbArrayUtils.h.
template<class T >
nsresult sbClonensIArray |
( |
nsIArray * |
aSrc, |
|
|
nsCOMArray< T > & |
aDest |
|
) |
| |
Clones a nsIArray into a new nsCOMArray
- Parameters
-
aSrc | [in] the array to clone |
aDest | [inout] the destination array |
- Exceptions
-
NS_ERROR_NO_INTERFACE | if any element of the source array does not QI into the desired interface. Note that this will modify the destination into an inconsistent state |
Definition at line 155 of file sbArrayUtils.h.
template<class T >
nsresult sbCOMArrayTonsIArray |
( |
T & |
aCOMArray, |
|
|
nsIArray ** |
aOutArray |
|
) |
| |