Thrill  0.1
CatBlockSource< BlockSource > Class Template Reference

Detailed Description

template<typename BlockSource>
class thrill::data::CatBlockSource< BlockSource >

CatBlockSource is a BlockSource which concatenates all Blocks available from a vector of BlockSources.

They are concatenated in order: first all Blocks from source zero, then from source one, etc.

Definition at line 32 of file cat_block_source.hpp.

#include <cat_block_source.hpp>

Public Member Functions

 CatBlockSource ()=default
 default constructor More...
 
 CatBlockSource (std::vector< BlockSource > &&sources)
 Construct a BlockSource which catenates many other BlockSources. More...
 
 CatBlockSource (const CatBlockSource &)=delete
 non-copyable: delete copy-constructor More...
 
 CatBlockSource (CatBlockSource &&)=default
 move-constructor: default More...
 
PinnedBlock NextBlock ()
 
CatBlockSourceoperator= (const CatBlockSource &)=delete
 non-copyable: delete assignment operator More...
 
CatBlockSourceoperator= (CatBlockSource &&)=default
 move-assignment operator: default More...
 

Private Attributes

size_t current_ = 0
 current source, all sources < current_ are empty. More...
 
std::vector< BlockSource > sources_
 vector containing block sources More...
 

Constructor & Destructor Documentation

◆ CatBlockSource() [1/4]

CatBlockSource ( )
default

default constructor

Referenced by CatBlockSource< BlockSource >::CatBlockSource().

◆ CatBlockSource() [2/4]

CatBlockSource ( std::vector< BlockSource > &&  sources)
inlineexplicit

Construct a BlockSource which catenates many other BlockSources.

Definition at line 39 of file cat_block_source.hpp.

References CatBlockSource< BlockSource >::CatBlockSource(), and CatBlockSource< BlockSource >::operator=().

◆ CatBlockSource() [3/4]

CatBlockSource ( const CatBlockSource< BlockSource > &  )
delete

non-copyable: delete copy-constructor

◆ CatBlockSource() [4/4]

CatBlockSource ( CatBlockSource< BlockSource > &&  )
default

move-constructor: default

Member Function Documentation

◆ NextBlock()

PinnedBlock NextBlock ( )
inline

Advance to next block of file, delivers current_ and end_ for BlockReader. Returns false if the source is empty.

Definition at line 53 of file cat_block_source.hpp.

References CatBlockSource< BlockSource >::current_, PinnedBlock::IsValid(), and CatBlockSource< BlockSource >::sources_.

◆ operator=() [1/2]

CatBlockSource& operator= ( const CatBlockSource< BlockSource > &  )
delete

non-copyable: delete assignment operator

Referenced by CatBlockSource< BlockSource >::CatBlockSource().

◆ operator=() [2/2]

CatBlockSource& operator= ( CatBlockSource< BlockSource > &&  )
default

move-assignment operator: default

Member Data Documentation

◆ current_

size_t current_ = 0
private

current source, all sources < current_ are empty.

Definition at line 66 of file cat_block_source.hpp.

Referenced by CatBlockSource< BlockSource >::NextBlock().

◆ sources_

std::vector<BlockSource> sources_
private

vector containing block sources

Definition at line 63 of file cat_block_source.hpp.

Referenced by CatBlockSource< BlockSource >::NextBlock().


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