wavelength 1.0.0
Loading...
Searching...
No Matches
Block Class Reference

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.

Detailed Description

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.

Constructor & Destructor Documentation

◆ Block() [1/2]

Block::Block ( )

Take the next buffer and mark the block used now.

Ghidra address:
NTSC-U/C: 0x0028f7f0
Ghidra address:
PAL: 0x002991b8

◆ Block() [2/2]

Block::Block ( )

Take the next free block buffer and mark the block as just used.

Ghidra address:
0x1000f070

Member Function Documentation

◆ NextBuffer()

int Block::NextBuffer ( )
static

Report the index of the next buffer a block takes, and advance it.

Returns
The index.
Ghidra address:
NTSC-U/C: 0x0028f7d8
Ghidra address:
PAL: 0x002991a0

◆ CurrentTime()

int Block::CurrentTime ( )
static

Report the latest use mark Touch() handed out.

Returns
The mark.
Ghidra address:
NTSC-U/C: 0x0028f840
Ghidra address:
PAL: 0x00299208

◆ Touch()

void Block::Touch ( )

Mark the block used now.

Ghidra address:
NTSC-U/C: 0x0028f850
Ghidra address:
PAL: 0x00299218

◆ GetBuffer()

char * Block::GetBuffer ( ) const
inline
Returns
The block's data.

◆ GetBlockNum()

int Block::GetBlockNum ( ) const
inline
Returns
The block of the disc the buffer stores, or -1.

◆ SetBlockNum()

void Block::SetBlockNum ( int nBlockNum)
inline

Set the block of the disc the buffer stores.

Parameters
nBlockNumThe block, or -1.

◆ GetTimestamp()

int Block::GetTimestamp ( ) const
inline
Returns
The use mark of the last Touch().

◆ UpdateTimestamp()

void Block::UpdateTimestamp ( )

Mark the block as just used.

Ghidra address:
0x1000f0b0

◆ NextBufferIndex()

int Block::NextBufferIndex ( )
static

Take the index of the next free block buffer.

Returns
The index.
Ghidra address:
0x1000f030

◆ CurrentTimestamp()

int Block::CurrentTimestamp ( )
static

Report the latest timestamp.

Returns
The timestamp.
Ghidra address:
0x1000f0a0

The documentation for this class was generated from the following files: