Back to index

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

#include <mozSqlResult.h>

Collaboration diagram for Row:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Row (nsIRDFResource *aSource, PRInt32 aColumnCount)
 ~Row ()
 Row (nsIContent *aContent, PRInt32 aParentIndex)
 ~Row ()
void SetContainer (PRBool aContainer)
PRBool IsContainer ()
void SetOpen (PRBool aOpen)
PRBool IsOpen ()
void SetEmpty (PRBool aEmpty)
PRBool IsEmpty ()
void SetSeparator (PRBool aSeparator)
PRBool IsSeparator ()

Static Public Member Functions

static RowCreate (nsFixedSizeAllocator &aAllocator, nsIRDFResource *aSource, nsVoidArray &aColumnInfo)
static RowCreate (nsFixedSizeAllocator &aAllocator, nsIRDFResource *aSource, nsVoidArray &aColumnInfo, Row *aSrcRow)
static void Copy (PRInt32 aColumnCount, Row *aSrcRow, Row *aDestRow)
static void Destroy (nsFixedSizeAllocator &aAllocator, PRInt32 aColumnCount, Row *aRow)
static RowCreate (nsFixedSizeAllocator &aAllocator, nsIContent *aContent, PRInt32 aParentIndex)
static void Destroy (nsFixedSizeAllocator &aAllocator, Row *aRow)

Public Attributes

nsIRDFResourcemSource
Cell ** mCells
nsIContentmContent
PRInt32 mParentIndex
PRInt32 mSubtreeSize

Static Private Member Functions

static voidoperator new (size_t) CPP_THROW_NEW
static void operator delete (void *, size_t)
static voidoperator new (size_t) CPP_THROW_NEW
static void operator delete (void *, size_t)

Private Attributes

PRInt8 mFlags

Detailed Description

Definition at line 222 of file mozSqlResult.h.


Constructor & Destructor Documentation

Row::Row ( nsIRDFResource aSource,
PRInt32  aColumnCount 
) [inline]

Definition at line 273 of file mozSqlResult.h.

      : mSource(aSource)
    {
      NS_IF_ADDREF(mSource);
      mCells = new Cell*[aColumnCount];
    }

Here is the caller graph for this function:

Row::~Row ( ) [inline]

Definition at line 280 of file mozSqlResult.h.

           {
      delete[] mCells;
      NS_IF_RELEASE(mSource);
    }

Here is the caller graph for this function:

Row::Row ( nsIContent aContent,
PRInt32  aParentIndex 
) [inline]

Definition at line 74 of file nsTreeContentView.cpp.

      : mContent(aContent), mParentIndex(aParentIndex),
        mSubtreeSize(0), mFlags(0) {
    }
Row::~Row ( ) [inline]

Definition at line 79 of file nsTreeContentView.cpp.

           {
    }

Member Function Documentation

static void Row::Copy ( PRInt32  aColumnCount,
Row aSrcRow,
Row aDestRow 
) [inline, static]

Definition at line 257 of file mozSqlResult.h.

                                                            {
      for (PRInt32 i = 0; i < aColumnCount; i++) {
        Cell* srcCell = aSrcRow->mCells[i];
        Cell* destCell = aDestRow->mCells[i];
        Cell::Copy(srcCell, destCell);
      }
    }
static Row* Row::Create ( nsFixedSizeAllocator &  aAllocator,
nsIContent aContent,
PRInt32  aParentIndex 
) [inline, static]

Definition at line 62 of file nsTreeContentView.cpp.

                                                       {
      void* place = aAllocator.Alloc(sizeof(Row));
      return place ? ::new(place) Row(aContent, aParentIndex) : nsnull;
    }

Here is the call graph for this function:

static Row* Row::Create ( nsFixedSizeAllocator &  aAllocator,
nsIRDFResource aSource,
nsVoidArray aColumnInfo 
) [inline, static]

Definition at line 225 of file mozSqlResult.h.

                                     {
      void* place = aAllocator.Alloc(sizeof(Row));
      if (! place)
        return nsnull;
      Row* newRow = ::new(place) Row(aSource, aColumnInfo.Count());
      for (PRInt32 i = 0; i < aColumnInfo.Count(); i++) {
        Cell* newCell = Cell::Create(aAllocator, ((ColumnInfo*)aColumnInfo[i])->mType);
        newRow->mCells[i] = newCell;
      }
      return newRow;
    }

Here is the call graph for this function:

Here is the caller graph for this function:

static Row* Row::Create ( nsFixedSizeAllocator &  aAllocator,
nsIRDFResource aSource,
nsVoidArray aColumnInfo,
Row aSrcRow 
) [inline, static]

