Back to index

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

nsXMLNameSpaceMap contains a set of prefixes which are mapped onto namespaces. More...

#include <nsXMLNameSpaceMap.h>

Collaboration diagram for nsXMLNameSpaceMap:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 NS_HIDDEN_ (nsresult) AddPrefix(nsIAtom *aPrefix
 Add a prefix and its corresponding namespace ID to the map.
 NS_HIDDEN_ (nsresult) AddPrefix(nsIAtom *aPrefix
 Add a prefix and a namespace URI to the map.
 NS_HIDDEN_ (void) RemovePrefix(nsIAtom *aPrefix)
 NS_HIDDEN_ (PRInt32) FindNameSpaceID(nsIAtom *aPrefix) const
 NS_HIDDEN_ (nsIAtom *) FindPrefix(PRInt32 aNameSpaceID) const
 If the given namespace ID is in the map, then the first prefix which maps to that namespace is returned.
 NS_HIDDEN_ (void) Clear()
 ~nsXMLNameSpaceMap ()

Static Public Member Functions

static NS_HIDDEN_ (nsXMLNameSpaceMap *) Create()
 Allocates a new nsXMLNameSpaceMap (with new()) and initializes it with the xmlns and xml namespaces.

Public Attributes

PRInt32 aNameSpaceID
nsStringaURI

Private Member Functions

 nsXMLNameSpaceMap () NS_HIDDEN

Private Attributes

nsVoidArray mNameSpaces

Detailed Description

nsXMLNameSpaceMap contains a set of prefixes which are mapped onto namespaces.

It allows the set to be searched by prefix or by namespace ID.

Definition at line 50 of file nsXMLNameSpaceMap.h.


Constructor & Destructor Documentation

Definition at line 92 of file nsXMLNameSpaceMap.h.

{ Clear(); }

Here is the call graph for this function:

Definition at line 73 of file nsXMLNameSpaceMap.cpp.

  : mNameSpaces(4)
{
}

Member Function Documentation

Allocates a new nsXMLNameSpaceMap (with new()) and initializes it with the xmlns and xml namespaces.

Add a prefix and its corresponding namespace ID to the map.

Passing a null |aPrefix| corresponds to the default namespace, which may be set to something other than kNameSpaceID_None.

Add a prefix and a namespace URI to the map.

The URI will be converted to its corresponding namespace ID.

If the given namespace ID is in the map, then the first prefix which maps to that namespace is returned.

Otherwise, null is returned.


Member Data Documentation

Definition at line 64 of file nsXMLNameSpaceMap.h.

Definition at line 70 of file nsXMLNameSpaceMap.h.

Definition at line 97 of file nsXMLNameSpaceMap.h.


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