Class BlockProducer

Nested Relationships

Nested Types

Inheritance Relationships

Derived Types

Class Documentation

class BlockProducer

Interface used for reading blocks of data from a source.

Subclassed by ska::pst::common::FileBlockProducer, ska::pst::smrb::SmrbBlockProducer

Public Functions

virtual ~BlockProducer() = default

Virtual destructor required for interfaces.

virtual const ska::pst::common::AsciiHeader &get_header() const = 0

Get the AsciiHeader that describes the block stream.

Returns

const ska::pst::common::AsciiHeader& header of the data

virtual Block next_block() = 0

Get the next block of data.

This returns a pair that contains the pointer to the next block of data and the size, in bytes, of that block. At the end of the block stream, this function returns (nullptr, 0)

Returns

(char* address of block, size_t bytes in block)

class Block

Stores the base address and size, in bytes, of a block of data.

Public Functions

inline Block(char *_block = nullptr, size_t _size = 0, size_t _obs_offset = 0)

Public Members

char *block

pointer to the block

size_t size

the size, in bytes, of the block

size_t obs_offset

the offset, in bytes from the first byte of data in this stream