Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Private Member Functions | Friends
morkTable Class Reference

#include <morkTable.h>

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

List of all members.

Public Member Functions

NS_DECL_ISUPPORTS_INHERITED
mork_tid 
TableId () const
void SetTableId (mork_tid inTid)
virtual mork_refs AddStrongRef (morkEnv *ev)
virtual mork_refs CutStrongRef (morkEnv *ev)
NS_IMETHOD GetSeed (nsIMdbEnv *ev, mdb_seed *outSeed)
NS_IMETHOD GetCount (nsIMdbEnv *ev, mdb_count *outCount)
NS_IMETHOD GetPort (nsIMdbEnv *ev, nsIMdbPort **acqPort)
NS_IMETHOD GetCursor (nsIMdbEnv *ev, mdb_pos inMemberPos, nsIMdbCursor **acqCursor)
NS_IMETHOD GetOid (nsIMdbEnv *ev, mdbOid *outOid)
NS_IMETHOD BecomeContent (nsIMdbEnv *ev, const mdbOid *inOid)
NS_IMETHOD DropActivity (nsIMdbEnv *ev)
NS_IMETHOD SetTablePriority (nsIMdbEnv *ev, mdb_priority inPrio)
NS_IMETHOD GetTablePriority (nsIMdbEnv *ev, mdb_priority *outPrio)
NS_IMETHOD GetTableBeVerbose (nsIMdbEnv *ev, mdb_bool *outBeVerbose)
NS_IMETHOD SetTableBeVerbose (nsIMdbEnv *ev, mdb_bool inBeVerbose)
NS_IMETHOD GetTableIsUnique (nsIMdbEnv *ev, mdb_bool *outIsUnique)
NS_IMETHOD GetTableKind (nsIMdbEnv *ev, mdb_kind *outTableKind)
NS_IMETHOD GetRowScope (nsIMdbEnv *ev, mdb_scope *outRowScope)
NS_IMETHOD GetMetaRow (nsIMdbEnv *ev, const mdbOid *inOptionalMetaRowOid, mdbOid *outOid, nsIMdbRow **acqRow)
NS_IMETHOD GetTableRowCursor (nsIMdbEnv *ev, mdb_pos inRowPos, nsIMdbTableRowCursor **acqCursor)
NS_IMETHOD PosToOid (nsIMdbEnv *ev, mdb_pos inRowPos, mdbOid *outOid)
NS_IMETHOD OidToPos (nsIMdbEnv *ev, const mdbOid *inOid, mdb_pos *outPos)
NS_IMETHOD PosToRow (nsIMdbEnv *ev, mdb_pos inRowPos, nsIMdbRow **acqRow)
NS_IMETHOD RowToPos (nsIMdbEnv *ev, nsIMdbRow *ioRow, mdb_pos *outPos)
NS_IMETHOD AddOid (nsIMdbEnv *ev, const mdbOid *inOid)
NS_IMETHOD HasOid (nsIMdbEnv *ev, const mdbOid *inOid, mdb_bool *outHasOid)
NS_IMETHOD CutOid (nsIMdbEnv *ev, const mdbOid *inOid)
NS_IMETHOD NewRow (nsIMdbEnv *ev, mdbOid *ioOid, nsIMdbRow **acqRow)
NS_IMETHOD AddRow (nsIMdbEnv *ev, nsIMdbRow *ioRow)
NS_IMETHOD HasRow (nsIMdbEnv *ev, nsIMdbRow *ioRow, mdb_bool *outHasRow)
NS_IMETHOD CutRow (nsIMdbEnv *ev, nsIMdbRow *ioRow)
NS_IMETHOD CutAllRows (nsIMdbEnv *ev)
NS_IMETHOD SearchColumnsHint (nsIMdbEnv *ev, const mdbColumnSet *inColumnSet)
NS_IMETHOD SortColumnsHint (nsIMdbEnv *ev, const mdbColumnSet *inColumnSet)
NS_IMETHOD StartBatchChangeHint (nsIMdbEnv *ev, const void *inLabel)
NS_IMETHOD EndBatchChangeHint (nsIMdbEnv *ev, const void *inLabel)
NS_IMETHOD FindRowMatches (nsIMdbEnv *ev, const mdbYarn *inPrefix, nsIMdbTableRowCursor **acqCursor)
NS_IMETHOD GetSearchColumns (nsIMdbEnv *ev, mdb_count *outCount, mdbColumnSet *outColSet)
NS_IMETHOD CanSortColumn (nsIMdbEnv *ev, mdb_column inColumn, mdb_bool *outCanSort)
NS_IMETHOD GetSorting (nsIMdbEnv *ev, mdb_column inColumn, nsIMdbSorting **acqSorting)
NS_IMETHOD SetSearchSorting (nsIMdbEnv *ev, mdb_column inColumn, nsIMdbSorting *ioSorting)
NS_IMETHOD MoveOid (nsIMdbEnv *ev, const mdbOid *inOid, mdb_pos inHintFromPos, mdb_pos inToPos, mdb_pos *outActualPos)
NS_IMETHOD MoveRow (nsIMdbEnv *ev, nsIMdbRow *ioRow, mdb_pos inHintFromPos, mdb_pos inToPos, mdb_pos *outActualPos)
NS_IMETHOD AddIndex (nsIMdbEnv *ev, mdb_column inColumn, nsIMdbThumb **acqThumb)
NS_IMETHOD CutIndex (nsIMdbEnv *ev, mdb_column inColumn, nsIMdbThumb **acqThumb)
NS_IMETHOD HasIndex (nsIMdbEnv *ev, mdb_column inColumn, mdb_bool *outHasIndex)
NS_IMETHOD EnableIndexOnSort (nsIMdbEnv *ev, mdb_column inColumn)
NS_IMETHOD QueryIndexOnSort (nsIMdbEnv *ev, mdb_column inColumn, mdb_bool *outIndexOnSort)
NS_IMETHOD DisableIndexOnSort (nsIMdbEnv *ev, mdb_column inColumn)
void SetTableUnique ()
void SetTableVerbose ()
void SetTableNoted ()
void SetTableRewrite ()
void SetTableNewMeta ()
void ClearTableUnique ()
void ClearTableVerbose ()
void ClearTableNoted ()
void ClearTableRewrite ()
void ClearTableNewMeta ()
mork_bool IsTableUnique () const
mork_bool IsTableVerbose () const
mork_bool IsTableNoted () const
mork_bool IsTableRewrite () const
mork_bool IsTableNewMeta () const
void SetTableDirty ()
void SetTableClean (morkEnv *ev)
mork_bool IsTableClean () const
mork_bool IsTableDirty () const
voidoperator new (size_t inSize, nsIMdbHeap &ioHeap, morkEnv *ev) CPP_THROW_NEW
virtual void CloseMorkNode (morkEnv *ev)
virtual ~morkTable ()
 morkTable (morkEnv *ev, const morkUsage &inUsage, nsIMdbHeap *ioNodeHeap, morkStore *ioStore, nsIMdbHeap *ioSlotHeap, morkRowSpace *ioRowSpace, const mdbOid *inOptionalMetaRowOid, mork_tid inTableId, mork_kind inKind, mork_bool inMustBeUnique)
void CloseTable (morkEnv *ev)
mork_bool IsTable () const
mork_bool HasChangeOverflow () const
void NoteTableSetAll (morkEnv *ev)
void NoteTableMoveRow (morkEnv *ev, morkRow *ioRow, mork_pos inPos)
void note_row_change (morkEnv *ev, mork_change inChange, morkRow *ioRow)
void note_row_move (morkEnv *ev, morkRow *ioRow, mork_pos inNewPos)
void NoteTableAddRow (morkEnv *ev, morkRow *ioRow)
void NoteTableCutRow (morkEnv *ev, morkRow *ioRow)
mork_bool MaybeDirtySpaceStoreAndTable ()
morkRowGetMetaRow (morkEnv *ev, const mdbOid *inOptionalMetaRowOid)
mork_u2 AddTableGcUse (morkEnv *ev)
mork_u2 CutTableGcUse (morkEnv *ev)
mork_seed TableSeed () const
morkRowSafeRowAt (morkEnv *ev, mork_pos inPos)
nsIMdbTableAcquireTableHandle (morkEnv *ev)
mork_count GetRowCount () const
mork_bool IsTableUsed () const
void GetTableOid (morkEnv *ev, mdbOid *outOid)
mork_pos ArrayHasOid (morkEnv *ev, const mdbOid *inOid)
mork_bool MapHasOid (morkEnv *ev, const mdbOid *inOid)
mork_bool AddRow (morkEnv *ev, morkRow *ioRow)
mork_bool CutRow (morkEnv *ev, morkRow *ioRow)
mork_bool CutAllRows (morkEnv *ev)
mork_pos MoveRow (morkEnv *ev, morkRow *ioRow, mork_pos inHintFromPos, mork_pos inToPos)
morkTableRowCursorNewTableRowCursor (morkEnv *ev, mork_pos inRowPos)
NS_DECL_ISUPPORTS NS_IMETHOD IsFrozenMdbObject (nsIMdbEnv *ev, mdb_bool *outIsReadonly)
NS_IMETHOD GetMdbFactory (nsIMdbEnv *ev, nsIMdbFactory **acqFactory)
NS_IMETHOD GetWeakRefCount (nsIMdbEnv *ev, mdb_count *outCount)
NS_IMETHOD GetStrongRefCount (nsIMdbEnv *ev, mdb_count *outCount)
NS_IMETHOD AddWeakRef (nsIMdbEnv *ev)
mork_refs AddWeakRef (morkEnv *ev)
NS_IMETHOD AddStrongRef (nsIMdbEnv *ev)
NS_IMETHOD CutWeakRef (nsIMdbEnv *ev)
mork_refs CutWeakRef (morkEnv *ev)
NS_IMETHOD CutStrongRef (nsIMdbEnv *ev)
NS_IMETHOD CloseMdbObject (nsIMdbEnv *ev)
mdb_err CloseMdbObject (morkEnv *ev)
NS_IMETHOD IsOpenMdbObject (nsIMdbEnv *ev, mdb_bool *outOpen)
void CloseObject (morkEnv *ev)
mork_bool IsObject () const
mork_u4 BeadHash () const
mork_bool BeadEqual (const morkBead *inBead) const
void CloseBead (morkEnv *ev)
mork_bool IsBead () const
void SetFrozen ()
void SetMutable ()
void SetAsleep ()
mork_bool IsFrozen () const
mork_bool IsMutable () const
mork_bool IsAsleep () const
void SetNodeClean ()
void SetNodeDirty ()
mork_bool IsNodeClean () const
mork_bool IsNodeDirty () const
void ZapOld (morkEnv *ev, nsIMdbHeap *ioHeap)
void CloseNode (morkEnv *ev)
mork_bool IsNode () const
void RefsUnderUsesWarning (morkEnv *ev) const
void NonNodeError (morkEnv *ev) const
void NilHeapError (morkEnv *ev) const
void NonOpenNodeError (morkEnv *ev) const
void NonMutableNodeError (morkEnv *ev) const
void RefsOverflowWarning (morkEnv *ev) const
void UsesOverflowWarning (morkEnv *ev) const
void RefsUnderflowWarning (morkEnv *ev) const
void UsesUnderflowWarning (morkEnv *ev) const
mork_bool GoodRefs () const
mork_bool BadRefs () const
mork_uses StrongRefsOnly () const
mork_refs WeakRefsOnly () const
const char * GetNodeAccessAsString () const
const char * GetNodeUsageAsString () const
mork_usage NodeUsage () const
mork_bool IsHeapNode () const
mork_bool IsOpenNode () const
mork_bool IsShutNode () const
mork_bool IsDeadNode () const
mork_bool IsClosingNode () const
mork_bool IsOpenOrClosingNode () const
mork_bool HasNodeAccess () const
void MarkShut ()
void MarkClosing ()
void MarkDead ()
morkLinkNext () const
morkLinkPrev () const
void SelfRefer ()
void Clear ()
void AddBefore (morkLink *old)
void AddAfter (morkLink *old)
void Remove ()
void ZapOldLink (morkEnv *ev, nsIMdbHeap *ioHeap)

