Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Protected Member Functions | Protected Attributes
TriplesVisitor Class Reference
Inheritance diagram for TriplesVisitor:
Inheritance graph
Collaboration diagram for TriplesVisitor:
Collaboration graph

List of all members.

Public Member Functions

 TriplesVisitor (nsIOutputStream *aOut)
void visit (in nsIRDFNode aSubject, in nsIRDFResource aPredicate, in nsIRDFNode aObject, in boolean aTruthValue)
 Callback function for returning query results.

Protected Member Functions

nsresult writeResource (nsIRDFResource *aResource)

Protected Attributes


Detailed Description

Definition at line 56 of file rdfTriplesSerializer.cpp.

Constructor & Destructor Documentation

Definition at line 59 of file rdfTriplesSerializer.cpp.

: mOut(aOut) {};

Member Function Documentation

void rdfITripleVisitor::visit ( in nsIRDFNode  aSubject,
in nsIRDFResource  aPredicate,
in nsIRDFNode  aObject,
in boolean  aTruthValue 
) [inherited]

Callback function for returning query results.

aSubject,aPredicate,aObjectdescribe the (sub-)arc NS_RDF_STOP_VISIT to stop iterating over the query result. Any error code will stop the iteration as well.

Definition at line 70 of file rdfTriplesSerializer.cpp.

    nsCString res;
    PRUint32 writeCount, wroteCount;
    mOut->Write("<", 1, &wroteCount);
    NS_ENSURE_TRUE(wroteCount == 1, NS_ERROR_FAILURE);
    nsresult rv = aResource->GetValueUTF8(res);
    NS_ENSURE_SUCCESS(rv, rv);
    writeCount = res.Length();
    mOut->Write(res.get(), writeCount, &wroteCount);
    NS_ENSURE_TRUE(writeCount == wroteCount, NS_ERROR_FAILURE);
    mOut->Write("> ", 2, &wroteCount);
    NS_ENSURE_TRUE(wroteCount == 2, NS_ERROR_FAILURE);
    return NS_OK;

Here is the call graph for this function:

Member Data Documentation

Definition at line 64 of file rdfTriplesSerializer.cpp.

The documentation for this class was generated from the following file: