Back to index

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

#include <morkBlob.h>

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

List of all members.

Public Member Functions

 morkText ()
mork_bool GrowBlob (morkEnv *ev, nsIMdbHeap *ioHeap, mork_size inNewSize)
void ClearBufFill ()

Static Public Member Functions

static void BlobFillOverSizeError (morkEnv *ev)
static void NilBufBodyError (morkEnv *ev)

Public Attributes

mork_cscode mText_Form
mork_size mBlob_Size
voidmBuf_Body
mork_fill mBuf_Fill

Private Member Functions

 morkText (const morkText &other)
morkTextoperator= (const morkText &other)

Detailed Description

Definition at line 107 of file morkBlob.h.


Constructor & Destructor Documentation

morkText::morkText ( ) [inline]

Definition at line 116 of file morkBlob.h.

{ }
morkText::morkText ( const morkText other) [private]

Member Function Documentation

void morkBlob::BlobFillOverSizeError ( morkEnv ev) [static, inherited]

Definition at line 66 of file morkBlob.cpp.

{
  ev->NewError("mBuf_Fill > mBlob_Size");
}

Here is the call graph for this function:

Here is the caller graph for this function:

void morkBuf::ClearBufFill ( ) [inline, inherited]

Definition at line 61 of file morkBlob.h.

{ mBuf_Fill = 0; }

Here is the caller graph for this function:

mork_bool morkBlob::GrowBlob ( morkEnv ev,
nsIMdbHeap ioHeap,
mork_size  inNewSize 
) [inherited]

Definition at line 74 of file morkBlob.cpp.

{
  if ( ioHeap )
  {
    if ( !mBuf_Body ) // no body? implies zero sized?
      mBlob_Size = 0;
      
    if ( mBuf_Fill > mBlob_Size ) // fill more than size?
    {
      ev->NewWarning("mBuf_Fill > mBlob_Size");
      mBuf_Fill = mBlob_Size;
    }
      
    if ( inNewSize > mBlob_Size ) // need to allocate larger blob?
    {
      mork_u1* body = 0;
      ioHeap->Alloc(ev->AsMdbEnv(), inNewSize, (void**) &body);
      if ( body && ev->Good() )
      {
        void* oldBody = mBuf_Body;
        if ( mBlob_Size ) // any old content to transfer?
          MORK_MEMCPY(body, oldBody, mBlob_Size);
        
        mBlob_Size = inNewSize; // install new size
        mBuf_Body = body; // install new body
        
        if ( oldBody ) // need to free old buffer body?
          ioHeap->Free(ev->AsMdbEnv(), oldBody);
      }
    }
  }
  else
    ev->NilPointerError();
    
  if ( ev->Good() && mBlob_Size < inNewSize )
    ev->NewError("mBlob_Size < inNewSize");
    
  return ev->Good();
}

Here is the call graph for this function:

Here is the caller graph for this function:

void morkBuf::NilBufBodyError ( morkEnv ev) [static, inherited]

Definition at line 58 of file morkBlob.cpp.

{
  ev->NewError("nil mBuf_Body");
}

Here is the call graph for this function:

Here is the caller graph for this function:

morkText& morkText::operator= ( const morkText other) [private]

Member Data Documentation

Definition at line 81 of file morkBlob.h.

void* morkBuf::mBuf_Body [inherited]

Definition at line 53 of file morkBlob.h.

Definition at line 54 of file morkBlob.h.

Definition at line 114 of file morkBlob.h.


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