Back to index

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

#include <MapiMessage.h>

Collaboration diagram for nsSimpleUInt32Array:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 nsSimpleUInt32Array (int growBy=20)
 ~nsSimpleUInt32Array ()
void Add (PRUint32 data)
PRUint32 GetAt (PRInt32 index)
PRInt32 GetSize (void)
void RemoveAll (void)

Private Member Functions

void Allocate (void)

Private Attributes

PRInt32 m_allocated
PRInt32 m_used
PRUint32m_pData
int m_growBy

Detailed Description

Definition at line 46 of file MapiMessage.h.


Constructor & Destructor Documentation

nsSimpleUInt32Array::nsSimpleUInt32Array ( int  growBy = 20) [inline]

Definition at line 48 of file MapiMessage.h.

              { m_growBy = growBy; m_pData = nsnull; m_used = 0; m_allocated = 0;}

Definition at line 50 of file MapiMessage.h.

{ if (m_pData) delete [] m_pData;}

Member Function Documentation

Definition at line 52 of file MapiMessage.h.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 777 of file MapiMessage.cpp.

{
       if (m_used < m_allocated)
              return;
       if (!m_pData) {
              m_pData = new PRUint32[m_growBy];
              m_allocated = m_growBy;
       }
       else {
              m_allocated += m_growBy;
              PRUint32 *pData = new PRUint32[m_allocated];
              memcpy( pData, m_pData, (m_allocated - m_growBy) * sizeof( PRUint32));
              delete [] m_pData;
              m_pData = pData;
       }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 53 of file MapiMessage.h.

{ if ((index >= 0) && (index < m_used)) return( m_pData[index]); else return( 0);}

Here is the caller graph for this function:

Definition at line 54 of file MapiMessage.h.

{ return( m_used);}

Here is the caller graph for this function:

Definition at line 55 of file MapiMessage.h.

{ m_used = 0;}

Here is the caller graph for this function:


Member Data Documentation

Definition at line 60 of file MapiMessage.h.

Definition at line 63 of file MapiMessage.h.

Definition at line 62 of file MapiMessage.h.

Definition at line 61 of file MapiMessage.h.


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