Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Protected Attributes | Private Attributes | Friends
AttrMap Class Reference

#include <dom.h>

Inheritance diagram for AttrMap:
Inheritance graph
[legend]
Collaboration diagram for AttrMap:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 AttrMap ()
virtual ~AttrMap ()
NodesetNamedItem (Node *arg)
NoderemoveNamedItem (const nsAString &name)
void clear ()
NodegetNamedItem (const nsAString &name)
void append (Node &newNode)
void append (Node *newNode)
Nodeitem (PRUint32 index)
PRUint32 getLength ()

Protected Attributes

ListItemfirstItem
ListItemlastItem
PRUint32 length

Private Attributes

ElementownerElement

Friends

class Element

Detailed Description

Definition at line 216 of file dom.h.


Constructor & Destructor Documentation

Definition at line 130 of file NamedNodeMap.cpp.

AttrMap::~AttrMap ( ) [virtual]

Definition at line 135 of file NamedNodeMap.cpp.

{
}

Member Function Documentation

void NodeListDefinition::append ( Node newNode) [inherited]

Definition at line 86 of file NodeListDefinition.cpp.

{
  ListItem* newListItem = new ListItem;
  if (!newListItem)
      return;

  // Setup the new list item
  newListItem->node = &newNode;
  newListItem->prev = lastItem;
  newListItem->next = nsnull;

  //Append the list item
  if (lastItem)
    lastItem->next = newListItem;

  lastItem = newListItem;

  //Adjust firstItem if this new item is being added to an empty list
  if (!firstItem)
    firstItem = lastItem;

  //Need to increment the length of the list.  Inherited from NodeList
  length++;
}

Here is the caller graph for this function:

void NodeListDefinition::append ( Node newNode) [inherited]

Definition at line 81 of file NodeListDefinition.cpp.

{
  append(*newNode);
}

Here is the call graph for this function:

Definition at line 155 of file NamedNodeMap.cpp.

{
  ListItem* pDeleteItem;
  ListItem* pListTraversal = firstItem;

  while (pListTraversal) {
    pDeleteItem = pListTraversal;
    pListTraversal = pListTraversal->next;
    delete pDeleteItem->node;
    delete pDeleteItem;
  }
  firstItem = 0;
  lastItem = 0;
  length = 0;
}

Here is the caller graph for this function:

PRUint32 NodeListDefinition::getLength ( ) [virtual, inherited]

Implements NodeList.

Definition at line 133 of file NodeListDefinition.cpp.

{
  return length;
}

Here is the caller graph for this function:

Node * NamedNodeMap::getNamedItem ( const nsAString &  name) [inherited]

Definition at line 54 of file NamedNodeMap.cpp.

{
  ListItem* pSearchItem = findListItemByName(name);

  if (pSearchItem)
    return pSearchItem->node;
  else
    return nsnull;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Node * NodeListDefinition::item ( PRUint32  index) [virtual, inherited]

Implements NodeList.

Definition at line 114 of file NodeListDefinition.cpp.

{
  PRUint32 selectLoop;
  ListItem* pListItem = firstItem;

  if (index < length)
    {
      for (selectLoop=0;selectLoop<index;selectLoop++)
        pListItem = pListItem->next;

      return pListItem->node;
    }

  return nsnull;
}

Here is the caller graph for this function:

Node * AttrMap::removeNamedItem ( const nsAString &  name) [virtual]

Reimplemented from NamedNodeMap.

Definition at line 147 of file NamedNodeMap.cpp.

{
  Attr* node = (Attr*)NamedNodeMap::removeNamedItem(name);
  if (node)
    node->ownerElement = nsnull;
  return node;
}

Here is the call graph for this function:

Node * AttrMap::setNamedItem ( Node arg) [virtual]

Reimplemented from NamedNodeMap.

Definition at line 139 of file NamedNodeMap.cpp.

{
  if (arg->getNodeType() != Node::ATTRIBUTE_NODE)
    return nsnull;
  ((Attr*)arg)->ownerElement = ownerElement;
  return NamedNodeMap::setNamedItem(arg);
}

Here is the call graph for this function:


Friends And Related Function Documentation

friend class Element [friend]

Definition at line 219 of file dom.h.


Member Data Documentation

ListItem* NodeListDefinition::firstItem [protected, inherited]

Definition at line 186 of file dom.h.

ListItem* NodeListDefinition::lastItem [protected, inherited]

Definition at line 187 of file dom.h.

PRUint32 NodeList::length [protected, inherited]

Definition at line 154 of file dom.h.

Definition at line 230 of file dom.h.


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