openMSX
Public Member Functions | Public Attributes | List of all members
TTTestData Struct Referencefinal
Inheritance diagram for TTTestData:
Inheritance graph
[legend]
Collaboration diagram for TTTestData:
Collaboration graph
[legend]

Public Member Functions

uint8_t * getData (size_t offset, size_t) override
 Return the requested portion of the to-be-hashed data block. More...
 
bool isCacheStillValid (time_t &) override
 Because TTH calculation of a large file takes some time (a few 1/10s for a harddisk image) we try to cache previous calculations. More...
 

Public Attributes

uint8_t * buffer
 

Additional Inherited Members

- Protected Member Functions inherited from openmsx::TTData
 ~TTData ()=default
 

Detailed Description

Definition at line 8 of file TigerTree_test.cc.

Member Function Documentation

◆ getData()

uint8_t* TTTestData::getData ( size_t  offset,
size_t  size 
)
inlineoverridevirtual

Return the requested portion of the to-be-hashed data block.

Special requirement: it should be allowed to temporarily overwrite the byte one position before the returned pointer.

Implements openmsx::TTData.

Definition at line 10 of file TigerTree_test.cc.

◆ isCacheStillValid()

bool TTTestData::isCacheStillValid ( time_t &  time)
inlineoverridevirtual

Because TTH calculation of a large file takes some time (a few 1/10s for a harddisk image) we try to cache previous calculations.

This method makes sure we don't wrongly reuse the data. E.g. after it has been modified (by openmsx or even externally).

Note that the current implementation of the caching is only suited for files. Refactor this if we ever need some different.

Implements openmsx::TTData.

Definition at line 15 of file TigerTree_test.cc.

Member Data Documentation

◆ buffer

uint8_t* TTTestData::buffer

Definition at line 20 of file TigerTree_test.cc.

Referenced by TEST_CASE().


The documentation for this struct was generated from the following file: