Mantid
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
Mantid::DataHandling::DataBlockGenerator Class Reference

DataBlockGenerator: The DataBlockGenerator class provides increasing int64_t numbers from a collection of intervals which are being input into the generator at construction. More...

#include <DataBlockGenerator.h>

Public Member Functions

 DataBlockGenerator (std::vector< SpectrumPair > intervals)
 
specnum_t getValue ()
 
bool isDone ()
 
void next ()
 Convenience method for incrementing. More...
 
DataBlockGeneratoroperator++ ()
 We need to increment through a series of intervals and need to make sure that we skip the gaps. More...
 
DataBlockGenerator operator++ (int)
 

Public Attributes

boost::optional< size_t > m_currentIntervalIndex
 
specnum_t m_currentSpectrum
 
std::vector< SpectrumPairm_intervals
 

Detailed Description

DataBlockGenerator: The DataBlockGenerator class provides increasing int64_t numbers from a collection of intervals which are being input into the generator at construction.

Definition at line 21 of file DataBlockGenerator.h.

Constructor & Destructor Documentation

◆ DataBlockGenerator()

Mantid::DataHandling::DataBlockGenerator::DataBlockGenerator ( std::vector< SpectrumPair intervals)

Definition at line 17 of file DataBlockGenerator.cpp.

References m_currentIntervalIndex, m_currentSpectrum, and m_intervals.

Member Function Documentation

◆ getValue()

specnum_t Mantid::DataHandling::DataBlockGenerator::getValue ( )

Definition at line 80 of file DataBlockGenerator.cpp.

References m_currentSpectrum.

◆ isDone()

bool Mantid::DataHandling::DataBlockGenerator::isDone ( )

Definition at line 78 of file DataBlockGenerator.cpp.

References m_currentIntervalIndex.

◆ next()

void Mantid::DataHandling::DataBlockGenerator::next ( )

Convenience method for incrementing.

Definition at line 76 of file DataBlockGenerator.cpp.

◆ operator++() [1/2]

DataBlockGenerator & Mantid::DataHandling::DataBlockGenerator::operator++ ( )

We need to increment through a series of intervals and need to make sure that we skip the gaps.

This does assume that the intervals are ordered.

Definition at line 39 of file DataBlockGenerator.cpp.

References m_currentIntervalIndex, m_currentSpectrum, and m_intervals.

◆ operator++() [2/2]

DataBlockGenerator Mantid::DataHandling::DataBlockGenerator::operator++ ( int  )

Definition at line 67 of file DataBlockGenerator.cpp.

References m_intervals.

Member Data Documentation

◆ m_currentIntervalIndex

boost::optional<size_t> Mantid::DataHandling::DataBlockGenerator::m_currentIntervalIndex

Definition at line 35 of file DataBlockGenerator.h.

Referenced by DataBlockGenerator(), isDone(), and operator++().

◆ m_currentSpectrum

specnum_t Mantid::DataHandling::DataBlockGenerator::m_currentSpectrum

Definition at line 33 of file DataBlockGenerator.h.

Referenced by DataBlockGenerator(), getValue(), and operator++().

◆ m_intervals

std::vector<SpectrumPair> Mantid::DataHandling::DataBlockGenerator::m_intervals

Definition at line 32 of file DataBlockGenerator.h.

Referenced by DataBlockGenerator(), and operator++().


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