Back to index

lightning-sunbird  0.9+nobinonly
Classes | Functions
nsStringEnumerator.cpp File Reference
#include "nsStringEnumerator.h"
#include "prtypes.h"
#include "nsCRT.h"
#include "nsString.h"
#include "nsReadableUtils.h"
#include "nsISimpleEnumerator.h"
#include "nsSupportsPrimitives.h"

Go to the source code of this file.

Classes

class  nsStringEnumerator

Functions

 NS_IMPL_ISUPPORTS3 (nsStringEnumerator, nsIStringEnumerator, nsIUTF8StringEnumerator, nsISimpleEnumerator) NS_IMETHODIMP nsStringEnumerator
template<class T >
static nsresult StringEnumeratorTail (T **aResult)
NS_COM nsresult NS_NewStringEnumerator (nsIStringEnumerator **aResult, const nsStringArray *aArray, nsISupports *aOwner)
NS_COM nsresult NS_NewUTF8StringEnumerator (nsIUTF8StringEnumerator **aResult, const nsCStringArray *aArray, nsISupports *aOwner)
NS_COM nsresult NS_NewAdoptingStringEnumerator (nsIStringEnumerator **aResult, nsStringArray *aArray)
NS_COM nsresult NS_NewAdoptingUTF8StringEnumerator (nsIUTF8StringEnumerator **aResult, nsCStringArray *aArray)
NS_COM nsresult NS_NewStringEnumerator (nsIStringEnumerator **aResult, const nsStringArray *aArray)
NS_COM nsresult NS_NewUTF8StringEnumerator (nsIUTF8StringEnumerator **aResult, const nsCStringArray *aArray)

Function Documentation

Definition at line 114 of file nsStringEnumerator.cpp.

{
    NS_ENSURE_ARG_POINTER(aResult);
    *aResult = mIndex < Count();
    return NS_OK;
}
NS_COM nsresult NS_NewAdoptingStringEnumerator ( nsIStringEnumerator **  aResult,
nsStringArray *  aArray 
)

Definition at line 218 of file nsStringEnumerator.cpp.

{
    NS_ENSURE_ARG_POINTER(aResult);
    NS_ENSURE_ARG_POINTER(aArray);
    
    *aResult = new nsStringEnumerator(aArray, PR_TRUE);
    return StringEnumeratorTail(aResult);
}

Here is the call graph for this function:

Here is the caller graph for this function:

NS_COM nsresult NS_NewAdoptingUTF8StringEnumerator ( nsIUTF8StringEnumerator **  aResult,
nsCStringArray *  aArray 
)

Definition at line 229 of file nsStringEnumerator.cpp.

{
    NS_ENSURE_ARG_POINTER(aResult);
    NS_ENSURE_ARG_POINTER(aArray);
    
    *aResult = new nsStringEnumerator(aArray, PR_TRUE);
    return StringEnumeratorTail(aResult);
}

Here is the call graph for this function:

Here is the caller graph for this function:

NS_COM nsresult NS_NewStringEnumerator ( nsIStringEnumerator **  aResult,
const nsStringArray *  aArray,
nsISupports *  aOwner 
)

Definition at line 195 of file nsStringEnumerator.cpp.

{
    NS_ENSURE_ARG_POINTER(aResult);
    NS_ENSURE_ARG_POINTER(aArray);
    
    *aResult = new nsStringEnumerator(aArray, aOwner);
    return StringEnumeratorTail(aResult);
}

Here is the call graph for this function:

Here is the caller graph for this function:

NS_COM nsresult NS_NewStringEnumerator ( nsIStringEnumerator **  aResult,
const nsStringArray *  aArray 
)

Definition at line 241 of file nsStringEnumerator.cpp.

{
    NS_ENSURE_ARG_POINTER(aResult);
    NS_ENSURE_ARG_POINTER(aArray);
    
    *aResult = new nsStringEnumerator(aArray, PR_FALSE);
    return StringEnumeratorTail(aResult);
}

Here is the call graph for this function:

NS_COM nsresult NS_NewUTF8StringEnumerator ( nsIUTF8StringEnumerator **  aResult,
const nsCStringArray *  aArray,
nsISupports *  aOwner 
)

Definition at line 207 of file nsStringEnumerator.cpp.

{
    NS_ENSURE_ARG_POINTER(aResult);
    NS_ENSURE_ARG_POINTER(aArray);
    
    *aResult = new nsStringEnumerator(aArray, aOwner);
    return StringEnumeratorTail(aResult);
}

Here is the call graph for this function:

Here is the caller graph for this function:

NS_COM nsresult NS_NewUTF8StringEnumerator ( nsIUTF8StringEnumerator **  aResult,
const nsCStringArray *  aArray 
)

Definition at line 252 of file nsStringEnumerator.cpp.

{
    NS_ENSURE_ARG_POINTER(aResult);
    NS_ENSURE_ARG_POINTER(aArray);
    
    *aResult = new nsStringEnumerator(aArray, PR_FALSE);
    return StringEnumeratorTail(aResult);
}

Here is the call graph for this function:

template<class T >
static nsresult StringEnumeratorTail ( T **  aResult) [inline, static]

Definition at line 182 of file nsStringEnumerator.cpp.

{
    if (!*aResult)
        return NS_ERROR_OUT_OF_MEMORY;
    NS_ADDREF(*aResult);
    return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function: