MCPcopy Create free account
hub / github.com/Tripwire/tripwire-open-source / IsItemValid

Method IsItemValid

src/db/blockrecordarray.cpp:215–225  ·  view source on GitHub ↗

////////////////////////////////////////////////////////////////////////// IsItemValid //////////////////////////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

213// IsItemValid
214///////////////////////////////////////////////////////////////////////////////
215bool cBlockRecordArray::IsItemValid(int index) const //throw (eArchive)
216{
217 ASSERT(Initialized());
218
219 if ((index < 0) || (index >= GetNumItems()))
220 return false;
221
222 cBlockFile::Block* pBlock = mpBlockFile->GetBlock(mBlockNum);
223
224 return (util_GetIndexArray(pBlock).maRecordIndex[index].GetMainIndex() != INVALID_INDEX);
225}
226
227
228///////////////////////////////////////////////////////////////////////////////

Callers 3

MapQuantumDatabaseMethod · 0.80
TestBlockRecordArrayFunction · 0.80
IsValidAddrMethod · 0.80

Calls 2

GetMainIndexMethod · 0.80
GetBlockMethod · 0.45

Tested by 1

TestBlockRecordArrayFunction · 0.64