|
wavelength 1.0.0
|
One block buffer of the disc cache. More...
#include <blockmgr.h>
Public Member Functions | |
| Block () | |
| Take the next buffer and mark the block used now. | |
| void | Touch () |
| Mark the block used now. | |
| char * | GetBuffer () const |
| int | GetBlockNum () const |
| void | SetBlockNum (int nBlockNum) |
| Set the block of the disc the buffer stores. | |
| int | GetTimestamp () const |
| Block () | |
| Take the next free block buffer and mark the block as just used. | |
| void | UpdateTimestamp () |
| Mark the block as just used. | |
Static Public Member Functions | |
| static int | NextBuffer () |
| Report the index of the next buffer a block takes, and advance it. | |
| static int | CurrentTime () |
| Report the latest use mark Touch() handed out. | |
| static int | NextBufferIndex () |
| Take the index of the next free block buffer. | |
| static int | CurrentTimestamp () |
| Report the latest timestamp. | |
One block buffer of the disc cache.
Buffer of one block of the archive.
The class is not polymorphic and emits no RTTI, and the name is inferred. Each block takes the next of eight static 64 KB buffers.
The RTTI includes the class name. The object is 0xc bytes.
| Block::Block | ( | ) |
Take the next buffer and mark the block used now.
| Block::Block | ( | ) |
Take the next free block buffer and mark the block as just used.
|
static |
Report the index of the next buffer a block takes, and advance it.
|
static |
Report the latest use mark Touch() handed out.
| void Block::Touch | ( | ) |
Mark the block used now.
|
inline |
|
inline |
|
inline |
Set the block of the disc the buffer stores.
| nBlockNum | The block, or -1. |
|
inline |
| void Block::UpdateTimestamp | ( | ) |
Mark the block as just used.
|
static |
Take the index of the next free block buffer.
|
static |
Report the latest timestamp.