Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes
txOutputFormat Class Reference

#include <txOutputFormat.h>

Collaboration diagram for txOutputFormat:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 txOutputFormat ()
 ~txOutputFormat ()
void reset ()
void merge (txOutputFormat &aOutputFormat)
void setFromDefaults ()

Public Attributes

txOutputMethod mMethod
nsString mVersion
nsString mEncoding
txThreeState mOmitXMLDeclaration
txThreeState mStandalone
nsString mPublicId
nsString mSystemId
txList mCDATASectionElements
txThreeState mIndent
nsString mMediaType

Detailed Description

Definition at line 58 of file txOutputFormat.h.


Constructor & Destructor Documentation

Definition at line 49 of file txOutputFormat.cpp.

{
    txListIterator iter(&mCDATASectionElements);
    while (iter.hasNext())
        delete (txExpandedName*)iter.next();
}

Here is the call graph for this function:


Member Function Documentation

Definition at line 72 of file txOutputFormat.cpp.

{
    if (mMethod == eMethodNotSet)
        mMethod = aOutputFormat.mMethod;

    if (mVersion.IsEmpty())
        mVersion = aOutputFormat.mVersion;

    if (mEncoding.IsEmpty())
        mEncoding = aOutputFormat.mEncoding;

    if (mOmitXMLDeclaration == eNotSet)
        mOmitXMLDeclaration = aOutputFormat.mOmitXMLDeclaration;

    if (mStandalone == eNotSet)
        mStandalone = aOutputFormat.mStandalone;

    if (mPublicId.IsEmpty())
        mPublicId = aOutputFormat.mPublicId;

    if (mSystemId.IsEmpty())
        mSystemId = aOutputFormat.mSystemId;

    txListIterator iter(&aOutputFormat.mCDATASectionElements);
    txExpandedName* qName;
    while ((qName = (txExpandedName*)iter.next())) {
        mCDATASectionElements.add(qName);
        // XXX We need txList.clear()
        iter.remove();
    }

    if (mIndent == eNotSet)
        mIndent = aOutputFormat.mIndent;

    if (mMediaType.IsEmpty())
        mMediaType = aOutputFormat.mMediaType;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 56 of file txOutputFormat.cpp.

{
    mMethod = eMethodNotSet;
    mVersion.Truncate();
    if (mEncoding.IsEmpty())
        mOmitXMLDeclaration = eNotSet;
    mStandalone = eNotSet;
    mPublicId.Truncate();
    mSystemId.Truncate();
    txListIterator iter(&mCDATASectionElements);
    while (iter.hasNext())
        delete (txExpandedName*)iter.next();
    mIndent = eNotSet;
    mMediaType.Truncate();
}

Here is the call graph for this function:

Definition at line 110 of file txOutputFormat.cpp.

{
    switch (mMethod) {
        case eMethodNotSet:
        {
            mMethod = eXMLOutput;
            // Fall through
        }
        case eXMLOutput:
        {
            if (mVersion.IsEmpty())
                mVersion.AppendLiteral("1.0");

            if (mEncoding.IsEmpty())
                mEncoding.AppendLiteral("UTF-8");

            if (mOmitXMLDeclaration == eNotSet)
                mOmitXMLDeclaration = eFalse;

            if (mIndent == eNotSet)
                mIndent = eFalse;

            if (mMediaType.IsEmpty())
                mMediaType.AppendLiteral("text/xml");

            break;
        }
        case eHTMLOutput:
        {
            if (mVersion.IsEmpty())
                mVersion.AppendLiteral("4.0");

            if (mEncoding.IsEmpty())
                mEncoding.AppendLiteral("UTF-8");

            if (mIndent == eNotSet)
                mIndent = eTrue;

            if (mMediaType.IsEmpty())
                mMediaType.AppendLiteral("text/html");

            break;
        }
        case eTextOutput:
        {
            if (mEncoding.IsEmpty())
                mEncoding.AppendLiteral("UTF-8");

            if (mMediaType.IsEmpty())
                mMediaType.AppendLiteral("text/plain");

            break;
        }
    }
}

Here is the caller graph for this function:


Member Data Documentation

Definition at line 97 of file txOutputFormat.h.

Definition at line 82 of file txOutputFormat.h.

Definition at line 100 of file txOutputFormat.h.

Definition at line 103 of file txOutputFormat.h.

Definition at line 74 of file txOutputFormat.h.

Definition at line 85 of file txOutputFormat.h.

Definition at line 91 of file txOutputFormat.h.

Definition at line 88 of file txOutputFormat.h.

Definition at line 94 of file txOutputFormat.h.

Definition at line 78 of file txOutputFormat.h.


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