Mantid
|
FreeBlock: a simple class that holds the position and size of block of free space in a file. More...
#include <FreeBlock.h>
Public Member Functions | |
FreeBlock () | |
Default constructor. More... | |
FreeBlock (uint64_t pos, uint64_t size) | |
Constructor. More... | |
uint64_t | getFilePosition () const |
uint64_t | getSize () const |
Static Public Member Functions | |
static bool | merge (FreeBlock &first, const FreeBlock &second) |
Attempt to merge an adjacent block into this one. More... | |
Public Attributes | |
uint64_t | m_filePos |
uint64_t | m_size |
FreeBlock: a simple class that holds the position and size of block of free space in a file.
This is used by the DiskBuffer class to track and defrag free space.
Definition at line 22 of file FreeBlock.h.
|
inline |
Default constructor.
Definition at line 25 of file FreeBlock.h.
|
inline |
Constructor.
pos | :: position in the file |
size | :: size of the block |
Definition at line 30 of file FreeBlock.h.
|
inline |
Definition at line 33 of file FreeBlock.h.
|
inline |
Definition at line 36 of file FreeBlock.h.
References m_size.
|
inlinestatic |
Attempt to merge an adjacent block into this one.
If the blocks are contiguous, they get merged into one larger block. NOTE: "second" must be AFTER "first" in the file.
first | :: block to be merged and which will remain |
second | :: other block to merge with this one |
Definition at line 49 of file FreeBlock.h.
References m_filePos, and m_size.
Referenced by Mantid::Kernel::DiskBuffer::defragFreeBlocks(), and Mantid::Kernel::DiskBuffer::freeBlock().
uint64_t Mantid::Kernel::FreeBlock::m_filePos |
Definition at line 60 of file FreeBlock.h.
Referenced by merge().
uint64_t Mantid::Kernel::FreeBlock::m_size |
Definition at line 61 of file FreeBlock.h.
Referenced by merge().