SourceXtractorPlusPlus 0.21
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Member Functions | Private Attributes | List of all members
SourceXtractor::FlushableOutput Class Referenceabstract

#include <FlushableOutput.h>

Inheritance diagram for SourceXtractor::FlushableOutput:
Inheritance graph
[legend]
Collaboration diagram for SourceXtractor::FlushableOutput:
Collaboration graph
[legend]

Public Types

using SourceToRowConverter = std::function<Euclid::Table::Row(const SourceInterface&)>
 

Public Member Functions

 FlushableOutput (SourceToRowConverter source_to_row, size_t flush_size)
 
virtual ~FlushableOutput ()=default
 
size_t flush () override
 
void outputSource (const SourceInterface &source) override
 
- Public Member Functions inherited from SourceXtractor::Output
virtual ~Output ()=default
 
void receiveSource (std::unique_ptr< SourceGroupInterface > source_group) override
 
void receiveProcessSignal (const ProcessSourcesEvent &) override
 
virtual void nextPart ()=0
 
- Public Member Functions inherited from SourceXtractor::PipelineReceiver< SourceGroupInterface >
virtual ~PipelineReceiver ()=default
 

Protected Member Functions

virtual void writeRows (const std::vector< Euclid::Table::Row > &rows)=0
 

Private Attributes

SourceToRowConverter m_source_to_row
 
size_t m_flush_size
 
std::vector< Euclid::Table::Rowm_rows {}
 
size_t m_total_rows_written
 

Detailed Description

Definition at line 17 of file FlushableOutput.h.

Member Typedef Documentation

◆ SourceToRowConverter

Definition at line 20 of file FlushableOutput.h.

Constructor & Destructor Documentation

◆ FlushableOutput()

SourceXtractor::FlushableOutput::FlushableOutput ( SourceToRowConverter source_to_row,
size_t flush_size )
inline

Definition at line 22 of file FlushableOutput.h.

◆ ~FlushableOutput()

virtual SourceXtractor::FlushableOutput::~FlushableOutput ( )
virtualdefault

Member Function Documentation

◆ flush()

size_t SourceXtractor::FlushableOutput::flush ( )
inlineoverridevirtual
Returns
Number of elements written

Implements SourceXtractor::Output.

Definition at line 28 of file FlushableOutput.h.

References std::vector< T >::clear(), std::vector< T >::empty(), m_rows, m_total_rows_written, std::vector< T >::size(), and writeRows().

Referenced by outputSource().

Here is the call graph for this function:

◆ outputSource()

void SourceXtractor::FlushableOutput::outputSource ( const SourceInterface & source)
inlineoverridevirtual

Implements SourceXtractor::Output.

Reimplemented in SourceXtractor::LdacOutput.

Definition at line 37 of file FlushableOutput.h.

References std::vector< T >::emplace_back(), flush(), m_flush_size, m_rows, m_source_to_row, and std::vector< T >::size().

Here is the call graph for this function:

◆ writeRows()

virtual void SourceXtractor::FlushableOutput::writeRows ( const std::vector< Euclid::Table::Row > & rows)
protectedpure virtual

Member Data Documentation

◆ m_flush_size

size_t SourceXtractor::FlushableOutput::m_flush_size
private

Definition at line 49 of file FlushableOutput.h.

Referenced by outputSource().

◆ m_rows

std::vector<Euclid::Table::Row> SourceXtractor::FlushableOutput::m_rows {}
private

Definition at line 51 of file FlushableOutput.h.

Referenced by flush(), and outputSource().

◆ m_source_to_row

SourceToRowConverter SourceXtractor::FlushableOutput::m_source_to_row
private

Definition at line 48 of file FlushableOutput.h.

Referenced by outputSource().

◆ m_total_rows_written

size_t SourceXtractor::FlushableOutput::m_total_rows_written
private

Definition at line 52 of file FlushableOutput.h.

Referenced by flush().


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