////////////////////////////////////////////////////////////////////////// util_WriteObject -- this will write the given object to the database, returning the address that it was written to, and throwing eArchive on error. //////////////////////////////////////////////////////////////////////////
| 80 | // the address that it was written to, and throwing eArchive on error. |
| 81 | /////////////////////////////////////////////////////////////////////////////// |
| 82 | static cHierAddr util_WriteObject(cHierDatabase* pDb, cHierNode* pNode) |
| 83 | { |
| 84 | static cMemoryArchive arch; |
| 85 | arch.Seek(0, cBidirArchive::BEGINNING); |
| 86 | pNode->Write(arch); |
| 87 | |
| 88 | cBlockRecordFile::tAddr addr = pDb->AddItem(arch.GetMemory(), arch.CurrentPos()); |
| 89 | return cHierAddr(addr.mBlockNum, addr.mIndex); |
| 90 | } |
| 91 | |
| 92 | /////////////////////////////////////////////////////////////////////////////// |
| 93 | // util_RewriteObject -- call this when the data in a structure has changed, but |