Back to index

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

implementation of a transaction list object. More...

#include <nsTransactionList.h>

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

List of all members.

Public Member Functions

 nsTransactionList (nsITransactionManager *aTxnMgr, nsTransactionStack *aTxnStack)
 nsTransactionList (nsITransactionManager *aTxnMgr, nsTransactionItem *aTxnItem)
virtual ~nsTransactionList ()
boolean itemIsBatch (in long aIndex)
 itemIsBatch() returns true if the item at aIndex is a batch.
nsITransaction getItem (in long aIndex)
 getItem() returns the transaction at the given index in the list.
long getNumChildrenForItem (in long aIndex)
 getNumChildrenForItem() returns the number of child (auto-aggreated) transactions the item at aIndex has.
nsITransactionList getChildListForItem (in long aIndex)
 getChildListForItem() returns the list of children associated with the item at aIndex.

Public Attributes

readonly attribute long numItems
 The number of transactions contained in this list.

Private Attributes

nsWeakPtr mTxnMgr
nsTransactionStackmTxnStack
nsTransactionItemmTxnItem

Detailed Description

implementation of a transaction list object.

Definition at line 53 of file nsTransactionList.h.


Constructor & Destructor Documentation

Definition at line 45 of file nsTransactionList.cpp.

  : mTxnStack(aTxnStack)
  , mTxnItem(0)
{
  if (aTxnMgr)
    mTxnMgr = do_GetWeakReference(aTxnMgr);
}

Here is the call graph for this function:

Definition at line 53 of file nsTransactionList.cpp.

  : mTxnStack(0)
  , mTxnItem(aTxnItem)
{
  if (aTxnMgr)
    mTxnMgr = do_GetWeakReference(aTxnMgr);
}

Here is the call graph for this function:

Definition at line 61 of file nsTransactionList.cpp.

{
  mTxnStack = 0;
  mTxnItem  = 0;
}

Member Function Documentation

getChildListForItem() returns the list of children associated with the item at aIndex.

Implementations may return null if there are no children, or an empty list. The list returned is AddRef'd so it is up to the caller to Release the transaction when it is done.

Parameters:
aIndexThe index of the item in the list.

getItem() returns the transaction at the given index in the list.

Note that a null can be returned here if the item is a batch. The transaction returned is AddRef'd so it is up to the caller to Release the transaction when it is done.

Parameters:
aIndexThe index of the item in the list.

getNumChildrenForItem() returns the number of child (auto-aggreated) transactions the item at aIndex has.

Parameters:
aIndexThe index of the item in the list.

itemIsBatch() returns true if the item at aIndex is a batch.

Note that currently there is no requirement for a TransactionManager implementation to associate a toplevel nsITransaction with a batch so it is possible for itemIsBatch() to return true and getItem() to return null. However, you can still access the transactions contained in the batch with a call to getChildListForItem().

Parameters:
aIndexThe index of the item in the list.

Member Data Documentation

Definition at line 59 of file nsTransactionList.h.

Definition at line 57 of file nsTransactionList.h.

Definition at line 58 of file nsTransactionList.h.

The number of transactions contained in this list.

Definition at line 56 of file nsITransactionList.idl.


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