////////////////////////////////////////////////////////////////////////// util_ReadObject -- this will read the given object from the database from the given address. eArchive is thrown on exception. //////////////////////////////////////////////////////////////////////////
| 63 | // given address. eArchive is thrown on exception. |
| 64 | /////////////////////////////////////////////////////////////////////////////// |
| 65 | static void util_ReadObject(cHierDatabase* pDb, cHierNode* pNode, const cHierAddr& addr) |
| 66 | { |
| 67 | int32 dataSize; |
| 68 | int8* pData = pDb->GetDataForReading(cBlockRecordFile::tAddr(addr.mBlockNum, addr.mIndex), dataSize); |
| 69 | // |
| 70 | // make sure we aren't trying to read a null object |
| 71 | // |
| 72 | util_ThrowIfNull(addr, _T("util_ReadObject")); |
| 73 | |
| 74 | cFixedMemArchive arch(pData, dataSize); |
| 75 | pNode->Read(arch); |
| 76 | } |
| 77 | |
| 78 | /////////////////////////////////////////////////////////////////////////////// |
| 79 | // util_WriteObject -- this will write the given object to the database, returning |
no test coverage detected