Back to index

lightning-sunbird  0.9+nobinonly
Classes | Enumerations | Functions | Variables
nsRDFContentSink.cpp File Reference
#include "nsCOMPtr.h"
#include "nsInterfaceHashtable.h"
#include "nsIContentSink.h"
#include "nsIRDFContainer.h"
#include "nsIRDFContainerUtils.h"
#include "nsIRDFContentSink.h"
#include "nsIRDFNode.h"
#include "nsIRDFService.h"
#include "nsIRDFXMLSink.h"
#include "nsIServiceManager.h"
#include "nsIURL.h"
#include "nsIXMLContentSink.h"
#include "nsRDFCID.h"
#include "nsRDFParserUtils.h"
#include "nsVoidArray.h"
#include "nsXPIDLString.h"
#include "prlog.h"
#include "prmem.h"
#include "rdf.h"
#include "rdfutil.h"
#include "nsReadableUtils.h"
#include "nsIExpatSink.h"
#include "nsCRT.h"
#include "nsIAtom.h"
#include "nsStaticAtom.h"

Go to the source code of this file.

Classes

class  RDFContentSinkImpl
struct  RDFContentSinkImpl::ContainerInfo
struct  RDFContextStackElement

Enumerations

enum  RDFContentSinkState {
  eRDFContentSinkState_InProlog, eRDFContentSinkState_InDocumentElement, eRDFContentSinkState_InDescriptionElement, eRDFContentSinkState_InContainerElement,
  eRDFContentSinkState_InPropertyElement, eRDFContentSinkState_InMemberElement, eRDFContentSinkState_InEpilog
}
enum  RDFContentSinkParseMode { eRDFContentSinkParseMode_Resource, eRDFContentSinkParseMode_Literal, eRDFContentSinkParseMode_Int, eRDFContentSinkParseMode_Date }

Functions

static NS_DEFINE_IID (kIContentSinkIID, NS_ICONTENT_SINK_IID)
static NS_DEFINE_IID (kIExpatSinkIID, NS_IEXPATSINK_IID)
static NS_DEFINE_IID (kIRDFServiceIID, NS_IRDFSERVICE_IID)
static NS_DEFINE_IID (kISupportsIID, NS_ISUPPORTS_IID)
static NS_DEFINE_IID (kIXMLContentSinkIID, NS_IXMLCONTENT_SINK_IID)
static NS_DEFINE_IID (kIRDFContentSinkIID, NS_IRDFCONTENTSINK_IID)
static NS_DEFINE_CID (kRDFServiceCID, NS_RDFSERVICE_CID)
static NS_DEFINE_CID (kRDFContainerUtilsCID, NS_RDFCONTAINERUTILS_CID)
typedef NS_STDCALL_FUNCPROTO (nsresult, nsContainerTestFn, nsIRDFContainerUtils, IsAlt,(nsIRDFDataSource *, nsIRDFResource *, PRBool *))
typedef NS_STDCALL_FUNCPROTO (nsresult, nsMakeContainerFn, nsIRDFContainerUtils, MakeAlt,(nsIRDFDataSource *, nsIRDFResource *, nsIRDFContainer **))
static PRBool rdf_IsDataInBuffer (PRUnichar *buffer, PRInt32 length)
nsresult NS_NewRDFContentSink (nsIRDFContentSink **aResult)
 This constructs a content sink that can be used without a document, say, to create a stand-alone in-memory graph.

Variables

static const nsStaticAtom rdf_atoms []

Class Documentation

struct RDFContentSinkImpl::ContainerInfo

Definition at line 204 of file nsRDFContentSink.cpp.

Collaboration diagram for RDFContentSinkImpl::ContainerInfo:
Class Members
nsMakeContainerFn mMakeFn
nsContainerTestFn mTestFn
nsIRDFResource ** mType
struct RDFContextStackElement

Definition at line 1463 of file nsRDFContentSink.cpp.

Collaboration diagram for RDFContextStackElement:
Class Members
RDFContentSinkParseMode mParseMode
nsIRDFResource * mResource
RDFContentSinkState mState

Enumeration Type Documentation

Enumerator:
eRDFContentSinkParseMode_Resource 
eRDFContentSinkParseMode_Literal 
eRDFContentSinkParseMode_Int 
eRDFContentSinkParseMode_Date 

Definition at line 131 of file nsRDFContentSink.cpp.

Enumerator:
eRDFContentSinkState_InProlog 
eRDFContentSinkState_InDocumentElement 
eRDFContentSinkState_InDescriptionElement 
eRDFContentSinkState_InContainerElement 
eRDFContentSinkState_InPropertyElement 
eRDFContentSinkState_InMemberElement 
eRDFContentSinkState_InEpilog 

Definition at line 121 of file nsRDFContentSink.cpp.


Function Documentation

static NS_DEFINE_CID ( kRDFServiceCID  ,
NS_RDFSERVICE_CID   
) [static]
static NS_DEFINE_CID ( kRDFContainerUtilsCID  ,
NS_RDFCONTAINERUTILS_CID   
) [static]
static NS_DEFINE_IID ( kIContentSinkIID  ,
NS_ICONTENT_SINK_IID   
) [static]
static NS_DEFINE_IID ( kIExpatSinkIID  ,
NS_IEXPATSINK_IID   
) [static]
static NS_DEFINE_IID ( kIRDFServiceIID  ,
NS_IRDFSERVICE_IID   
) [static]
static NS_DEFINE_IID ( kISupportsIID  ,
NS_ISUPPORTS_IID   
) [static]
static NS_DEFINE_IID ( kIXMLContentSinkIID  ,
NS_IXMLCONTENT_SINK_IID   
) [static]
static NS_DEFINE_IID ( kIRDFContentSinkIID  ,
NS_IRDFCONTENTSINK_IID   
) [static]

This constructs a content sink that can be used without a document, say, to create a stand-alone in-memory graph.

Definition at line 1535 of file nsRDFContentSink.cpp.

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

    RDFContentSinkImpl* sink = new RDFContentSinkImpl();
    if (! sink)
        return NS_ERROR_OUT_OF_MEMORY;

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

Here is the call graph for this function:

typedef NS_STDCALL_FUNCPROTO ( nsresult  ,
nsContainerTestFn  ,
nsIRDFContainerUtils  ,
IsAlt  ,
(nsIRDFDataSource *, nsIRDFResource *, PRBool *)   
)
typedef NS_STDCALL_FUNCPROTO ( nsresult  ,
nsMakeContainerFn  ,
nsIRDFContainerUtils  ,
MakeAlt  ,
(nsIRDFDataSource *, nsIRDFResource *, nsIRDFContainer **)   
)
static PRBool rdf_IsDataInBuffer ( PRUnichar buffer,
PRInt32  length 
) [static]

Definition at line 694 of file nsRDFContentSink.cpp.

{
    for (PRInt32 i = 0; i < length; ++i) {
        if (buffer[i] == ' ' ||
            buffer[i] == '\t' ||
            buffer[i] == '\n' ||
            buffer[i] == '\r')
            continue;

        return PR_TRUE;
    }
    return PR_FALSE;
}

Here is the caller graph for this function:


Variable Documentation