MDF Lib 2.2
Interface against MDF 3/4 files
|
Base class for all MDF blocks.
#include <iblock.h>
Public Member Functions | |
virtual | ~IBlock ()=default |
Default destructor. | |
virtual int64_t | Index () const =0 |
File position within the file. | |
virtual std::string | BlockType () const =0 |
Returns the block type. | |
|
nodiscardpure virtual |
The block type is 2 character string for example 'AT' and 'DT'. In MDF 4, the block type is actually 4 characters but this function removes the two first characters.
|
nodiscardpure virtual |
The Index() function is the blocks file position in the file. The position gives each block a unique index/identity.
If file position is 0, the block have not been written yet. This is frequently used to detect if the block should be written or updated.