Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Static Public Member Functions | Public Attributes | Private Attributes
txHandlerTable Class Reference

#include <txStylesheetCompileHandlers.h>

Collaboration diagram for txHandlerTable:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 txHandlerTable (const HandleTextFn aTextHandler, const txElementHandler *aLREHandler, const txElementHandler *aOtherHandler)
 txHandlerTable
nsresult init (const txElementHandler *aHandlers, PRUint32 aCount)
const txElementHandlerfind (PRInt32 aNamespaceID, nsIAtom *aLocalName)

Static Public Member Functions

static MBool init ()
static void shutdown ()

Public Attributes

const HandleTextFn mTextHandler
const txElementHandler *const mLREHandler

Private Attributes

const txElementHandler *const mOtherHandler
txExpandedNameMap mHandlers

Detailed Description

Definition at line 66 of file txStylesheetCompileHandlers.h.


Constructor & Destructor Documentation

txHandlerTable::txHandlerTable ( const HandleTextFn  aTextHandler,
const txElementHandler aLREHandler,
const txElementHandler aOtherHandler 
)

txHandlerTable

Definition at line 2877 of file txStylesheetCompileHandlers.cpp.

  : mTextHandler(aTextHandler),
    mLREHandler(aLREHandler),
    mOtherHandler(aOtherHandler),
    mHandlers(PR_FALSE)
{
}

Member Function Documentation

const txElementHandler * txHandlerTable::find ( PRInt32  aNamespaceID,
nsIAtom aLocalName 
)

Definition at line 2906 of file txStylesheetCompileHandlers.cpp.

{
    txExpandedName name(aNamespaceID, aLocalName);
    // XXX this cast is a reinterpret_cast, same sad story as in ::init
    const txElementHandler* handler =
        (const txElementHandler*)mHandlers.get(name);
    if (!handler) {
        handler = mOtherHandler;
    }
    return handler;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 2888 of file txStylesheetCompileHandlers.cpp.

{
    nsresult rv = NS_OK;

    PRUint32 i;
    for (i = 0; i < aCount; ++i) {
        nsCOMPtr<nsIAtom> nameAtom = do_GetAtom(aHandlers->mLocalName);
        txExpandedName name(aHandlers->mNamespaceID, nameAtom);
        // XXX this cast is a reinterpret_cast, which is sad
        rv = mHandlers.add(name, (TxObject*)aHandlers);
        NS_ENSURE_SUCCESS(rv, rv);

        ++aHandlers;
    }
    return NS_OK;
}

Here is the call graph for this function:

Definition at line 2966 of file txStylesheetCompileHandlers.cpp.

{
    SHUTDOWN_HANDLER(Root);
    SHUTDOWN_HANDLER(Top);
    SHUTDOWN_HANDLER(Ignore);
    SHUTDOWN_HANDLER(Template);
    SHUTDOWN_HANDLER(Text);
    SHUTDOWN_HANDLER(ApplyTemplates);
    SHUTDOWN_HANDLER(CallTemplate);
    SHUTDOWN_HANDLER(Variable);
    SHUTDOWN_HANDLER(ForEach);
    SHUTDOWN_HANDLER(TopVariable);
    SHUTDOWN_HANDLER(Choose);
    SHUTDOWN_HANDLER(Param);
    SHUTDOWN_HANDLER(Import);
    SHUTDOWN_HANDLER(AttributeSet);
    SHUTDOWN_HANDLER(Fallback);
}

Member Data Documentation

Definition at line 83 of file txStylesheetCompileHandlers.h.

Definition at line 76 of file txStylesheetCompileHandlers.h.

Definition at line 82 of file txStylesheetCompileHandlers.h.

Definition at line 75 of file txStylesheetCompileHandlers.h.


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