Back to index

lightning-sunbird  0.9+nobinonly
Classes | Functions
nsIRDFContainer.idl File Reference
import "nsISupports.idl";
import "nsIRDFDataSource.idl";
import "nsIRDFResource.idl";
import "nsIRDFNode.idl";
import "nsISimpleEnumerator.idl";
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

interface  nsIRDFContainer

Functions

nsresult NS_NewRDFContainer (nsIRDFContainer **aResult)
nsresult NS_NewRDFContainer (nsIRDFDataSource *aDataSource, nsIRDFResource *aResource, nsIRDFContainer **aResult)
nsresult NS_NewContainerEnumerator (nsIRDFDataSource *aDataSource, nsIRDFResource *aContainer, nsISimpleEnumerator **aResult)
 Create a cursor on a container that enumerates its contents in order.

Function Documentation

nsresult NS_NewContainerEnumerator ( nsIRDFDataSource aDataSource,
nsIRDFResource aContainer,
nsISimpleEnumerator **  aResult 
)

Create a cursor on a container that enumerates its contents in order.

Definition at line 269 of file nsContainerEnumerator.cpp.

{
    NS_PRECONDITION(aDataSource != nsnull, "null ptr");
    if (! aDataSource)
        return NS_ERROR_NULL_POINTER;

    NS_PRECONDITION(aContainer != nsnull, "null ptr");
    if (! aContainer)
        return NS_ERROR_NULL_POINTER;

    NS_PRECONDITION(aResult != nsnull, "null ptr");
    if (! aResult)
        return NS_ERROR_NULL_POINTER;

    ContainerEnumeratorImpl* result = new ContainerEnumeratorImpl(aDataSource, aContainer);
    if (! result)
        return NS_ERROR_OUT_OF_MEMORY;

    NS_ADDREF(result);

    nsresult rv = result->Init();
    if (NS_FAILED(rv))
        NS_RELEASE(result);

    *aResult = result;
    return rv;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 457 of file nsRDFContainer.cpp.

{
    RDFContainerImpl* result = new RDFContainerImpl();
    if (! result)
        return NS_ERROR_OUT_OF_MEMORY;

    nsresult rv;
    rv = result->Init();
    if (NS_FAILED(rv)) {
        delete result;
        return rv;
    }

    NS_ADDREF(result);
    *aResult = result;
    return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult NS_NewRDFContainer ( nsIRDFDataSource aDataSource,
nsIRDFResource aResource,
nsIRDFContainer **  aResult 
)

Definition at line 477 of file nsRDFContainer.cpp.

{
    nsresult rv;
    rv = NS_NewRDFContainer(aResult);
    if (NS_FAILED(rv)) return rv;

    rv = (*aResult)->Init(aDataSource, aResource);
    if (NS_FAILED(rv)) {
        NS_RELEASE(*aResult);
    }
    return rv;
}

Here is the call graph for this function: