Back to index

lightning-sunbird  0.9+nobinonly
Classes | Public Member Functions | Protected Attributes | Friends
NodeListDefinition Class Reference

#include <dom.h>

Inheritance diagram for NodeListDefinition:
Inheritance graph
Collaboration diagram for NodeListDefinition:
Collaboration graph

List of all members.


struct  ListItem

Public Member Functions

 NodeListDefinition ()
virtual ~NodeListDefinition ()
void append (Node &newNode)
void append (Node *newNode)
Nodeitem (PRUint32 index)
PRUint32 getLength ()

Protected Attributes

PRUint32 length


class NamedNodeMap
class txXPathTreeWalker

Detailed Description

Definition at line 164 of file dom.h.

Class Documentation

struct NodeListDefinition::ListItem

Definition at line 180 of file dom.h.

Collaboration diagram for NodeListDefinition::ListItem:
Class Members
ListItem * next
Node * node
ListItem * prev

Constructor & Destructor Documentation

Definition at line 53 of file NodeListDefinition.cpp.

Definition at line 64 of file NodeListDefinition.cpp.

  ListItem* pDeleteItem;
  ListItem* pListTraversal = firstItem;

  while (pListTraversal)
    pDeleteItem = pListTraversal;
    pListTraversal = pListTraversal->next;
    delete pDeleteItem;

Member Function Documentation

Definition at line 86 of file NodeListDefinition.cpp.

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

  // 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

Here is the caller graph for this function:

Definition at line 81 of file NodeListDefinition.cpp.


Here is the call graph for this function:

Implements NodeList.

Definition at line 133 of file NodeListDefinition.cpp.

  return length;

Here is the caller graph for this function:

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

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:

Friends And Related Function Documentation

friend class NamedNodeMap [friend]

Definition at line 166 of file dom.h.

friend class txXPathTreeWalker [friend]

Reimplemented in NamedNodeMap.

Definition at line 167 of file dom.h.

Member Data Documentation

Definition at line 186 of file dom.h.

Definition at line 187 of file dom.h.

PRUint32 NodeList::length [protected, inherited]

Definition at line 154 of file dom.h.

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