Back to index

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

#include <nsSpellCheckUtils.h>

List of all members.

Public Member Functions

 CharBuffer ()
 ~CharBuffer ()
nsresult AssureCapacity (PRInt32 aLength)

Public Attributes

PRInt32 mCapacity
char * mData
PRInt32 mDataLength

Detailed Description

Definition at line 50 of file nsSpellCheckUtils.h.


Constructor & Destructor Documentation

CharBuffer::CharBuffer ( ) [inline]

Definition at line 58 of file nsSpellCheckUtils.h.

: mCapacity(0), mData(0), mDataLength(0) {}

Definition at line 60 of file nsSpellCheckUtils.h.

  {
    if (mData)
      delete []mData;

    mData       = 0;
    mCapacity   = 0;
    mDataLength = 0;
  }

Member Function Documentation

Definition at line 70 of file nsSpellCheckUtils.h.

  {
    if (aLength >  mCapacity)
    {
      if (mData)
        delete []mData;

      mData = new char[aLength];

      if (!mData)
        return NS_ERROR_OUT_OF_MEMORY;

      mCapacity = aLength;
    }

    return NS_OK;
  }

Here is the caller graph for this function:


Member Data Documentation

Definition at line 54 of file nsSpellCheckUtils.h.

Definition at line 55 of file nsSpellCheckUtils.h.

Definition at line 56 of file nsSpellCheckUtils.h.


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