Back to index

lightning-sunbird  0.9+nobinonly
Public Types | Public Member Functions | Static Public Attributes | Protected Attributes
nsXULDocument::TemplateBuilderHookup Class Reference

#include <nsXULDocument.h>

Inheritance diagram for nsXULDocument::TemplateBuilderHookup:
Inheritance graph
[legend]
Collaboration diagram for nsXULDocument::TemplateBuilderHookup:
Collaboration graph
[legend]

List of all members.

Public Types

enum  Phase { eStart, eConstruction, eHookup, eDone }
 Priority codes returned from GetPhase() More...
enum  Result { eResolve_Succeeded, eResolve_Later, eResolve_Error }
 Result codes returned from Resolve() More...

Public Member Functions

 TemplateBuilderHookup (nsIContent *aElement)
virtual Phase GetPhase ()
 Get the state in which the forward reference should be resolved.
virtual Result Resolve ()
 Attempt to resolve the forward reference.

Static Public Attributes

static const Phase kPasses []
 Forward references are categorized by 'priority', and all forward references in a higher priority are resolved before any reference in a lower priority.

Protected Attributes

nsCOMPtr< nsIContentmElement

Detailed Description

Definition at line 469 of file nsXULDocument.h.


Member Enumeration Documentation

enum nsForwardReference::Phase [inherited]

Priority codes returned from GetPhase()

Enumerator:
eStart 

A dummy marker, used to indicate unstarted resolution.

eConstruction 

The initial pass, after which the content model will be fully built.

eHookup 

A second pass, after which all 'magic attribute' hookup will have been performed.

eDone 

A dummy marker, used in kPasses to indicate termination.

Definition at line 53 of file nsForwardReference.h.

enum nsForwardReference::Result [inherited]

Result codes returned from Resolve()

Enumerator:
eResolve_Succeeded 

Resolution succeeded, I'm done.

eResolve_Later 

Couldn't resolve, but try me later.

eResolve_Error 

Something bad happened, don't try again.

Definition at line 89 of file nsForwardReference.h.


Constructor & Destructor Documentation

Definition at line 475 of file nsXULDocument.h.

            : mElement(aElement) {}

Member Function Documentation

Get the state in which the forward reference should be resolved.

'eConstruction' references are all resolved before 'eHookup' references are resolved.

Returns:
the Phase in which the reference needs to be resolved

Implements nsForwardReference.

Definition at line 478 of file nsXULDocument.h.

{ return eHookup; }

Attempt to resolve the forward reference.

Returns:
a Result that tells the resolver how to treat the reference.

Implements nsForwardReference.

Definition at line 4296 of file nsXULDocument.cpp.

{
    PRBool needsHookup;
    nsresult rv = CheckTemplateBuilderHookup(mElement, &needsHookup);
    if (NS_FAILED(rv))
        return eResolve_Error;

    if (needsHookup) {
        rv = CreateTemplateBuilder(mElement);
        if (NS_FAILED(rv))
            return eResolve_Error;
    }

    return eResolve_Succeeded;
}

Here is the call graph for this function:


Member Data Documentation

Initial value:

Forward references are categorized by 'priority', and all forward references in a higher priority are resolved before any reference in a lower priority.

This variable specifies this ordering. The last Priority is guaranteed to be eDone.

Definition at line 75 of file nsForwardReference.h.

Definition at line 472 of file nsXULDocument.h.


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