Static Public Member Functions

static void NonTableTypeError (morkEnv *ev)
static void NonTableTypeWarning (morkEnv *ev)
static void NilRowSpaceError (morkEnv *ev)
static void TableGcUsesUnderflowWarning (morkEnv *ev)
static void SlotWeakTable (morkTable *me, morkEnv *ev, morkTable **ioSlot)
static void SlotStrongTable (morkTable *me, morkEnv *ev, morkTable **ioSlot)
static void SlotWeakObject (morkObject *me, morkEnv *ev, morkObject **ioSlot)
static void SlotStrongObject (morkObject *me, morkEnv *ev, morkObject **ioSlot)
static void SlotWeakBead (morkBead *me, morkEnv *ev, morkBead **ioSlot)
static void SlotStrongBead (morkBead *me, morkEnv *ev, morkBead **ioSlot)
static voidMakeNew (size_t inSize, nsIMdbHeap &ioHeap, morkEnv *ev)
static void SlotWeakNode (morkNode *me, morkEnv *ev, morkNode **ioSlot)
static void SlotStrongNode (morkNode *me, morkEnv *ev, morkNode **ioSlot)
static voidMakeNewLink (size_t inSize, nsIMdbHeap &ioHeap, morkEnv *ev)

Public Attributes

morkStoremTable_Store
morkRowSpacemTable_RowSpace
morkRowmTable_MetaRow
mdbOid mTable_MetaRowOid
morkRowMapmTable_RowMap
morkArray mTable_RowArray
morkList mTable_ChangeList
mork_u2 mTable_ChangesCount
mork_u2 mTable_ChangesMax
mork_kind mTable_Kind
mork_u1 mTable_Flags
mork_priority mTable_Priority
mork_u1 mTable_GcUses
mork_u1 mTable_Pad
morkHandlemObject_Handle
morkEnvmMorkEnv
mork_color mBead_Color
nsIMdbHeapmNode_Heap
mork_base mNode_Base
mork_derived mNode_Derived
mork_access mNode_Access
mork_usage mNode_Usage
mork_able mNode_Mutable
mork_load mNode_Load
mork_uses mNode_Uses
mork_refs mNode_Refs
morkLinkmLink_Next
morkLinkmLink_Prev

Protected Member Functions

morkRowfind_member_row (morkEnv *ev, morkRow *ioRow)
void build_row_map (morkEnv *ev)

Private Member Functions

 morkTable (const morkTable &other)
morkTableoperator= (const morkTable &other)

Friends

class morkHandleFrame

Detailed Description

Definition at line 109 of file morkTable.h.


Constructor & Destructor Documentation

morkTable::~morkTable ( ) [virtual]

Definition at line 104 of file morkTable.cpp.

Here is the call graph for this function:

morkTable::morkTable ( morkEnv ev,
const morkUsage inUsage,
nsIMdbHeap ioNodeHeap,
morkStore ioStore,
nsIMdbHeap ioSlotHeap,
morkRowSpace ioRowSpace,
const mdbOid inOptionalMetaRowOid,
mork_tid  inTableId,
mork_kind  inKind,
mork_bool  inMustBeUnique 
)

Definition at line 113 of file morkTable.cpp.

: morkObject(ev, inUsage, ioHeap, (mork_color) inTid, (morkHandle*) 0)
, mTable_Store( 0 )
, mTable_RowSpace( 0 )
, mTable_MetaRow( 0 )

, mTable_RowMap( 0 )
// , mTable_RowMap(ev, morkUsage::kMember, (nsIMdbHeap*) 0, ioSlotHeap,
//   morkTable_kStartRowMapSlotCount)
, mTable_RowArray(ev, morkUsage::kMember, (nsIMdbHeap*) 0,
  morkTable_kStartRowArraySize, ioSlotHeap)
  
, mTable_ChangeList()
, mTable_ChangesCount( 0 )
, mTable_ChangesMax( 3 ) // any very small number greater than zero

, mTable_Kind( inKind )

, mTable_Flags( 0 )
, mTable_Priority( morkPriority_kLo ) // NOT high priority
, mTable_GcUses( 0 )
, mTable_Pad( 0 )
{
  this->mLink_Next = 0;
  this->mLink_Prev = 0;
  
  if ( ev->Good() )
  {
    if ( ioStore && ioSlotHeap && ioRowSpace )
    {
      if ( inKind )
      {
        if ( inMustBeUnique )
          this->SetTableUnique();
        mTable_Store = ioStore;
        mTable_RowSpace = ioRowSpace;
        if ( inOptionalMetaRowOid )
          mTable_MetaRowOid = *inOptionalMetaRowOid;
        else
        {
          mTable_MetaRowOid.mOid_Scope = 0;
          mTable_MetaRowOid.mOid_Id = morkRow_kMinusOneRid;
        }
        if ( ev->Good() )
        {
          if ( this->MaybeDirtySpaceStoreAndTable() )
            this->SetTableRewrite(); // everything is dirty
            
          mNode_Derived = morkDerived_kTable;
        }
        this->MaybeDirtySpaceStoreAndTable(); // new table might dirty store
      }
      else
        ioRowSpace->ZeroKindError(ev);
    }
    else
      ev->NilPointerError();
  }
}

Here is the call graph for this function:

morkTable::morkTable ( const morkTable other) [private]

Member Function Documentation

Definition at line 1227 of file morkTable.cpp.

