Back to index

lightning-sunbird  0.9+nobinonly
orkinCell.cpp
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-  */
00002 /* ***** BEGIN LICENSE BLOCK *****
00003  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00004  *
00005  * The contents of this file are subject to the Mozilla Public License Version
00006  * 1.1 (the "License"); you may not use this file except in compliance with
00007  * the License. You may obtain a copy of the License at
00008  * http://www.mozilla.org/MPL/
00009  *
00010  * Software distributed under the License is distributed on an "AS IS" basis,
00011  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00012  * for the specific language governing rights and limitations under the
00013  * License.
00014  *
00015  * The Original Code is mozilla.org code.
00016  *
00017  * The Initial Developer of the Original Code is
00018  * Netscape Communications Corporation.
00019  * Portions created by the Initial Developer are Copyright (C) 1999
00020  * the Initial Developer. All Rights Reserved.
00021  *
00022  * Contributor(s):
00023  *
00024  * Alternatively, the contents of this file may be used under the terms of
00025  * either of the GNU General Public License Version 2 or later (the "GPL"),
00026  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00027  * in which case the provisions of the GPL or the LGPL are applicable instead
00028  * of those above. If you wish to allow use of your version of this file only
00029  * under the terms of either the GPL or the LGPL, and not to allow others to
00030  * use your version of this file under the terms of the MPL, indicate your
00031  * decision by deleting the provisions above and replace them with the notice
00032  * and other provisions required by the GPL or the LGPL. If you do not delete
00033  * the provisions above, a recipient may use your version of this file under
00034  * the terms of any one of the MPL, the GPL or the LGPL.
00035  *
00036  * ***** END LICENSE BLOCK ***** */
00037 
00038 #ifndef _MDB_
00039 #include "mdb.h"
00040 #endif
00041 
00042 #ifndef _MORK_
00043 #include "mork.h"
00044 #endif
00045 
00046 #ifndef _MORKNODE_
00047 #include "morkNode.h"
00048 #endif
00049 
00050 #ifndef _MORKHANDLE_
00051 #include "morkHandle.h"
00052 #endif
00053 
00054 #ifndef _MORKCELL_
00055 #include "morkCell.h"
00056 #endif
00057 
00058 #ifndef _MORKCELLOBJECT_
00059 #include "morkCellObject.h"
00060 #endif
00061 
00062 #ifndef _MORKROWOBJECT_
00063 #include "morkRowObject.h"
00064 #endif
00065 
00066 #ifndef _ORKINCELL_
00067 #include "orkinCell.h"
00068 #endif
00069 
00070 #ifndef _MORKENV_
00071 #include "morkEnv.h"
00072 #endif
00073 
00074 #ifndef _MORKPOOL_
00075 #include "morkPool.h"
00076 #endif
00077 
00078 #ifndef _MORKROW_
00079 #include "morkRow.h"
00080 #endif
00081 
00082 #ifndef _MORKATOM_
00083 #include "morkAtom.h"
00084 #endif
00085 
00086 #ifndef _MORKSPACE_
00087 #include "morkSpace.h"
00088 #endif
00089 
00090 #ifndef _MORKROWSPACE_
00091 #include "morkRowSpace.h"
00092 #endif
00093 
00094 #ifndef _MORKSTORE_
00095 #include "morkStore.h"
00096 #endif
00097 
00098 //3456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789
00099 
00100 /* public virtual*/
00101 orkinCell:: ~orkinCell() // morkHandle destructor does everything
00102 {
00103 }
00104 
00105 /*protected non-poly construction*/
00106 orkinCell::orkinCell(morkEnv* ev, // morkUsage is morkUsage_kPool
00107     morkHandleFace* ioFace,    // must not be nil, cookie for this handle
00108     morkCellObject* ioObject)  // must not be nil, the object for this handle
00109 : morkHandle(ev, ioFace, ioObject, morkMagic_kCell)
00110 {
00111   // do not modify mNode_Derived; leave it equal to morkDerived_kHandle
00112 }
00113 
00114 
00115 /*static */ orkinCell*
00116 orkinCell::MakeCell(morkEnv* ev, morkCellObject* ioObject)
00117 {
00118   mork_bool isEnv = ev->IsEnv();
00119   MORK_ASSERT(isEnv);
00120   if ( isEnv )
00121   {
00122     morkHandleFace* face = ev->NewHandle(sizeof(orkinCell));
00123     if ( face )
00124       return new(face) orkinCell(ev, face, ioObject);
00125     else
00126       ev->OutOfMemoryError();
00127   }
00128     
00129   return (orkinCell*) 0;
00130 }
00131 
00132 // ResyncWithRow() moved to the morkCellObject class:
00133 // mork_bool
00134 // orkinCell::ResyncWithRow(morkEnv* ev)
00135 // {
00136 //   morkCellObject* cellObj = (morkCellObject*) mHandle_Object;
00137 //   morkRow* row = cellObj->mCellObject_Row;
00138 //   mork_pos pos = 0;
00139 //   morkCell* cell = row->GetCell(ev, cellObj->mCellObject_Col, &pos);
00140 //   if ( cell )
00141 //   {
00142 //     cellObj->mCellObject_Pos = pos;
00143 //     cellObj->mCellObject_Cell = cell;
00144 //     cellObj->mCellObject_RowSeed = row->mRow_Seed;
00145 //   }
00146 //   else
00147 //   {
00148 //     cellObj->mCellObject_Cell = 0;
00149 //     cellObj->MissingRowColumnError(ev);
00150 //   }
00151 //   return ev->Good();
00152 // }
00153 
00154 morkEnv*
00155 orkinCell::CanUseCell(nsIMdbEnv* mev, mork_bool inMutable,
00156   mdb_err* outErr, morkCell** outCell) const
00157 {
00158   morkEnv* outEnv = 0;
00159   morkCell* cell = 0;
00160   morkEnv* ev = morkEnv::FromMdbEnv(mev);
00161   if ( ev )
00162   {
00163     morkCellObject* cellObj = (morkCellObject*)
00164       this->GetGoodHandleObject(ev, inMutable, morkMagic_kCell,
00165         /*inClosedOkay*/ morkBool_kFalse);
00166     if ( cellObj )
00167     {
00168       if ( cellObj->IsCellObject() )
00169       {
00170         if ( cellObj->IsMutable() || !inMutable )
00171         {
00172           morkRowObject* rowObj = cellObj->mCellObject_RowObject;
00173           if ( rowObj )
00174           {
00175             morkRow* row = cellObj->mCellObject_Row;
00176             if ( row )
00177             {
00178               if ( rowObj->mRowObject_Row == row )
00179               {
00180                 mork_u2 oldSeed = cellObj->mCellObject_RowSeed;
00181                 if ( row->mRow_Seed == oldSeed || cellObj->ResyncWithRow(ev) )
00182                 {
00183                   cell = cellObj->mCellObject_Cell;
00184                   if ( cell )
00185                   {
00186                     outEnv = ev;
00187                   }
00188                   else
00189                     cellObj->NilCellError(ev);
00190                 }
00191               }
00192               else
00193                 cellObj->WrongRowObjectRowError(ev);
00194             }
00195             else
00196               cellObj->NilRowError(ev);
00197           }
00198           else
00199             cellObj->NilRowObjectError(ev);
00200         }
00201         else
00202           cellObj->NonMutableNodeError(ev);
00203       }
00204       else
00205         cellObj->NonCellObjectTypeError(ev);
00206     }
00207     *outErr = ev->AsErr();
00208   }
00209   MORK_ASSERT(outEnv);
00210   *outCell = cell;
00211   
00212   return outEnv;
00213 }
00214 
00215 // { ===== begin nsIMdbISupports methods =====
00216 NS_IMPL_QUERY_INTERFACE0(orkinCell)
00217 
00218 /*virtual*/ nsrefcnt
00219 orkinCell::AddRef() // add strong ref with no
00220 {
00221   morkEnv* ev = mHandle_Env;
00222   if ( ev && ev->IsEnv() )
00223     return this->Handle_AddStrongRef(ev->AsMdbEnv());
00224   else
00225     return morkEnv_kNonEnvTypeError;
00226 }
00227 
00228 /*virtual*/ nsrefcnt
00229 orkinCell::Release() // cut strong ref
00230 {
00231   morkEnv* ev = mHandle_Env;
00232   if ( ev && ev->IsEnv() )
00233     return this->Handle_CutStrongRef(ev->AsMdbEnv());
00234   else
00235     return morkEnv_kNonEnvTypeError;
00236 }
00237 // } ===== end nsIMdbISupports methods =====
00238 
00239 // { ===== begin nsIMdbObject methods =====
00240 
00241 // { ----- begin attribute methods -----
00242 /*virtual*/ mdb_err
00243 orkinCell::IsFrozenMdbObject(nsIMdbEnv* mev, mdb_bool* outIsReadonly)
00244 {
00245   return this->Handle_IsFrozenMdbObject(mev, outIsReadonly);
00246 }
00247 // same as nsIMdbPort::GetIsPortReadonly() when this object is inside a port.
00248 // } ----- end attribute methods -----
00249 
00250 // { ----- begin factory methods -----
00251 /*virtual*/ mdb_err
00252 orkinCell::GetMdbFactory(nsIMdbEnv* mev, nsIMdbFactory** acqFactory)
00253 {
00254   return this->Handle_GetMdbFactory(mev, acqFactory);
00255 } 
00256 // } ----- end factory methods -----
00257 
00258 // { ----- begin ref counting for well-behaved cyclic graphs -----
00259 /*virtual*/ mdb_err
00260 orkinCell::GetWeakRefCount(nsIMdbEnv* mev, // weak refs
00261   mdb_count* outCount)
00262 {
00263   return this->Handle_GetWeakRefCount(mev, outCount);
00264 }  
00265 /*virtual*/ mdb_err
00266 orkinCell::GetStrongRefCount(nsIMdbEnv* mev, // strong refs
00267   mdb_count* outCount)
00268 {
00269   return this->Handle_GetStrongRefCount(mev, outCount);
00270 }
00271 
00272 /*virtual*/ mdb_err
00273 orkinCell::AddWeakRef(nsIMdbEnv* mev)
00274 {
00275   return this->Handle_AddWeakRef(mev);
00276 }
00277 /*virtual*/ mdb_err
00278 orkinCell::AddStrongRef(nsIMdbEnv* mev)
00279 {
00280   return this->Handle_AddStrongRef(mev);
00281 }
00282 
00283 /*virtual*/ mdb_err
00284 orkinCell::CutWeakRef(nsIMdbEnv* mev)
00285 {
00286   return this->Handle_CutWeakRef(mev);
00287 }
00288 /*virtual*/ mdb_err
00289 orkinCell::CutStrongRef(nsIMdbEnv* mev)
00290 {
00291   return this->Handle_CutStrongRef(mev);
00292 }
00293 
00294 /*virtual*/ mdb_err
00295 orkinCell::CloseMdbObject(nsIMdbEnv* mev)
00296 {
00297   return this->Handle_CloseMdbObject(mev);
00298 }
00299 
00300 /*virtual*/ mdb_err
00301 orkinCell::IsOpenMdbObject(nsIMdbEnv* mev, mdb_bool* outOpen)
00302 {
00303   return this->Handle_IsOpenMdbObject(mev, outOpen);
00304 }
00305 // } ----- end ref counting -----
00306 
00307 // } ===== end nsIMdbObject methods =====
00308 
00309 // { ===== begin nsIMdbBlob methods =====
00310 
00311 // { ----- begin attribute methods -----
00312 /*virtual*/ mdb_err
00313 orkinCell::SetBlob(nsIMdbEnv* mev,
00314   nsIMdbBlob* ioBlob)
00315 {
00316   MORK_USED_1(ioBlob);
00317   mdb_err outErr = 0;
00318   morkCell* cell = 0;
00319   morkEnv* ev = this->CanUseCell(mev, /*inMutable*/ morkBool_kTrue,
00320     &outErr, &cell);
00321   if ( ev )
00322   {
00323     // remember row->MaybeDirtySpaceStoreAndRow();
00324 
00325     ev->StubMethodOnlyError();
00326     outErr = ev->AsErr();
00327   }
00328     
00329   return outErr;
00330 } // reads inBlob slots
00331 // when inBlob is in the same suite, this might be fastest cell-to-cell
00332 
00333 /*virtual*/ mdb_err
00334 orkinCell::ClearBlob( // make empty (so content has zero length)
00335   nsIMdbEnv* mev)
00336 {
00337   mdb_err outErr = 0;
00338   morkCell* cell = 0;
00339   morkEnv* ev = this->CanUseCell(mev, /*inMutable*/ morkBool_kTrue,
00340     &outErr, &cell);
00341   if ( ev )
00342   {
00343     // remember row->MaybeDirtySpaceStoreAndRow();
00344 
00345     ev->StubMethodOnlyError();
00346     outErr = ev->AsErr();
00347   }
00348     
00349   return outErr;
00350 }
00351 // clearing a yarn is like SetYarn() with empty yarn instance content
00352 
00353 /*virtual*/ mdb_err
00354 orkinCell::GetBlobFill(nsIMdbEnv* mev,
00355   mdb_fill* outFill)
00356 // Same value that would be put into mYarn_Fill, if one called GetYarn()
00357 // with a yarn instance that had mYarn_Buf==nil and mYarn_Size==0.
00358 {
00359   mdb_err outErr = 0;
00360   mdb_fill fill = 0;
00361   morkCell* cell = 0;
00362   morkEnv* ev = this->CanUseCell(mev, /*inMutable*/ morkBool_kTrue,
00363     &outErr, &cell);
00364   if ( ev )
00365   {
00366     ev->StubMethodOnlyError();
00367     outErr = ev->AsErr();
00368   }
00369   if ( outFill )
00370     *outFill = fill;
00371     
00372   return outErr;
00373 }  // size of blob 
00374 
00375 /*virtual*/ mdb_err
00376 orkinCell::SetYarn(nsIMdbEnv* mev, 
00377   const mdbYarn* inYarn)
00378 {
00379   mdb_err outErr = 0;
00380   morkCell* cell = 0;
00381   morkEnv* ev = this->CanUseCell(mev, /*inMutable*/ morkBool_kTrue,
00382     &outErr, &cell);
00383   if ( ev )
00384   {
00385     morkCellObject* cellObj = (morkCellObject*) mHandle_Object;
00386     morkRow* row = cellObj->mCellObject_Row;
00387     if ( row )
00388     {
00389       morkStore* store = row->GetRowSpaceStore(ev);
00390       if ( store )
00391       {
00392         cell->SetYarn(ev, inYarn, store);
00393         if ( row->IsRowClean() && store->mStore_CanDirty )
00394           row->MaybeDirtySpaceStoreAndRow();
00395       }
00396     }
00397     else
00398       ev->NilPointerError();
00399 
00400     outErr = ev->AsErr();
00401   }
00402     
00403   return outErr;
00404 }   // reads from yarn slots
00405 // make this text object contain content from the yarn's buffer
00406 
00407 /*virtual*/ mdb_err
00408 orkinCell::GetYarn(nsIMdbEnv* mev, 
00409   mdbYarn* outYarn)
00410 {
00411   mdb_err outErr = 0;
00412   morkCell* cell = 0;
00413   morkEnv* ev = this->CanUseCell(mev, /*inMutable*/ morkBool_kTrue,
00414     &outErr, &cell);
00415   if ( ev )
00416   {
00417     morkAtom* atom = cell->GetAtom();
00418     atom->GetYarn(outYarn);
00419     outErr = ev->AsErr();
00420   }
00421     
00422   return outErr;
00423 }  // writes some yarn slots 
00424 // copy content into the yarn buffer, and update mYarn_Fill and mYarn_Form
00425 
00426 /*virtual*/ mdb_err
00427 orkinCell::AliasYarn(nsIMdbEnv* mev, 
00428   mdbYarn* outYarn)
00429 {
00430   mdb_err outErr = 0;
00431   morkCell* cell = 0;
00432   morkEnv* ev = this->CanUseCell(mev, /*inMutable*/ morkBool_kTrue,
00433     &outErr, &cell);
00434   if ( ev )
00435   {
00436     morkAtom* atom = cell->GetAtom();
00437     atom->AliasYarn(outYarn);
00438     outErr = ev->AsErr();
00439   }
00440     
00441   return outErr;
00442 } // writes ALL yarn slots
00443 
00444 // } ----- end attribute methods -----
00445 
00446 // } ===== end nsIMdbBlob methods =====
00447 
00448 // { ===== begin nsIMdbCell methods =====
00449 
00450 // { ----- begin attribute methods -----
00451 /*virtual*/ mdb_err
00452 orkinCell::SetColumn(nsIMdbEnv* mev, mdb_column inColumn)
00453 {
00454   MORK_USED_1(inColumn);
00455   mdb_err outErr = 0;
00456   morkCell* cell = 0;
00457   morkEnv* ev = this->CanUseCell(mev, /*inMutable*/ morkBool_kTrue,
00458     &outErr, &cell);
00459   if ( ev )
00460   {
00461     // remember row->MaybeDirtySpaceStoreAndRow();
00462 
00463     morkCellObject* cellObj = (morkCellObject*) mHandle_Object;
00464     MORK_USED_1(cellObj);
00465     
00466     ev->StubMethodOnlyError();
00467     outErr = ev->AsErr();
00468   }
00469     
00470   return outErr;
00471 } 
00472 
00473 /*virtual*/ mdb_err
00474 orkinCell::GetColumn(nsIMdbEnv* mev, mdb_column* outColumn)
00475 {
00476   mdb_err outErr = 0;
00477   mdb_column col = 0;
00478   morkCell* cell = 0;
00479   morkEnv* ev = this->CanUseCell(mev, /*inMutable*/ morkBool_kTrue,
00480     &outErr, &cell);
00481   if ( ev )
00482   {
00483     morkCellObject* cellObj = (morkCellObject*) mHandle_Object;
00484     col = cellObj->mCellObject_Col;
00485     outErr = ev->AsErr();
00486   }
00487   if ( outColumn )
00488     *outColumn = col;
00489   return outErr;
00490 }
00491 
00492 /*virtual*/ mdb_err
00493 orkinCell::GetCellInfo(  // all cell metainfo except actual content
00494   nsIMdbEnv* mev, 
00495   mdb_column* outColumn,           // the column in the containing row
00496   mdb_fill*   outBlobFill,         // the size of text content in bytes
00497   mdbOid*     outChildOid,         // oid of possible row or table child
00498   mdb_bool*   outIsRowChild)  // nonzero if child, and a row child
00499 // Checking all cell metainfo is a good way to avoid forcing a large cell
00500 // in to memory when you don't actually want to use the content.
00501 {
00502   mdb_err outErr = 0;
00503   mdb_bool isRowChild = morkBool_kFalse;
00504   mdbOid childOid;
00505   childOid.mOid_Scope = 0;
00506   childOid.mOid_Id = 0;
00507   mork_fill blobFill = 0;
00508   mdb_column column = 0;
00509   morkCell* cell = 0;
00510   morkEnv* ev = this->CanUseCell(mev, /*inMutable*/ morkBool_kTrue,
00511     &outErr, &cell);
00512   if ( ev )
00513   {
00514     morkCellObject* cellObj;
00515     cellObj = (morkCellObject*) mHandle_Object;
00516     ev->StubMethodOnlyError();
00517     outErr = ev->AsErr();
00518   }
00519   if ( outIsRowChild )
00520     *outIsRowChild = isRowChild;
00521   if ( outChildOid )
00522     *outChildOid = childOid;
00523    if ( outBlobFill )
00524      *outBlobFill = blobFill;
00525   if ( outColumn )
00526     *outColumn = column;
00527     
00528   return outErr;
00529 }
00530 
00531 
00532 /*virtual*/ mdb_err
00533 orkinCell::GetRow(nsIMdbEnv* mev, // parent row for this cell
00534   nsIMdbRow** acqRow)
00535 {
00536   mdb_err outErr = 0;
00537   nsIMdbRow* outRow = 0;
00538   morkCell* cell = 0;
00539   morkEnv* ev = this->CanUseCell(mev, /*inMutable*/ morkBool_kTrue,
00540     &outErr, &cell);
00541   if ( ev )
00542   {
00543     morkCellObject* cellObj = (morkCellObject*) mHandle_Object;
00544     morkRowObject* rowObj = cellObj->mCellObject_RowObject;
00545     outRow = rowObj->AcquireRowHandle(ev);
00546     
00547     outErr = ev->AsErr();
00548   }
00549   if ( acqRow )
00550     *acqRow = outRow;
00551   return outErr;
00552 }
00553 
00554 /*virtual*/ mdb_err
00555 orkinCell::GetPort(nsIMdbEnv* mev, // port containing cell
00556   nsIMdbPort** acqPort)
00557 {
00558   mdb_err outErr = 0;
00559   nsIMdbPort* outPort = 0;
00560   morkCell* cell = 0;
00561   morkEnv* ev = this->CanUseCell(mev, /*inMutable*/ morkBool_kTrue,
00562     &outErr, &cell);
00563   if ( ev )
00564   {
00565     morkCellObject* cellObj = (morkCellObject*) mHandle_Object;
00566     morkRow* row = cellObj->mCellObject_Row;
00567     if ( row )
00568     {
00569       morkStore* store = row->GetRowSpaceStore(ev);
00570       if ( store )
00571         outPort = store->AcquireStoreHandle(ev);
00572     }
00573     else
00574       ev->NilPointerError();
00575 
00576     outErr = ev->AsErr();
00577   }
00578   if ( acqPort )
00579     *acqPort = outPort;
00580   return outErr;
00581 }
00582 // } ----- end attribute methods -----
00583 
00584 // { ----- begin children methods -----
00585 /*virtual*/ mdb_err
00586 orkinCell::HasAnyChild( // does cell have a child instead of text?
00587   nsIMdbEnv* mev,
00588   mdbOid* outOid,  // out id of row or table (or unbound if no child)
00589   mdb_bool* outIsRow) // nonzero if child is a row (rather than a table)
00590 {
00591   mdb_err outErr = 0;
00592   mdb_bool isRow = morkBool_kFalse;
00593   outOid->mOid_Scope = 0;
00594   outOid->mOid_Id = morkId_kMinusOne;
00595   morkCell* cell = 0;
00596   morkEnv* ev = this->CanUseCell(mev, /*inMutable*/ morkBool_kTrue,
00597     &outErr, &cell);
00598   if ( ev )
00599   {
00600     morkCellObject* cellObj = (morkCellObject*) mHandle_Object;
00601     morkAtom* atom = cellObj->GetCellAtom(ev);
00602     if ( atom )
00603     {
00604       isRow = atom->IsRowOid();
00605       if ( isRow || atom->IsTableOid() )
00606         *outOid = ((morkOidAtom*) atom)->mOidAtom_Oid;
00607     }
00608       
00609     outErr = ev->AsErr();
00610   }
00611   if ( outIsRow )
00612     *outIsRow = isRow;
00613     
00614   return outErr;
00615 }
00616 
00617 /*virtual*/ mdb_err
00618 orkinCell::GetAnyChild( // access table of specific attribute
00619   nsIMdbEnv* mev, // context
00620   nsIMdbRow** acqRow, // child row (or null)
00621   nsIMdbTable** acqTable) // child table (or null)
00622 {
00623   mdb_err outErr = 0;
00624   nsIMdbRow* outRow = 0;
00625   nsIMdbTable* outTable = 0;
00626   morkCell* cell = 0;
00627   morkEnv* ev = this->CanUseCell(mev, /*inMutable*/ morkBool_kTrue,
00628     &outErr, &cell);
00629   if ( ev )
00630   {
00631     morkCellObject* cellObj;
00632     cellObj = (morkCellObject*) mHandle_Object;
00633     ev->StubMethodOnlyError();
00634     outErr = ev->AsErr();
00635   }
00636   MORK_ASSERT(acqTable);
00637   if ( acqTable )
00638     *acqTable = outTable;
00639   MORK_ASSERT(acqRow);
00640   if ( acqRow )
00641     *acqRow = outRow;
00642     
00643   return outErr;
00644 }
00645 
00646 
00647 /*virtual*/ mdb_err
00648 orkinCell::SetChildRow( // access table of specific attribute
00649   nsIMdbEnv* mev, // context
00650   nsIMdbRow* ioRow)
00651 {
00652   MORK_USED_1(ioRow);
00653   mdb_err outErr = 0;
00654   morkCell* cell = 0;
00655   morkEnv* ev = this->CanUseCell(mev, /*inMutable*/ morkBool_kTrue,
00656     &outErr, &cell);
00657   if ( ev )
00658   {
00659     // remember row->MaybeDirtySpaceStoreAndRow();
00660 
00661     morkCellObject* cellObj = (morkCellObject*) mHandle_Object;
00662     MORK_USED_1(cellObj);
00663 
00664     ev->StubMethodOnlyError();
00665     outErr = ev->AsErr();
00666   }
00667     
00668   return outErr;
00669 } // inRow must be bound inside this same db port
00670 
00671 /*virtual*/ mdb_err
00672 orkinCell::GetChildRow( // access row of specific attribute
00673   nsIMdbEnv* mev, // context
00674   nsIMdbRow** acqRow) // acquire child row (or nil if no child)
00675 {
00676   mdb_err outErr = 0;
00677   nsIMdbRow* outRow = 0;
00678   morkCell* cell = 0;
00679   morkEnv* ev = this->CanUseCell(mev, /*inMutable*/ morkBool_kTrue,
00680     &outErr, &cell);
00681   if ( ev )
00682   {
00683     morkCellObject* cellObj;
00684     cellObj = (morkCellObject*) mHandle_Object;
00685     ev->StubMethodOnlyError();
00686     outErr = ev->AsErr();
00687   }
00688   if ( acqRow )
00689     *acqRow = outRow;
00690     
00691   return outErr;
00692 }
00693 
00694 
00695 /*virtual*/ mdb_err
00696 orkinCell::SetChildTable( // access table of specific attribute
00697   nsIMdbEnv* mev, // context
00698   nsIMdbTable* inTable) // table must be bound inside this same db port
00699 {
00700   MORK_USED_1(inTable);
00701   mdb_err outErr = 0;
00702   morkCell* cell = 0;
00703   morkEnv* ev = this->CanUseCell(mev, /*inMutable*/ morkBool_kTrue,
00704     &outErr, &cell);
00705   if ( ev )
00706   {
00707     // remember row->MaybeDirtySpaceStoreAndRow();
00708 
00709     morkCellObject* cellObj = (morkCellObject*) mHandle_Object;
00710     MORK_USED_1(cellObj);
00711 
00712     ev->StubMethodOnlyError();
00713     outErr = ev->AsErr();
00714   }
00715     
00716   return outErr;
00717 }
00718 
00719 /*virtual*/ mdb_err
00720 orkinCell::GetChildTable( // access table of specific attribute
00721   nsIMdbEnv* mev, // context
00722   nsIMdbTable** acqTable) // acquire child tabdle (or nil if no chil)
00723 {
00724   mdb_err outErr = 0;
00725   nsIMdbTable* outTable = 0;
00726   morkCell* cell = 0;
00727   morkEnv* ev = this->CanUseCell(mev, /*inMutable*/ morkBool_kTrue,
00728     &outErr, &cell);
00729   if ( ev )
00730   {
00731     morkCellObject* cellObj;
00732     cellObj = (morkCellObject*) mHandle_Object;
00733     ev->StubMethodOnlyError();
00734     outErr = ev->AsErr();
00735   }
00736   if ( acqTable )
00737     *acqTable = outTable;
00738     
00739   return outErr;
00740 }
00741 // } ----- end children methods -----
00742 
00743 // } ===== end nsIMdbCell methods =====
00744 
00745 
00746 //3456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789