Definition at line 240 of file mozSqlResult.h.

                         {
      void* place = aAllocator.Alloc(sizeof(Row));
      if (! place)
        return nsnull;
      Row* newRow = ::new(place) Row(aSource, aColumnInfo.Count());
      for (PRInt32 i = 0; i < aColumnInfo.Count(); i++) {
        Cell* srcCell = aSrcRow->mCells[i];
        Cell* newCell = Cell::Create(aAllocator, ((ColumnInfo*)aColumnInfo[i])->mType, srcCell);
        newRow->mCells[i] = newCell;
      }
      return newRow;
    }

Here is the call graph for this function:

static void Row::Destroy ( nsFixedSizeAllocator &  aAllocator,
Row aRow 
) [inline, static]

Definition at line 69 of file nsTreeContentView.cpp.

                                                         {
      aRow->~Row();
      aAllocator.Free(aRow, sizeof(*aRow));
    }

Here is the call graph for this function:

static void Row::Destroy ( nsFixedSizeAllocator &  aAllocator,
PRInt32  aColumnCount,
Row aRow 
) [inline, static]

Definition at line 266 of file mozSqlResult.h.

                                                                               {
      for (PRInt32 i = 0; i < aColumnCount; i++)
        Cell::Destroy(aAllocator, aRow->mCells[i]);
      aRow->~Row();
      aAllocator.Free(aRow, sizeof(*aRow));
    }

Here is the call graph for this function:

Here is the caller graph for this function:

PRBool Row::IsContainer ( ) [inline]

Definition at line 85 of file nsTreeContentView.cpp.

{ return mFlags & ROW_FLAG_CONTAINER; }

Here is the caller graph for this function:

PRBool Row::IsEmpty ( void  ) [inline]

Definition at line 95 of file nsTreeContentView.cpp.

{ return mFlags & ROW_FLAG_EMPTY; }
PRBool Row::IsOpen ( ) [inline]

Definition at line 90 of file nsTreeContentView.cpp.

{ return mFlags & ROW_FLAG_OPEN; }

Here is the caller graph for this function:

PRBool Row::IsSeparator ( ) [inline]

Definition at line 100 of file nsTreeContentView.cpp.

{ return mFlags & ROW_FLAG_SEPARATOR; }
static void Row::operator delete ( void ,
size_t   
) [inline, static, private]

Definition at line 115 of file nsTreeContentView.cpp.

{}
static void Row::operator delete ( void ,
size_t   
) [inline, static, private]

Definition at line 289 of file mozSqlResult.h.

{}
static void* Row::operator new ( size_t  ) [inline, static, private]

Definition at line 114 of file nsTreeContentView.cpp.

{ return 0; } 
static void* Row::operator new ( size_t  ) [inline, static, private]

Definition at line 288 of file mozSqlResult.h.

{ return 0; } 
void Row::SetContainer ( PRBool  aContainer) [inline]

Definition at line 82 of file nsTreeContentView.cpp.

                                         {
      aContainer ? mFlags |= ROW_FLAG_CONTAINER : mFlags &= ~ROW_FLAG_CONTAINER;
    }

Here is the caller graph for this function:

void Row::SetEmpty ( PRBool  aEmpty) [inline]

Definition at line 92 of file nsTreeContentView.cpp.

                                 {
      aEmpty ? mFlags |= ROW_FLAG_EMPTY : mFlags &= ~ROW_FLAG_EMPTY;
    }

Here is the caller graph for this function:

void Row::SetOpen ( PRBool  aOpen) [inline]

Definition at line 87 of file nsTreeContentView.cpp.

                               {
      aOpen ? mFlags |= ROW_FLAG_OPEN : mFlags &= ~ROW_FLAG_OPEN;
    }

Here is the caller graph for this function:

void Row::SetSeparator ( PRBool  aSeparator) [inline]

Definition at line 97 of file nsTreeContentView.cpp.

                                         {
      aSeparator ? mFlags |= ROW_FLAG_SEPARATOR : mFlags &= ~ROW_FLAG_SEPARATOR;
    }

Here is the caller graph for this function:


Member Data Documentation

Definition at line 286 of file mozSqlResult.h.

Definition at line 103 of file nsTreeContentView.cpp.

PRInt8 Row::mFlags [private]

Definition at line 118 of file nsTreeContentView.cpp.

Definition at line 106 of file nsTreeContentView.cpp.

Definition at line 285 of file mozSqlResult.h.

Definition at line 109 of file nsTreeContentView.cpp.


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