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

Method GetData

src/db/hierdatabase.cpp:560–573  ·  view source on GitHub ↗

////////////////////////////////////////////////////////////////////////// GetData //////////////////////////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

558// GetData
559///////////////////////////////////////////////////////////////////////////////
560int8* cHierDatabaseIter::GetData(int32& length) const //throw (eArchive, eHierDatabase)
561{
562 ASSERT(HasData());
563 if (!HasData())
564 {
565 throw eHierDatabase(_T("Attempt to get data from a node when HasData() is false"));
566 }
567
568 //
569 // note that we can only get data for reading; perhaps in the future I will add
570 // support for retrieving data for writing as well.
571 //
572 return mpDb->GetDataForReading(cBlockRecordFile::tAddr(mIter->mData.mBlockNum, mIter->mData.mIndex), length);
573}
574
575///////////////////////////////////////////////////////////////////////////////
576// HasData

Callers

nothing calls this directly

Calls 2

tAddrClass · 0.85
GetDataForReadingMethod · 0.45

Tested by

no test coverage detected