{
  AddRef();
  return this;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void morkLink::AddAfter ( morkLink old) [inline, inherited]

Definition at line 138 of file morkDeque.h.

  {
    ((old)->mLink_Next->mLink_Prev = (this))->mLink_Next = (old)->mLink_Next;
    ((this)->mLink_Prev = (old))->mLink_Next = this;
  }
void morkLink::AddBefore ( morkLink old) [inline, inherited]

Definition at line 132 of file morkDeque.h.

  {
    ((old)->mLink_Prev->mLink_Next = (this))->mLink_Prev = (old)->mLink_Prev;
    ((this)->mLink_Next = (old))->mLink_Prev = this;
  }
NS_IMETHODIMP morkTable::AddIndex ( nsIMdbEnv ev,
mdb_column  inColumn,
nsIMdbThumb **  acqThumb 
) [virtual]

Implements nsIMdbTable.

Definition at line 919 of file morkTable.cpp.

{
  NS_ASSERTION(PR_FALSE, "not implemented");
  return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP morkTable::AddOid ( nsIMdbEnv ev,
const mdbOid inOid 
) [virtual]

Implements nsIMdbTable.

Definition at line 568 of file morkTable.cpp.

{
  NS_ASSERTION(PR_FALSE, "not implemented");
  return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP morkTable::AddRow ( nsIMdbEnv ev,
nsIMdbRow ioRow 
) [virtual]

Implements nsIMdbTable.

Definition at line 651 of file morkTable.cpp.

{
  mdb_err outErr = 0;
  morkEnv* ev = morkEnv::FromMdbEnv(mev);
  if ( ev )
  {
    morkRowObject *rowObj = (morkRowObject *) ioRow;
    morkRow* row = rowObj->mRowObject_Row;
    AddRow(ev, row);
    outErr = ev->AsErr();
  }
  return outErr;
}

Here is the call graph for this function:

Here is the caller graph for this function:

mork_bool morkTable::AddRow ( morkEnv ev,
morkRow ioRow 
)

Definition at line 1421 of file morkTable.cpp.

{
  morkRow* row = this->find_member_row(ev, ioRow);
  if ( !row && ev->Good() )
  {
    mork_bool canDirty = ( this->IsTableClean() )?
      this->MaybeDirtySpaceStoreAndTable() : morkBool_kTrue;
      
    mork_pos pos = mTable_RowArray.AppendSlot(ev, ioRow);
    if ( ev->Good() && pos >= 0 )
    {
      ioRow->AddRowGcUse(ev);
      if ( mTable_RowMap )
      {
        if ( mTable_RowMap->AddRow(ev, ioRow) )
        {
          // okay, anything else?
        }
        else
          mTable_RowArray.CutSlot(ev, pos);
      }
      else if ( mTable_RowArray.mArray_Fill >= morkTable_kMakeRowMapThreshold )
        this->build_row_map(ev);

      if ( canDirty && ev->Good() )
        this->NoteTableAddRow(ev, ioRow);
    }
  }
  return ev->Good();
}

Here is the call graph for this function:

NS_IMETHODIMP morkObject::AddStrongRef ( nsIMdbEnv ev) [virtual, inherited]

Implements nsIMdbObject.

Reimplemented in morkStore, and morkCursor.

Definition at line 181 of file morkObject.cpp.

{
  return morkNode::AddStrongRef((morkEnv *) mev);
}

Here is the caller graph for this function:

Reimplemented from morkNode.

Definition at line 985 of file morkTable.cpp.

{
  return (mork_refs) AddRef();
}

Here is the call graph for this function:

Definition at line 997 of file morkTable.cpp.

{
  MORK_USED_1(ev); 
  if ( mTable_GcUses < morkTable_kMaxTableGcUses ) // not already maxed out?
    ++mTable_GcUses;
    
  return mTable_GcUses;
}

Here is the caller graph for this function:

NS_IMETHODIMP morkObject::AddWeakRef ( nsIMdbEnv ev) [virtual, inherited]

Implements nsIMdbObject.

Reimplemented in morkStore, and morkCursor.

Definition at line 176 of file morkObject.cpp.

{
  return morkNode::AddWeakRef((morkEnv *) mev);
}
mork_refs morkNode::AddWeakRef ( morkEnv ev) [inherited]

Definition at line 599 of file morkNode.cpp.

{
  mork_refs outRefs = 0;
  if ( this )
  {
    if ( this->IsNode() )
    {
      mork_refs refs = mNode_Refs;
      if ( refs < morkNode_kMaxRefCount ) // not too great?
        mNode_Refs = ++refs;
      else
        this->RefsOverflowWarning(ev);
        
      outRefs = refs;
    }
    else
      this->NonNodeError(ev);
  }
  else
    ev->NilPointerError();
  return outRefs;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1234 of file morkTable.cpp.

{
  MORK_USED_1(ev); 
  mork_count count = mTable_RowArray.mArray_Fill;
  mork_pos pos = -1;
  while ( ++pos < (mork_pos)count )
  {
    morkRow* row = (morkRow*) mTable_RowArray.At(pos);
    MORK_ASSERT(row);
    if ( row && row->EqualOid(inOid) )
    {
      return pos;
    }
  }
  return -1;
}

Here is the call graph for this function:

Here is the caller graph for this function:

mork_bool morkNode::BadRefs ( ) const [inline, inherited]

Definition at line 217 of file morkNode.h.

{ return mNode_Refs < mNode_Uses; }
mork_bool morkBead::BeadEqual ( const morkBead inBead) const [inline, inherited]

Definition at line 88 of file morkBead.h.

  { return ( mBead_Color == inBead->mBead_Color); }

Here is the caller graph for this function:

mork_u4 morkBead::BeadHash ( ) const [inline, inherited]

Definition at line 87 of file morkBead.h.

{ return (mork_u4) mBead_Color; }

Here is the caller graph for this function:

NS_IMETHODIMP morkTable::BecomeContent ( nsIMdbEnv ev,
const mdbOid inOid 
) [virtual]

Implements nsIMdbCollection.

Definition at line 264 of file morkTable.cpp.

{
  NS_ASSERTION(PR_FALSE, "not implemented"); 
  return NS_ERROR_NOT_IMPLEMENTED;
  // remember table->MaybeDirtySpaceStoreAndTable();
}
void morkTable::build_row_map ( morkEnv ev) [protected]

Definition at line 1260 of file morkTable.cpp.

{
  morkRowMap* map = mTable_RowMap;
  if ( !map )
  {
    mork_count count = mTable_RowArray.mArray_Fill + 3;
    nsIMdbHeap* heap = mTable_Store->mPort_Heap;
    map = new(*heap, ev) morkRowMap(ev, morkUsage::kHeap, heap, heap, count);
    if ( map )
    {
      if ( ev->Good() )
      {
        mTable_RowMap = map; // put strong ref here
        count = mTable_RowArray.mArray_Fill;
        mork_pos pos = -1;
        while ( ++pos < (mork_pos)count )
        {
          morkRow* row = (morkRow*) mTable_RowArray.At(pos);
          if ( row && row->IsRow() )
            map->AddRow(ev, row);
          else
            row->NonRowTypeError(ev);
        }
      }
      else
        map->CutStrongRef(ev);
    }
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

NS_IMETHODIMP morkTable::CanSortColumn ( nsIMdbEnv ev,
mdb_column  inColumn,
mdb_bool outCanSort 
) [virtual]

Implements nsIMdbTable.

Definition at line 808 of file morkTable.cpp.

{
  NS_ASSERTION(PR_FALSE, "not implemented");
  return NS_ERROR_NOT_IMPLEMENTED;
}
void morkLink::Clear ( ) [inline, inherited]

Definition at line 130 of file morkDeque.h.

Definition at line 466 of file morkTable.h.

Definition at line 464 of file morkTable.h.

Definition at line 465 of file morkTable.h.

Definition at line 462 of file morkTable.h.

Definition at line 463 of file morkTable.h.

Here is the caller graph for this function:

void morkBead::CloseBead ( morkEnv ev) [inherited]

Definition at line 109 of file morkBead.cpp.

{
  if ( this )
  {
    if ( this->IsNode() )
    {
      if ( !this->IsShutNode() )
      {
        mBead_Color = 0;
        this->MarkShut();
      }
    }
    else
      this->NonNodeError(ev);
  }
  else
    ev->NilPointerError();
}

Here is the call graph for this function:

Here is the caller graph for this function:

NS_IMETHODIMP morkObject::CloseMdbObject ( nsIMdbEnv ev) [virtual, inherited]

Implements nsIMdbObject.

Reimplemented in morkStore, and morkCursor.

Definition at line 199 of file morkObject.cpp.

{
  return morkNode::CloseMdbObject((morkEnv *) mev);
}
mdb_err morkNode::CloseMdbObject ( morkEnv ev) [inherited]

Definition at line 243 of file morkNode.cpp.

{
  // if only one ref, Handle_CutStrongRef will clean up better.
  if (mNode_Uses == 1)
    return CutStrongRef(ev);

  mdb_err outErr = 0;
  
  if ( IsNode() && IsOpenNode() )
  {
    if ( ev )
    {
      CloseMorkNode(ev);
      outErr = ev->AsErr();
    }
  }
  return outErr;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void morkTable::CloseMorkNode ( morkEnv ev) [virtual]

Reimplemented from morkObject.

Definition at line 92 of file morkTable.cpp.

{
  if ( this->IsOpenNode() )
  {
    morkObject::CloseMorkNode(ev); // give base class a chance.
    this->MarkClosing();
    this->CloseTable(ev);
    this->MarkShut();
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void morkNode::CloseNode ( morkEnv ev) [inherited]

Definition at line 384 of file morkNode.cpp.

{
  if ( this )
  {
    if ( this->IsNode() )
      this->MarkShut();
    else
      this->NonNodeError(ev);
  }
  else
    ev->NilPointerError();
}

Here is the call graph for this function:

Here is the caller graph for this function:

void morkObject::CloseObject ( morkEnv ev) [inherited]

Definition at line 119 of file morkObject.cpp.

{
  if ( this )
  {
    if ( this->IsNode() )
    {
      if ( !this->IsShutNode() )
      {
        if ( mObject_Handle )
          morkHandle::SlotWeakHandle((morkHandle*) 0L, ev, &mObject_Handle);
          
        mBead_Color = 0; // this->CloseBead(ev);
        this->MarkShut();
      }
    }
    else
      this->NonNodeError(ev);
  }
  else
    ev->NilPointerError();
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 180 of file morkTable.cpp.

{
  if ( this )
  {
    if ( this->IsNode() )
    {
      morkRowMap::SlotStrongRowMap((morkRowMap*) 0, ev, &mTable_RowMap);
      // mTable_RowMap.CloseMorkNode(ev);
      mTable_RowArray.CloseMorkNode(ev);
      mTable_Store = 0;
      mTable_RowSpace = 0;
      this->MarkShut();
    }
    else
      this->NonNodeError(ev);
  }
  else
    ev->NilPointerError();
}

Here is the call graph for this function:

Here is the caller graph for this function:

Implements nsIMdbTable.

Definition at line 705 of file morkTable.cpp.

{
  mdb_err outErr = 0;
  morkEnv* ev = morkEnv::FromMdbEnv(mev);
  if ( ev )
  {
    CutAllRows(ev);
    outErr = ev->AsErr();
  }
  return outErr;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1498 of file morkTable.cpp.

{
  if ( this->MaybeDirtySpaceStoreAndTable() )
  {
    this->SetTableRewrite(); // everything is dirty
    this->NoteTableSetAll(ev);
  }
    
  if ( ev->Good() )
  {
    mTable_RowArray.CutAllSlots(ev);
    if ( mTable_RowMap )
    {
      morkRowMapIter i(ev, mTable_RowMap);
      mork_change* c = 0;
      morkRow* r = 0;
      
      for ( c = i.FirstRow(ev, &r); c;  c = i.NextRow(ev, &r) )
      {
        if ( r )
        {
          if ( r->CutRowGcUse(ev) == 0 )
            r->OnZeroRowGcUse(ev);
            
          i.CutHereRow(ev, (morkRow**) 0);
        }
        else
          ev->NewWarning("nil row in table map");
      }
    }
  }
  return ev->Good();
}

Here is the call graph for this function:

NS_IMETHODIMP morkTable::CutIndex ( nsIMdbEnv ev,
mdb_column  inColumn,
nsIMdbThumb **  acqThumb 
) [virtual]

Implements nsIMdbTable.

Definition at line 931 of file morkTable.cpp.

{
  NS_ASSERTION(PR_FALSE, "not implemented");
  return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP morkTable::CutOid ( nsIMdbEnv ev,
const mdbOid inOid 
) [virtual]

Implements nsIMdbTable.

Definition at line 594 of file morkTable.cpp.

{
  mdb_err outErr = 0;
  morkEnv* ev = morkEnv::FromMdbEnv(mev);
  if ( ev )
  {
    if ( inOid && mTable_Store )
    {
      morkRow* row = mTable_Store->GetRow(ev, inOid);
      if ( row )
        CutRow(ev, row);
    }
    else
      ev->NilPointerError();
      
    outErr = ev->AsErr();
  }
  return outErr;
}

Here is the call graph for this function:

NS_IMETHODIMP morkTable::CutRow ( nsIMdbEnv ev,
nsIMdbRow ioRow 
) [virtual]

Implements nsIMdbTable.

Definition at line 688 of file morkTable.cpp.

{
  mdb_err outErr = 0;
  morkEnv* ev = morkEnv::FromMdbEnv(mev);
  if ( ev )
  {
    morkRowObject *rowObj = (morkRowObject *) ioRow;
    morkRow* row = rowObj->mRowObject_Row;
    CutRow(ev, row);
    outErr = ev->AsErr();
  }
  return outErr;
}

Here is the call graph for this function:

Here is the caller graph for this function:

mork_bool morkTable::CutRow ( morkEnv ev,
morkRow ioRow 
)

Definition at line 1453 of file morkTable.cpp.

{
  morkRow* row = this->find_member_row(ev, ioRow);
  if ( row )
  {
    mork_bool canDirty = ( this->IsTableClean() )?
      this->MaybeDirtySpaceStoreAndTable() : morkBool_kTrue;
      
    mork_count count = mTable_RowArray.mArray_Fill;
    morkRow** rowSlots = (morkRow**) mTable_RowArray.mArray_Slots;
    if ( rowSlots ) // array has vector as expected?
    {
      mork_pos pos = -1;
      morkRow** end = rowSlots + count;
      morkRow** slot = rowSlots - 1; // prepare for preincrement:
      while ( ++slot < end ) // another slot to check?
      {
        if ( *slot == row ) // found the slot containing row?
        {
          pos = slot - rowSlots; // record absolute position
          break; // end while loop
        }
      }
      if ( pos >= 0 ) // need to cut if from the array?
        mTable_RowArray.CutSlot(ev, pos);
      else
        ev->NewWarning("row not found in array");
    }
    else
      mTable_RowArray.NilSlotsAddressError(ev);
      
    if ( mTable_RowMap )
      mTable_RowMap->CutRow(ev, ioRow);

    if ( canDirty )
      this->NoteTableCutRow(ev, ioRow);

    if ( ioRow->CutRowGcUse(ev) == 0 )
      ioRow->OnZeroRowGcUse(ev);
  }
  return ev->Good();
}

Here is the call graph for this function:

NS_IMETHODIMP morkObject::CutStrongRef ( nsIMdbEnv ev) [virtual, inherited]

Implements nsIMdbObject.

Reimplemented in morkStore, and morkCursor.

Definition at line 192 of file morkObject.cpp.

{
  return morkNode::CutStrongRef((morkEnv *) mev);
}

Here is the caller graph for this function:

Reimplemented from morkNode.

Definition at line 991 of file morkTable.cpp.

{
  return (mork_refs) Release();
}

Definition at line 1007 of file morkTable.cpp.

{
  if ( mTable_GcUses ) // any outstanding uses to cut?
  {
    if ( mTable_GcUses < morkTable_kMaxTableGcUses ) // not frozen at max?
      --mTable_GcUses;
  }
  else
    this->TableGcUsesUnderflowWarning(ev);
    
  return mTable_GcUses;
}

Here is the call graph for this function:

NS_IMETHODIMP morkObject::CutWeakRef ( nsIMdbEnv ev) [virtual, inherited]

Implements nsIMdbObject.

Reimplemented in morkStore, and morkCursor.

Definition at line 187 of file morkObject.cpp.

{
  return morkNode::CutWeakRef((morkEnv *) mev);
}

Here is the caller graph for this function:

mork_refs morkNode::CutWeakRef ( morkEnv ev) [inherited]

Definition at line 623 of file morkNode.cpp.

{
  mork_refs outRefs = 0;
  if ( this )
  {
    if ( this->IsNode() )
    {
      mork_uses uses = mNode_Uses;
      mork_refs refs = mNode_Refs;
      if ( refs ) // not yet zero?
        mNode_Refs = --refs;
      else
        this->RefsUnderflowWarning(ev);

      if ( refs < uses ) // need to fix broken refs/uses relation?
      { 
        this->RefsUnderUsesWarning(ev);
        mNode_Refs = mNode_Uses = refs = uses;
      }
        
      outRefs = refs;
      if ( !refs ) // last reference gone? time to destroy node?
        this->ZapOld(ev, mNode_Heap); // self destroy, use this no longer
    }
    else
      this->NonNodeError(ev);
  }
  else
    ev->NilPointerError();
  return outRefs;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Implements nsIMdbTable.

Definition at line 972 of file morkTable.cpp.

{
  NS_ASSERTION(PR_FALSE, "not implemented");
  return NS_ERROR_NOT_IMPLEMENTED;
}

Implements nsIMdbCollection.

Definition at line 276 of file morkTable.cpp.

{
  NS_ASSERTION(PR_FALSE, "not implemented"); 
  return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP morkTable::EnableIndexOnSort ( nsIMdbEnv ev,
mdb_column  inColumn 
) [virtual]

Implements nsIMdbTable.

Definition at line 953 of file morkTable.cpp.

{
  NS_ASSERTION(PR_FALSE, "not implemented");
  return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP morkTable::EndBatchChangeHint ( nsIMdbEnv ev,
const void inLabel 
) [virtual]

Implements nsIMdbTable.

Definition at line 785 of file morkTable.cpp.

{
  // we don't do anything here.
  return NS_OK;
}
morkRow * morkTable::find_member_row ( morkEnv ev,
morkRow ioRow 
) [protected]

Definition at line 1290 of file morkTable.cpp.

{
  if ( mTable_RowMap )
    return mTable_RowMap->GetRow(ev, ioRow);
  else
  {
    mork_count count = mTable_RowArray.mArray_Fill;
    mork_pos pos = -1;
    while ( ++pos < (mork_pos)count )
    {
      morkRow* row = (morkRow*) mTable_RowArray.At(pos);
      if ( row == ioRow )
        return row;
    }
  }
  return (morkRow*) 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

NS_IMETHODIMP morkTable::FindRowMatches ( nsIMdbEnv ev,
const mdbYarn inPrefix,
nsIMdbTableRowCursor **  acqCursor 
) [virtual]

Implements nsIMdbTable.

Definition at line 721 of file morkTable.cpp.

{
  NS_ASSERTION(PR_FALSE, "not implemented");
  return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP morkTable::GetCount ( nsIMdbEnv ev,
mdb_count outCount 
) [virtual]

Implements nsIMdbCollection.

Definition at line 222 of file morkTable.cpp.

{
  NS_ENSURE_ARG_POINTER(outCount);
  *outCount = mTable_RowArray.mArray_Fill;
  return NS_OK;
}
NS_IMETHODIMP morkTable::GetCursor ( nsIMdbEnv ev,
mdb_pos  inMemberPos,
nsIMdbCursor **  acqCursor 
) [virtual]

Implements nsIMdbCollection.

Definition at line 243 of file morkTable.cpp.

{
  return this->GetTableRowCursor(mev, inMemberPos,
    (nsIMdbTableRowCursor**) acqCursor);
}

Here is the call graph for this function:

NS_IMETHODIMP morkObject::GetMdbFactory ( nsIMdbEnv ev,
nsIMdbFactory **  acqFactory 
) [virtual, inherited]

Implements nsIMdbObject.

Definition at line 146 of file morkObject.cpp.

{
  nsresult rv;
  nsCOMPtr <nsIMdbObject> obj = do_QueryInterface(mev);
  if (obj)
    rv = obj->GetMdbFactory(mev, acqFactory);
  else
    return NS_ERROR_NO_INTERFACE;

  return rv;
} 

Here is the call graph for this function:

NS_IMETHODIMP morkTable::GetMetaRow ( nsIMdbEnv ev,
const mdbOid inOptionalMetaRowOid,
mdbOid outOid,
nsIMdbRow **  acqRow 
) [virtual]

Implements nsIMdbTable.

Definition at line 391 of file morkTable.cpp.

{
  mdb_err outErr = 0;
  nsIMdbRow* outRow = 0;
  morkEnv* ev = morkEnv::FromMdbEnv(mev);
  if ( ev )
  {
    morkRow* row = GetMetaRow(ev, inOptionalMetaRowOid);
    if ( row && ev->Good() )
    {
      if ( outOid )
        *outOid = row->mRow_Oid;
        
      outRow = row->AcquireRowHandle(ev, mTable_Store);
    }
    outErr = ev->AsErr();
  }
  if ( acqRow )
    *acqRow = outRow;
    
  if ( ev->Bad() && outOid )
  {
    outOid->mOid_Scope = 0;
    outOid->mOid_Id = morkRow_kMinusOneRid;
  }
  return outErr;
}

Here is the call graph for this function:

Here is the caller graph for this function:

morkRow * morkTable::GetMetaRow ( morkEnv ev,
const mdbOid inOptionalMetaRowOid 
)

Definition at line 1181 of file morkTable.cpp.

{
  morkRow* outRow = mTable_MetaRow;
  if ( !outRow )
  {
    morkStore* store = mTable_Store;
    mdbOid* oid = &mTable_MetaRowOid;
    if ( inOptionalMetaRowOid && !oid->mOid_Scope )
      *oid = *inOptionalMetaRowOid;
      
    if ( oid->mOid_Scope ) // oid already recorded in table?
      outRow = store->OidToRow(ev, oid);
    else
    {
      outRow = store->NewRow(ev, morkStore_kMetaScope);
      if ( outRow ) // need to record new oid in table?
        *oid = outRow->mRow_Oid;
    }
    mTable_MetaRow = outRow;
    if ( outRow ) // need to note another use of this row?
    {
      outRow->AddRowGcUse(ev);

      this->SetTableNewMeta();
      if ( this->IsTableClean() ) // catch dirty status of meta row?
        this->MaybeDirtySpaceStoreAndTable();
    }
  }
  
  return outRow;
}

Here is the call graph for this function:

const char * morkNode::GetNodeAccessAsString ( ) const [inherited]

Definition at line 658 of file morkNode.cpp.

{
  const char* outString = morkNode_kBroken;
  switch( mNode_Access )
  {
    case morkAccess_kOpen: outString = "open"; break;
    case morkAccess_kClosing: outString = "closing"; break;
    case morkAccess_kShut: outString = "shut"; break;
    case morkAccess_kDead: outString = "dead"; break;
  }
  return outString;
}
const char * morkNode::GetNodeUsageAsString ( ) const [inherited]

Definition at line 672 of file morkNode.cpp.

{
  const char* outString = morkNode_kBroken;
  switch( mNode_Usage )
  {
    case morkUsage_kHeap: outString = "heap"; break;
    case morkUsage_kStack: outString = "stack"; break;
    case morkUsage_kMember: outString = "member"; break;
    case morkUsage_kGlobal: outString = "global"; break;
    case morkUsage_kPool: outString = "pool"; break;
    case morkUsage_kNone: outString = "none"; break;
  }
  return outString;
}
NS_IMETHODIMP morkTable::GetOid ( nsIMdbEnv ev,
mdbOid outOid 
) [virtual]

Implements nsIMdbCollection.

Definition at line 255 of file morkTable.cpp.

{
  morkEnv* ev = morkEnv::FromMdbEnv(mev);
  GetTableOid(ev, outOid);
  return NS_OK;
}

Here is the call graph for this function:

NS_IMETHODIMP morkTable::GetPort ( nsIMdbEnv ev,
nsIMdbPort **  acqPort 
) [virtual]

Implements nsIMdbCollection.

Definition at line 231 of file morkTable.cpp.

{
  morkEnv* ev = morkEnv::FromMdbEnv(mev);
  NS_ENSURE_ARG_POINTER(acqPort);    
  *acqPort = mTable_Store;
  return NS_OK;
}

Here is the call graph for this function:

mork_count morkTable::GetRowCount ( ) const [inline]

Definition at line 567 of file morkTable.h.

Here is the caller graph for this function:

NS_IMETHODIMP morkTable::GetRowScope ( nsIMdbEnv ev,
mdb_scope outRowScope 
) [virtual]

Implements nsIMdbTable.

Definition at line 371 of file morkTable.cpp.

{
  mdb_err outErr = 0;
  mdb_scope rowScope = 0;
  morkEnv* ev = morkEnv::FromMdbEnv(mev);
  if ( ev )
  {
    if ( mTable_RowSpace )
      rowScope = mTable_RowSpace->SpaceScope();
    else
      NilRowSpaceError(ev);

    outErr = ev->AsErr();
  }
  if ( outRowScope )
    *outRowScope = rowScope;
  return outErr;
}

Here is the call graph for this function:

NS_IMETHODIMP morkTable::GetSearchColumns ( nsIMdbEnv ev,
mdb_count outCount,
mdbColumnSet outColSet 
) [virtual]

Implements nsIMdbTable.

Definition at line 731 of file morkTable.cpp.

{
  NS_ASSERTION(PR_FALSE, "not implemented");
  return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP morkTable::GetSeed ( nsIMdbEnv ev,
mdb_seed outSeed 
) [virtual]

Implements nsIMdbCollection.

Definition at line 208 of file morkTable.cpp.

{
  mdb_err outErr = 0;
  morkEnv* ev = morkEnv::FromMdbEnv(mev);
  if ( ev )
  {
    *outSeed = mTable_RowArray.mArray_Seed;
    outErr = ev->AsErr();
  }
  return outErr;
}

Here is the call graph for this function:

NS_IMETHODIMP morkTable::GetSorting ( nsIMdbEnv ev,
mdb_column  inColumn,
nsIMdbSorting **  acqSorting 
) [virtual]

Implements nsIMdbTable.

Definition at line 818 of file morkTable.cpp.

{
  NS_ASSERTION(PR_FALSE, "not implemented");
  return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP morkObject::GetStrongRefCount ( nsIMdbEnv ev,
mdb_count outCount 
) [virtual, inherited]

Implements nsIMdbObject.

Reimplemented in morkStore, and morkCursor.

Definition at line 168 of file morkObject.cpp.

{
  *outCount = StrongRefsOnly();
  return NS_OK;
}

Here is the call graph for this function:

NS_IMETHODIMP morkTable::GetTableBeVerbose ( nsIMdbEnv ev,
mdb_bool outBeVerbose 
) [virtual]

Implements nsIMdbTable.

Definition at line 330 of file morkTable.cpp.

{
  NS_ENSURE_ARG_POINTER(outBeVerbose);
  *outBeVerbose = IsTableVerbose();
  return NS_OK;
}

Here is the call graph for this function:

NS_IMETHODIMP morkTable::GetTableIsUnique ( nsIMdbEnv ev,
mdb_bool outIsUnique 
) [virtual]

Implements nsIMdbTable.

Definition at line 355 of file morkTable.cpp.

{
  NS_ENSURE_ARG_POINTER(outIsUnique);
  *outIsUnique = IsTableUnique();
  return NS_OK;
}

Here is the call graph for this function:

NS_IMETHODIMP morkTable::GetTableKind ( nsIMdbEnv ev,
mdb_kind outTableKind 
) [virtual]

Implements nsIMdbTable.

Definition at line 363 of file morkTable.cpp.

{
  NS_ENSURE_ARG_POINTER(outTableKind);
  *outTableKind = mTable_Kind;
  return NS_OK;
}
void morkTable::GetTableOid ( morkEnv ev,
mdbOid outOid 
)

Definition at line 1214 of file morkTable.cpp.

{
  morkRowSpace* space = mTable_RowSpace;
  if ( space )
  {
    outOid->mOid_Scope = space->SpaceScope();
    outOid->mOid_Id = this->TableId();
  }
  else
    this->NilRowSpaceError(ev);
}

Here is the call graph for this function:

Here is the caller graph for this function:

NS_IMETHODIMP morkTable::GetTablePriority ( nsIMdbEnv ev,
mdb_priority outPrio 
) [virtual]

Implements nsIMdbTable.

Definition at line 308 of file morkTable.cpp.

{
  mdb_err outErr = 0;
  mork_priority prio = 0;
  morkEnv* ev = morkEnv::FromMdbEnv(mev);
  if ( ev )
  {
    prio = mTable_Priority;
    if ( prio > morkPriority_kMax )
    {
      prio = morkPriority_kMax;
      mTable_Priority = prio;
    }
    outErr = ev->AsErr();
  }
  if ( outPrio )
    *outPrio = prio;
  return outErr;
}

Here is the call graph for this function:

NS_IMETHODIMP morkTable::GetTableRowCursor ( nsIMdbEnv ev,
mdb_pos  inRowPos,
nsIMdbTableRowCursor **  acqCursor 
) [virtual]

Implements nsIMdbTable.

Definition at line 448 of file morkTable.cpp.

{
  mdb_err outErr = 0;
  nsIMdbTableRowCursor* outCursor = 0;
  morkEnv* ev = morkEnv::FromMdbEnv(mev);
  if ( ev )
  {
    morkTableRowCursor* cursor = NewTableRowCursor(ev, inRowPos);
    if ( cursor )
    {
      if ( ev->Good() )
      {
        // cursor->mCursor_Seed = (mork_seed) inRowPos;
        outCursor = cursor;
        outCursor->AddRef();
      }
    }
      
    outErr = ev->AsErr();
  }
  if ( acqCursor )
    *acqCursor = outCursor;
  return outErr;
}

Here is the call graph for this function:

Here is the caller graph for this function:

NS_IMETHODIMP morkObject::GetWeakRefCount ( nsIMdbEnv ev,
mdb_count outCount 
) [virtual, inherited]

Implements nsIMdbObject.

Reimplemented in morkStore, and morkCursor.

Definition at line 161 of file morkObject.cpp.

{
  *outCount = WeakRefsOnly();
  return NS_OK;
}  

Here is the call graph for this function:

mork_bool morkNode::GoodRefs ( ) const [inline, inherited]

Definition at line 216 of file morkNode.h.

{ return mNode_Refs >= mNode_Uses; }

Definition at line 529 of file morkTable.h.

Here is the caller graph for this function:

NS_IMETHODIMP morkTable::HasIndex ( nsIMdbEnv ev,
mdb_column  inColumn,
mdb_bool outHasIndex 
) [virtual]

Implements nsIMdbTable.

Definition at line 943 of file morkTable.cpp.

{
  NS_ASSERTION(PR_FALSE, "not implemented");
  return NS_ERROR_NOT_IMPLEMENTED;
}
mork_bool morkNode::HasNodeAccess ( ) const [inline, inherited]

Definition at line 251 of file morkNode.h.

  { return ( IsOpenNode() || IsShutNode() || IsClosingNode() ); }

Here is the call graph for this function:

NS_IMETHODIMP morkTable::HasOid ( nsIMdbEnv ev,
const mdbOid inOid,
mdb_bool outHasOid 
) [virtual]

Implements nsIMdbTable.

Definition at line 577 of file morkTable.cpp.

{
  mdb_err outErr = 0;
  morkEnv* ev = morkEnv::FromMdbEnv(mev);
  if ( ev )
  {
    if ( outHasOid )
      *outHasOid = MapHasOid(ev, inOid);
    outErr = ev->AsErr();
  }
  return outErr;
}

Here is the call graph for this function:

NS_IMETHODIMP morkTable::HasRow ( nsIMdbEnv ev,
nsIMdbRow ioRow,
mdb_bool outHasRow 
) [virtual]

Implements nsIMdbTable.

Definition at line 668 of file morkTable.cpp.

{
  mdb_err outErr = 0;
  morkEnv* ev = morkEnv::FromMdbEnv(mev);
  if ( ev )
  {
    morkRowObject *rowObj = (morkRowObject *) ioRow;
    morkRow* row = rowObj->mRowObject_Row;
    if ( outBool )
      *outBool = MapHasOid(ev, &row->mRow_Oid);
    outErr = ev->AsErr();
  }
  return outErr;
}

Here is the call graph for this function:

mork_bool morkNode::IsAsleep ( ) const [inline, inherited]

Definition at line 142 of file morkNode.h.

mork_bool morkBead::IsBead ( ) const [inline, inherited]

Definition at line 113 of file morkBead.h.

  { return IsNode() && mNode_Derived == morkDerived_kBead; }

Here is the call graph for this function:

mork_bool morkNode::IsClosingNode ( ) const [inline, inherited]

Definition at line 245 of file morkNode.h.

Here is the caller graph for this function:

mork_bool morkNode::IsDeadNode ( ) const [inline, inherited]

Definition at line 242 of file morkNode.h.

Here is the caller graph for this function:

mork_bool morkNode::IsFrozen ( ) const [inline, inherited]

Definition at line 140 of file morkNode.h.

Here is the caller graph for this function:

NS_IMETHODIMP morkObject::IsFrozenMdbObject ( nsIMdbEnv ev,
mdb_bool outIsReadonly 
) [virtual, inherited]

Implements nsIMdbObject.

Reimplemented in morkCursor.

Definition at line 211 of file morkObject.cpp.

{
  *outIsReadonly = IsFrozen();
  return NS_OK;
}

Here is the call graph for this function:

mork_bool morkNode::IsHeapNode ( ) const [inline, inherited]

Definition at line 233 of file morkNode.h.

  { return mNode_Usage == morkUsage_kHeap; }
mork_bool morkNode::IsMutable ( ) const [inline, inherited]

Definition at line 141 of file morkNode.h.

Here is the caller graph for this function:

mork_bool morkNode::IsNode ( ) const [inline, inherited]

Definition at line 193 of file morkNode.h.

  { return mNode_Base == morkBase_kNode; }
mork_bool morkNode::IsNodeClean ( ) const [inline, inherited]

Definition at line 147 of file morkNode.h.

{ return mNode_Load == morkLoad_kClean; }

Here is the caller graph for this function:

mork_bool morkNode::IsNodeDirty ( ) const [inline, inherited]

Definition at line 148 of file morkNode.h.

{ return mNode_Load == morkLoad_kDirty; }

Here is the caller graph for this function:

mork_bool morkObject::IsObject ( ) const [inline, inherited]

Definition at line 149 of file morkObject.h.

Here is the call graph for this function:

NS_IMETHODIMP morkObject::IsOpenMdbObject ( nsIMdbEnv ev,
mdb_bool outOpen 
) [virtual, inherited]

Implements nsIMdbObject.

Reimplemented in morkStore, and morkCursor.

Definition at line 205 of file morkObject.cpp.

{
  *outOpen = IsOpenNode();
  return NS_OK;
}

Here is the call graph for this function:

mork_bool morkNode::IsOpenNode ( ) const [inline, inherited]

Definition at line 236 of file morkNode.h.

mork_bool morkNode::IsOpenOrClosingNode ( ) const [inline, inherited]

Definition at line 248 of file morkNode.h.

  { return IsOpenNode() || IsClosingNode(); }

Here is the call graph for this function:

Here is the caller graph for this function:

mork_bool morkNode::IsShutNode ( ) const [inline, inherited]

Definition at line 239 of file morkNode.h.

Here is the caller graph for this function:

mork_bool morkTable::IsTable ( ) const [inline]

Definition at line 515 of file morkTable.h.

Here is the call graph for this function:

Here is the caller graph for this function:

mork_bool morkTable::IsTableClean ( ) const [inline]

Definition at line 488 of file morkTable.h.

{ return this->IsNodeClean(); }

Here is the call graph for this function:

Here is the caller graph for this function:

mork_bool morkTable::IsTableDirty ( ) const [inline]

Definition at line 489 of file morkTable.h.

{ return this->IsNodeDirty(); }

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 480 of file morkTable.h.

  { return ( mTable_Flags & morkTable_kNewMetaBit ) != 0; }
mork_bool morkTable::IsTableNoted ( ) const [inline]

Definition at line 474 of file morkTable.h.

  { return ( mTable_Flags & morkTable_kNotedBit ) != 0; }

Definition at line 477 of file morkTable.h.

  { return ( mTable_Flags & morkTable_kRewriteBit ) != 0; }

Here is the caller graph for this function:

mork_bool morkTable::IsTableUnique ( ) const [inline]

Definition at line 468 of file morkTable.h.

  { return ( mTable_Flags & morkTable_kUniqueBit ) != 0; }

Here is the caller graph for this function:

mork_bool morkTable::IsTableUsed ( ) const [inline]

Definition at line 569 of file morkTable.h.

  { return (mTable_GcUses != 0 || this->GetRowCount() != 0); }

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 471 of file morkTable.h.

  { return ( mTable_Flags & morkTable_kVerboseBit ) != 0; }

Here is the caller graph for this function:

void * morkNode::MakeNew ( size_t  inSize,
nsIMdbHeap ioHeap,
morkEnv ev 
) [static, inherited]

Definition at line 177 of file morkNode.cpp.

{
  void* node = 0;
  if ( &ioHeap )
  {
    ioHeap.Alloc(ev->AsMdbEnv(), inSize, (void **) &node);
    if ( !node )
      ev->OutOfMemoryError();
  }
  else
    ev->NilPointerError();
  
  return node;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void * morkLink::MakeNewLink ( size_t  inSize,
nsIMdbHeap ioHeap,
morkEnv ev 
) [static, inherited]

Definition at line 174 of file morkDeque.cpp.

{
  void* alink = 0;
  if ( &ioHeap )
  {
    ioHeap.Alloc(ev->AsMdbEnv(), inSize, (void**) &alink);
    if ( !alink )
      ev->OutOfMemoryError();
  }
  else
    ev->NilPointerError();
  
  return alink;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1252 of file morkTable.cpp.

{
  if ( mTable_RowMap )
    return ( mTable_RowMap->GetOid(ev, inOid) != 0 );
  else
    return ( ArrayHasOid(ev, inOid) >= 0 );
}

Here is the call graph for this function:

Here is the caller graph for this function:

void morkNode::MarkClosing ( ) [inline, inherited]

Definition at line 255 of file morkNode.h.

void morkNode::MarkDead ( ) [inline, inherited]

Definition at line 256 of file morkNode.h.

void morkNode::MarkShut ( ) [inline, inherited]

Definition at line 254 of file morkNode.h.

Definition at line 1148 of file morkTable.cpp.

{
  morkRowSpace* rowSpace = mTable_RowSpace;
  if ( rowSpace )
  {
    morkStore* store = rowSpace->mSpace_Store;
    if ( store && store->mStore_CanDirty )
    {
      store->SetStoreDirty();
      rowSpace->mSpace_CanDirty = morkBool_kTrue;
    }
    
    if ( rowSpace->mSpace_CanDirty ) // first time being dirtied?
    {
      if ( this->IsTableClean() )
      {
        mork_count rowCount = this->GetRowCount();
        mork_count oneThird = rowCount / 4; // one third of rows
        if ( oneThird > 0x07FFF ) // more than half max u2?
          oneThird = 0x07FFF;
          
        mTable_ChangesMax = (mork_u2) oneThird;
      }
      this->SetTableDirty();
      rowSpace->SetRowSpaceDirty();
      
      return morkBool_kTrue;
    }
  }
  return morkBool_kFalse;
}

Here is the call graph for this function:

Here is the caller graph for this function:

NS_IMETHODIMP morkTable::MoveOid ( nsIMdbEnv ev,
const mdbOid inOid,
mdb_pos  inHintFromPos,
mdb_pos  inToPos,
mdb_pos outActualPos 
) [virtual]

Implements nsIMdbTable.

Definition at line 865 of file morkTable.cpp.

{
  mdb_err outErr = 0;
  mdb_pos actualPos = -1; // meaning it was never found in table
  morkEnv* ev = morkEnv::FromMdbEnv(mev);
  if ( ev )
  {
    if ( inOid && mTable_Store )
    {
      morkRow* row = mTable_Store->GetRow(ev, inOid);
      if ( row )
        actualPos = MoveRow(ev, row, inHintFromPos, inToPos);
    }
    else
      ev->NilPointerError();

    outErr = ev->AsErr();
  }
  if ( outActualPos )
    *outActualPos = actualPos;
  return outErr;
}

Here is the call graph for this function:

NS_IMETHODIMP morkTable::MoveRow ( nsIMdbEnv ev,
nsIMdbRow ioRow,
mdb_pos  inHintFromPos,
mdb_pos  inToPos,
mdb_pos outActualPos 
) [virtual]

Implements nsIMdbTable.

Definition at line 894 of file morkTable.cpp.

{
  mdb_pos actualPos = -1; // meaning it was never found in table
  mdb_err outErr = 0;
  morkEnv* ev = morkEnv::FromMdbEnv(mev);
  if ( ev )
  {
    morkRowObject *rowObj = (morkRowObject *) ioRow;
    morkRow* row = rowObj->mRowObject_Row;
    actualPos = MoveRow(ev, row, inHintFromPos, inToPos);
    outErr = ev->AsErr();
  }
  if ( outActualPos )
    *outActualPos = actualPos;
  return outErr;
}

Here is the call graph for this function:

Here is the caller graph for this function:

mork_pos morkTable::MoveRow ( morkEnv ev,
morkRow ioRow,
mork_pos  inHintFromPos,
mork_pos  inToPos 
)

Definition at line 1309 of file morkTable.cpp.

{
  mork_pos outPos = -1; // means ioRow was not a table member
  mork_bool canDirty = ( this->IsTableClean() )?
    this->MaybeDirtySpaceStoreAndTable() : morkBool_kTrue;
  
  morkRow** rows = (morkRow**) mTable_RowArray.mArray_Slots;
  mork_count count = mTable_RowArray.mArray_Fill;
  if ( count && rows && ev->Good() ) // any members at all? no errors?
  {
    mork_pos lastPos = count - 1; // index of last row slot
      
    if ( inToPos > lastPos ) // beyond last used array slot?
      inToPos = lastPos; // put row into last available slot
    else if ( inToPos < 0 ) // before first usable slot?
      inToPos = 0; // put row in very first slow
      
    if ( inHintFromPos > lastPos ) // beyond last used array slot?
      inHintFromPos = lastPos; // seek row in last available slot
    else if ( inHintFromPos < 0 ) // before first usable slot?
      inHintFromPos = 0; // seek row in very first slow

    morkRow** fromSlot = 0; // becomes nonzero of ioRow is ever found
    morkRow** rowsEnd = rows + count; // one past last used array slot
    
    if ( inHintFromPos <= 0 ) // start of table? just scan for row?
    {
      morkRow** cursor = rows - 1; // before first array slot
      while ( ++cursor < rowsEnd )
      {
        if ( *cursor == ioRow )
        {
          fromSlot = cursor;
          break; // end while loop
        }
      }
    }
    else // search near the start position and work outwards
    {
      morkRow** lo = rows + inHintFromPos; // lowest search point
      morkRow** hi = lo; // highest search point starts at lowest point
      
      // Seek ioRow in spiral widening search below and above inHintFromPos.
      // This is faster when inHintFromPos is at all accurate, but is slower
      // than a straightforward scan when inHintFromPos is nearly random.
      
      while ( lo >= rows || hi < rowsEnd ) // keep searching?
      {
        if ( lo >= rows ) // low direction search still feasible?
        {
          if ( *lo == ioRow ) // actually found the row?
          {
            fromSlot = lo;
            break; // end while loop
          }
          --lo; // advance further lower
        }
        if ( hi < rowsEnd ) // high direction search still feasible?
        {
          if ( *hi == ioRow ) // actually found the row?
          {
            fromSlot = hi;
            break; // end while loop
          }
          ++hi; // advance further higher
        }
      }
    }
    
    if ( fromSlot ) // ioRow was found as a table member?
    {
      outPos = fromSlot - rows; // actual position where row was found
      if ( outPos != inToPos ) // actually need to move this row?
      {
        morkRow** toSlot = rows + inToPos; // slot where row must go
        
        ++mTable_RowArray.mArray_Seed; // we modify the array now:
        
        if ( fromSlot < toSlot ) // row is moving upwards?
        {
          morkRow** up = fromSlot; // leading pointer going upward
          while ( ++up <= toSlot ) // have not gone above destination?
          {
            *fromSlot = *up; // shift down one
            fromSlot = up; // shift trailing pointer up
          }
        }
        else // ( fromSlot > toSlot ) // row is moving downwards
        {
          morkRow** down = fromSlot; // leading pointer going downward
          while ( --down >= toSlot ) // have not gone below destination?
          {
            *fromSlot = *down; // shift up one
            fromSlot = down; // shift trailing pointer
          }
        }
        *toSlot = ioRow;
        outPos = inToPos; // okay, we actually moved the row here

        if ( canDirty )
          this->note_row_move(ev, ioRow, inToPos);
      }
    }
  }
  return outPos;
}

Here is the call graph for this function:

NS_IMETHODIMP morkTable::NewRow ( nsIMdbEnv ev,
mdbOid ioOid,
nsIMdbRow **  acqRow 
) [virtual]

Implements nsIMdbTable.

Definition at line 619 of file morkTable.cpp.

{
  mdb_err outErr = 0;
  nsIMdbRow* outRow = 0;
  morkEnv* ev = morkEnv::FromMdbEnv(mev);
  if ( ev )
  {
    if ( ioOid && mTable_Store )
    {
      morkRow* row = 0;
      if ( ioOid->mOid_Id == morkRow_kMinusOneRid )
        row = mTable_Store->NewRow(ev, ioOid->mOid_Scope);
      else
        row = mTable_Store->NewRowWithOid(ev, ioOid);
        
      if ( row && AddRow(ev, row) )
        outRow = row->AcquireRowHandle(ev, mTable_Store);
    }
    else
      ev->NilPointerError();
      
    outErr = ev->AsErr();
  }
  if ( acqRow )
    *acqRow = outRow;
  return outErr;
}

Here is the call graph for this function:

Definition at line 1533 of file morkTable.cpp.

{
  morkTableRowCursor* outCursor = 0;
  if ( ev->Good() )
  {
    nsIMdbHeap* heap = mTable_Store->mPort_Heap;
    morkTableRowCursor* cursor = new(*heap, ev)
      morkTableRowCursor(ev, morkUsage::kHeap, heap, this, inRowPos);
    if ( cursor )
    {
      if ( ev->Good() )
        outCursor = cursor;
      else
        cursor->CutStrongRef((nsIMdbEnv *) ev);
    }
  }
  return outCursor;
}

Here is the call graph for this function:

Here is the caller graph for this function:

morkLink* morkLink::Next ( ) const [inline, inherited]

Definition at line 126 of file morkDeque.h.

{ return mLink_Next; }
void morkNode::NilHeapError ( morkEnv ev) const [inherited]

Definition at line 354 of file morkNode.cpp.

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

Here is the caller graph for this function:

Definition at line 1143 of file morkTable.cpp.

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

Here is the call graph for this function:

Here is the caller graph for this function:

mork_usage morkNode::NodeUsage ( ) const [inline, inherited]

Definition at line 231 of file morkNode.h.

{ return mNode_Usage; }
void morkNode::NonMutableNodeError ( morkEnv ev) const [inherited]

Definition at line 348 of file morkNode.cpp.

{
  ev->NewError("non-mutable-morkNode");
}

Here is the caller graph for this function:

void morkNode::NonNodeError ( morkEnv ev) const [inherited]

Definition at line 336 of file morkNode.cpp.

{
  ev->NewError("non-morkNode");
}
void morkNode::NonOpenNodeError ( morkEnv ev) const [inherited]

Definition at line 342 of file morkNode.cpp.

{
  ev->NewError("non-open-morkNode");
}

Here is the caller graph for this function:

Definition at line 1131 of file morkTable.cpp.

{
  ev->NewError("non morkTable");
}

Here is the call graph for this function:

Definition at line 1137 of file morkTable.cpp.

{
  ev->NewWarning("non morkTable");
}

Here is the call graph for this function:

Here is the caller graph for this function:

void morkTable::note_row_change ( morkEnv ev,
mork_change  inChange,
morkRow ioRow 
)

Definition at line 1087 of file morkTable.cpp.

{
  if ( this->IsTableRewrite() || this->HasChangeOverflow() )
    this->NoteTableSetAll(ev);
  else
  {
    nsIMdbHeap* heap = mTable_Store->mPort_Heap;
    morkTableChange* tableChange = new(*heap, ev)
      morkTableChange(ev, inChange, ioRow);
    if ( tableChange )
    {
      if ( ev->Good() )
      {
        mTable_ChangeList.PushTail(tableChange);
        ++mTable_ChangesCount;
      }
      else
      {
        tableChange->ZapOldNext(ev, heap);
        this->NoteTableSetAll(ev);
      }
    }
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void morkTable::note_row_move ( morkEnv ev,
morkRow ioRow,
mork_pos  inNewPos 
)

Definition at line 1062 of file morkTable.cpp.

{
  if ( this->IsTableRewrite() || this->HasChangeOverflow() )
    this->NoteTableSetAll(ev);
  else
  {
    nsIMdbHeap* heap = mTable_Store->mPort_Heap;
    morkTableChange* tableChange = new(*heap, ev)
      morkTableChange(ev, ioRow, inNewPos);
    if ( tableChange )
    {
      if ( ev->Good() )
      {
        mTable_ChangeList.PushTail(tableChange);
        ++mTable_ChangesCount;
      }
      else
      {
        tableChange->ZapOldNext(ev, heap);
        this->NoteTableSetAll(ev);
      }
    }
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void morkTable::NoteTableAddRow ( morkEnv ev,
morkRow ioRow 
) [inline]

Definition at line 538 of file morkTable.h.

  { this->note_row_change(ev, morkChange_kAdd, ioRow); }

Here is the call graph for this function:

Here is the caller graph for this function:

void morkTable::NoteTableCutRow ( morkEnv ev,
morkRow ioRow 
) [inline]

Definition at line 541 of file morkTable.h.

  { this->note_row_change(ev, morkChange_kCut, ioRow); }

Here is the call graph for this function:

Here is the caller graph for this function:

void morkTable::NoteTableMoveRow ( morkEnv ev,
morkRow ioRow,
mork_pos  inPos 
)

Definition at line 1037 of file morkTable.cpp.

{
  nsIMdbHeap* heap = mTable_Store->mPort_Heap;
  if ( this->IsTableRewrite() || this->HasChangeOverflow() )
    this->NoteTableSetAll(ev);
  else
  {
    morkTableChange* tableChange = new(*heap, ev)
      morkTableChange(ev, ioRow, inPos);
    if ( tableChange )
    {
      if ( ev->Good() )
      {
        mTable_ChangeList.PushTail(tableChange);
        ++mTable_ChangesCount;
      }
      else
      {
        tableChange->ZapOldNext(ev, heap);
        this->SetTableRewrite(); // just plan to write all table rows
      }
    }
  }
}

Here is the call graph for this function:

Definition at line 1113 of file morkTable.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

NS_IMETHODIMP morkTable::OidToPos ( nsIMdbEnv ev,
const mdbOid inOid,
mdb_pos outPos 
) [virtual]

Implements nsIMdbTable.

Definition at line 504 of file morkTable.cpp.

{
  mdb_err outErr = 0;
  morkEnv* ev = morkEnv::FromMdbEnv(mev);
  if ( ev )
  {
    mork_pos pos = ArrayHasOid(ev, inOid);
    if ( outPos )
      *outPos = pos;
    outErr = ev->AsErr();
  }
  return outErr;
}

Here is the call graph for this function:

void* morkTable::operator new ( size_t  inSize,
nsIMdbHeap ioHeap,
morkEnv ev 
) [inline]

Reimplemented from morkLink.

Definition at line 492 of file morkTable.h.

  { return morkNode::MakeNew(inSize, ioHeap, ev); }

Here is the call graph for this function:

morkTable& morkTable::operator= ( const morkTable other) [private]
NS_IMETHODIMP morkTable::PosToOid ( nsIMdbEnv ev,
mdb_pos  inRowPos,
mdbOid outOid 
) [virtual]

Implements nsIMdbTable.

Definition at line 479 of file morkTable.cpp.

{
  mdb_err outErr = 0;
  mdbOid roid;
  roid.mOid_Scope = 0;
  roid.mOid_Id = (mork_id) -1;
  
  morkEnv* ev = morkEnv::FromMdbEnv(mev);
  if ( ev )
  {
    morkRow* row = SafeRowAt(ev, inRowPos);
    if ( row )
      roid = row->mRow_Oid;
    
    outErr = ev->AsErr();
  }
  if ( outOid )
    *outOid = roid;
  return outErr;
}

Here is the call graph for this function:

NS_IMETHODIMP morkTable::PosToRow ( nsIMdbEnv ev,
mdb_pos  inRowPos,
nsIMdbRow **  acqRow 
) [virtual]

Implements nsIMdbTable.

Definition at line 522 of file morkTable.cpp.

{
  mdb_err outErr = 0;
  nsIMdbRow* outRow = 0;
  morkEnv* ev = morkEnv::FromMdbEnv(mev);
  if ( ev )
  {
    morkRow* row = SafeRowAt(ev, inRowPos);
    if ( row && mTable_Store )
      outRow = row->AcquireRowHandle(ev, mTable_Store);
      
    outErr = ev->AsErr();
  }
  if ( acqRow )
    *acqRow = outRow;
  return outErr;
}

Here is the call graph for this function:

morkLink* morkLink::Prev ( ) const [inline, inherited]

Definition at line 127 of file morkDeque.h.

{ return mLink_Prev; }
NS_IMETHODIMP morkTable::QueryIndexOnSort ( nsIMdbEnv ev,
mdb_column  inColumn,
mdb_bool outIndexOnSort 
) [virtual]

Implements nsIMdbTable.

Definition at line 962 of file morkTable.cpp.

{
  NS_ASSERTION(PR_FALSE, "not implemented");
  return NS_ERROR_NOT_IMPLEMENTED;
}
void morkNode::RefsOverflowWarning ( morkEnv ev) const [inherited]

Definition at line 360 of file morkNode.cpp.

{
  ev->NewWarning("mNode_Refs overflow");
}

Here is the caller graph for this function:

void morkNode::RefsUnderflowWarning ( morkEnv ev) const [inherited]

Definition at line 372 of file morkNode.cpp.

{
  ev->NewWarning("mNode_Refs underflow");
}

Here is the caller graph for this function:

void morkNode::RefsUnderUsesWarning ( morkEnv ev) const [inherited]

Definition at line 330 of file morkNode.cpp.

{
  ev->NewError("mNode_Refs < mNode_Uses");
}

Here is the call graph for this function:

Here is the caller graph for this function:

void morkLink::Remove ( ) [inline, inherited]

Definition at line 144 of file morkDeque.h.

NS_IMETHODIMP morkTable::RowToPos ( nsIMdbEnv ev,
nsIMdbRow ioRow,
mdb_pos outPos 
) [virtual]

Implements nsIMdbTable.

Definition at line 544 of file morkTable.cpp.

{
  mdb_err outErr = 0;
  mork_pos pos = -1;
  morkEnv* ev = morkEnv::FromMdbEnv(mev);
  if ( ev )
  {
    morkRowObject* row = (morkRowObject*) ioRow;
    pos = ArrayHasOid(ev, &row->mRowObject_Row->mRow_Oid);
    outErr = ev->AsErr();
  }
  if ( outPos )
    *outPos = pos;
  return outErr;
}

Here is the call graph for this function:

morkRow* morkTable::SafeRowAt ( morkEnv ev,
mork_pos  inPos 
) [inline]

Definition at line 562 of file morkTable.h.

  { return (morkRow*) mTable_RowArray.SafeAt(ev, inPos); }

Here is the call graph for this function:

Here is the caller graph for this function:

NS_IMETHODIMP morkTable::SearchColumnsHint ( nsIMdbEnv ev,
const mdbColumnSet inColumnSet 
) [virtual]

Implements nsIMdbTable.

Definition at line 755 of file morkTable.cpp.

{
  NS_ASSERTION(PR_FALSE, "not implemented");
  return NS_ERROR_NOT_IMPLEMENTED;
}
void morkLink::SelfRefer ( ) [inline, inherited]

Definition at line 129 of file morkDeque.h.

{ mLink_Next = mLink_Prev = this; }

Here is the caller graph for this function:

void morkNode::SetAsleep ( ) [inline, inherited]

Definition at line 138 of file morkNode.h.

void morkNode::SetFrozen ( ) [inline, inherited]

Definition at line 136 of file morkNode.h.

void morkNode::SetMutable ( ) [inline, inherited]

Definition at line 137 of file morkNode.h.

void morkNode::SetNodeClean ( ) [inline, inherited]

Definition at line 144 of file morkNode.h.

Here is the caller graph for this function:

void morkNode::SetNodeDirty ( ) [inline, inherited]

Definition at line 145 of file morkNode.h.

Here is the caller graph for this function:

NS_IMETHODIMP morkTable::SetSearchSorting ( nsIMdbEnv ev,
mdb_column  inColumn,
nsIMdbSorting ioSorting 
) [virtual]

Implements nsIMdbTable.

Definition at line 828 of file morkTable.cpp.

{
  NS_ASSERTION(PR_FALSE, "not implemented");
  return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP morkTable::SetTableBeVerbose ( nsIMdbEnv ev,
mdb_bool  inBeVerbose 
) [virtual]

Implements nsIMdbTable.

Definition at line 338 of file morkTable.cpp.

{
  mdb_err outErr = 0;
  morkEnv* ev = morkEnv::FromMdbEnv(mev);
  if ( ev )
  {
    if ( inBeVerbose )
      SetTableVerbose();
    else
      ClearTableVerbose();
   
    outErr = ev->AsErr();
  }
  return outErr;
}

Here is the call graph for this function:

Definition at line 1022 of file morkTable.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 485 of file morkTable.h.

{ this->SetNodeDirty(); }

Here is the call graph for this function:

Here is the caller graph for this function:

void morkTable::SetTableId ( mork_tid  inTid) [inline]

Definition at line 134 of file morkTable.h.

{ mBead_Color = inTid; }

Definition at line 460 of file morkTable.h.

Here is the caller graph for this function:

Definition at line 458 of file morkTable.h.

Implements nsIMdbTable.

Definition at line 292 of file morkTable.cpp.

{
  mdb_err outErr = 0;
  morkEnv* ev = morkEnv::FromMdbEnv(mev);
  if ( ev )
  {
    if ( inPrio > morkPriority_kMax )
      inPrio = morkPriority_kMax;
      
    mTable_Priority = inPrio;
    outErr = ev->AsErr();
  }
  return outErr;
}

Here is the call graph for this function:

Definition at line 459 of file morkTable.h.

Here is the caller graph for this function:

Definition at line 456 of file morkTable.h.

Here is the caller graph for this function:

Definition at line 457 of file morkTable.h.

Here is the caller graph for this function:

static void morkBead::SlotStrongBead ( morkBead me,
morkEnv ev,
morkBead **  ioSlot 
) [inline, static, inherited]

Definition at line 124 of file morkBead.h.

  { morkNode::SlotStrongNode((morkNode*) me, ev, (morkNode**) ioSlot); }

Here is the call graph for this function:

void morkNode::SlotStrongNode ( morkNode me,
morkEnv ev,
morkNode **  ioSlot 
) [static, inherited]

Definition at line 466 of file morkNode.cpp.

{
  morkNode* node = *ioSlot;
  if ( me != node )
  {
    if ( node )
    {
      // what if this nulls out the ev and causes asserts?
      // can we move this after the CutStrongRef()?
      *ioSlot = 0;
      node->CutStrongRef(ev);
    }
    if ( me && me->AddStrongRef(ev) )
      *ioSlot = me;
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void morkObject::SlotStrongObject ( morkObject me,
morkEnv ev,
morkObject **  ioSlot 
) [inline, static, inherited]

Definition at line 160 of file morkObject.h.

  { morkNode::SlotStrongNode((morkNode*) me, ev, (morkNode**) ioSlot); }

Here is the call graph for this function:

Here is the caller graph for this function:

static void morkTable::SlotStrongTable ( morkTable me,
morkEnv ev,
morkTable **  ioSlot 
) [inline, static]

Definition at line 593 of file morkTable.h.

  { morkNode::SlotStrongNode((morkNode*) me, ev, (morkNode**) ioSlot); }

Here is the call graph for this function:

Here is the caller graph for this function:

static void morkBead::SlotWeakBead ( morkBead me,
morkEnv ev,
morkBead **  ioSlot 
) [inline, static, inherited]

Definition at line 120 of file morkBead.h.

  { morkNode::SlotWeakNode((morkNode*) me, ev, (morkNode**) ioSlot); }

Here is the call graph for this function:

void morkNode::SlotWeakNode ( morkNode me,
morkEnv ev,
morkNode **  ioSlot 
) [static, inherited]

Definition at line 489 of file morkNode.cpp.

{
  morkNode* node = *ioSlot;
  if ( me != node )
  {
    if ( node )
    {
      *ioSlot = 0;
      node->CutWeakRef(ev);
    }
    if ( me && me->AddWeakRef(ev) )
      *ioSlot = me;
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void morkObject::SlotWeakObject ( morkObject me,
morkEnv ev,
morkObject **  ioSlot 
) [inline, static, inherited]

Definition at line 156 of file morkObject.h.

  { morkNode::SlotWeakNode((morkNode*) me, ev, (morkNode**) ioSlot); }

Here is the call graph for this function:

static void morkTable::SlotWeakTable ( morkTable me,
morkEnv ev,
morkTable **  ioSlot 
) [inline, static]

Definition at line 589 of file morkTable.h.

  { morkNode::SlotWeakNode((morkNode*) me, ev, (morkNode**) ioSlot); }

Here is the call graph for this function:

Here is the caller graph for this function:

NS_IMETHODIMP morkTable::SortColumnsHint ( nsIMdbEnv ev,
const mdbColumnSet inColumnSet 
) [virtual]

Implements nsIMdbTable.

Definition at line 764 of file morkTable.cpp.

{
  NS_ASSERTION(PR_FALSE, "not implemented");
  return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP morkTable::StartBatchChangeHint ( nsIMdbEnv ev,
const void inLabel 
) [virtual]

Implements nsIMdbTable.

Definition at line 773 of file morkTable.cpp.

{
  // we don't do anything here.
  return NS_OK;
}
mork_uses morkNode::StrongRefsOnly ( ) const [inline, inherited]

Definition at line 219 of file morkNode.h.

{ return mNode_Uses; }

Here is the caller graph for this function:

Definition at line 1125 of file morkTable.cpp.

{
  ev->NewWarning("mTable_GcUses underflow");
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 133 of file morkTable.h.

{ return mBead_Color; }

Here is the caller graph for this function:

mork_seed morkTable::TableSeed ( ) const [inline]

Definition at line 560 of file morkTable.h.

Here is the caller graph for this function:

void morkNode::UsesOverflowWarning ( morkEnv ev) const [inherited]

Definition at line 366 of file morkNode.cpp.

{
  ev->NewWarning("mNode_Uses overflow");
}
void morkNode::UsesUnderflowWarning ( morkEnv ev) const [inherited]

Definition at line 378 of file morkNode.cpp.

{
  ev->NewWarning("mNode_Uses underflow");
}

Here is the caller graph for this function:

mork_refs morkNode::WeakRefsOnly ( ) const [inline, inherited]

Definition at line 220 of file morkNode.h.

{ return (mork_refs) ( mNode_Refs - mNode_Uses ); }

Here is the caller graph for this function:

void morkNode::ZapOld ( morkEnv ev,
nsIMdbHeap ioHeap 
) [inherited]

Definition at line 193 of file morkNode.cpp.

{
  if ( this )
  {
    if ( this->IsNode() )
    {
      mork_usage usage = mNode_Usage; // mNode_Usage before ~morkNode
      this->morkNode::~morkNode(); // first call polymorphic destructor
      if ( ioHeap ) // was this node heap allocated?
        ioHeap->Free(ev->AsMdbEnv(), this);
      else if ( usage == morkUsage_kPool ) // mNode_Usage before ~morkNode
      {
        morkHandle* h = (morkHandle*) this;
        if ( h->IsHandle() && h->GoodHandleTag() )
        {
          if ( h->mHandle_Face )
          {
            if (ev->mEnv_HandlePool)
              ev->mEnv_HandlePool->ZapHandle(ev, h->mHandle_Face);
            else if (h->mHandle_Env && h->mHandle_Env->mEnv_HandlePool)
              h->mHandle_Env->mEnv_HandlePool->ZapHandle(ev, h->mHandle_Face);
          }
          else
            ev->NilPointerError();
        }
      }
    }
    else
      this->NonNodeError(ev);
  }
  else
    ev->NilPointerError();
}

Here is the call graph for this function:

Here is the caller graph for this function:

void morkLink::ZapOldLink ( morkEnv ev,
nsIMdbHeap ioHeap 
) [inherited]

Definition at line 190 of file morkDeque.cpp.

{
  if ( ioHeap )
  {
    if ( this )
      ioHeap->Free(ev->AsMdbEnv(), this);
  }
  else
    ev->NilPointerError();
}

Here is the call graph for this function:


Friends And Related Function Documentation

friend class morkHandleFrame [friend, inherited]

Reimplemented in morkHandle.

Definition at line 131 of file morkNode.h.


Member Data Documentation

Definition at line 83 of file morkBead.h.

Definition at line 117 of file morkDeque.h.

Definition at line 118 of file morkDeque.h.

Definition at line 91 of file morkObject.h.

Definition at line 122 of file morkNode.h.

Definition at line 119 of file morkNode.h.

Definition at line 120 of file morkNode.h.

Definition at line 117 of file morkNode.h.

Definition at line 125 of file morkNode.h.

Definition at line 124 of file morkNode.h.

Definition at line 128 of file morkNode.h.

Definition at line 123 of file morkNode.h.

Definition at line 127 of file morkNode.h.

Definition at line 89 of file morkObject.h.

Definition at line 442 of file morkTable.h.

Definition at line 443 of file morkTable.h.

Definition at line 444 of file morkTable.h.

Definition at line 449 of file morkTable.h.

Definition at line 451 of file morkTable.h.

Definition at line 447 of file morkTable.h.

Definition at line 436 of file morkTable.h.

Definition at line 437 of file morkTable.h.

Definition at line 452 of file morkTable.h.

Definition at line 450 of file morkTable.h.

Definition at line 440 of file morkTable.h.

Definition at line 439 of file morkTable.h.

Definition at line 434 of file morkTable.h.

Definition at line 431 of file morkTable.h.


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