MDF Lib 2.2
Interface against MDF 3/4 files
Loading...
Searching...
No Matches
mdf::IBlock Class Referenceabstract

Base class for all MDF blocks.

#include <iblock.h>

Inheritance diagram for mdf::IBlock:

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.
 

Member Function Documentation

◆ BlockType()

virtual std::string mdf::IBlock::BlockType ( ) const
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.

Returns
Block type (2 characters length).

◆ Index()

virtual int64_t mdf::IBlock::Index ( ) const
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.

Returns
File position of the block.

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