SourceXtractorPlusPlus  0.15
Please provide a description of the project.
Public Types | Public Member Functions | Private Attributes | List of all members
SourceXtractor::TableOutput Class Reference

#include <TableOutput.h>

Inheritance diagram for SourceXtractor::TableOutput:
[legend]
Collaboration diagram for SourceXtractor::TableOutput:
[legend]

Public Types

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

Public Member Functions

size_t flush () override
 
 TableOutput (SourceToRowConverter source_to_row, TableHandler table_handler, SourceHandler source_handler, size_t flush_size)
 
void outputSource (const SourceInterface &source) override
 
- Public Member Functions inherited from SourceXtractor::Output
virtual ~Output ()=default
 
virtual void handleMessage (const std::shared_ptr< SourceInterface > &source) override
 
virtual void handleMessage (const std::shared_ptr< SourceGroupInterface > &source_group) override
 
- Public Member Functions inherited from SourceXtractor::Observer< std::shared_ptr< SourceInterface > >
virtual ~Observer ()=default
 
- Public Member Functions inherited from SourceXtractor::Observer< std::shared_ptr< SourceGroupInterface > >
virtual ~Observer ()=default
 

Private Attributes

SourceToRowConverter m_source_to_row
 
TableHandler m_table_handler
 
SourceHandler m_source_handler
 
std::vector< Euclid::Table::Rowm_rows {}
 
size_t m_flush_size
 
size_t m_total_rows_written
 

Detailed Description

Definition at line 32 of file TableOutput.h.

Member Typedef Documentation

◆ SourceHandler

Definition at line 38 of file TableOutput.h.

◆ SourceToRowConverter

Definition at line 36 of file TableOutput.h.

◆ TableHandler

Definition at line 37 of file TableOutput.h.

Constructor & Destructor Documentation

◆ TableOutput()

SourceXtractor::TableOutput::TableOutput ( SourceToRowConverter  source_to_row,
TableHandler  table_handler,
SourceHandler  source_handler,
size_t  flush_size 
)
inline

Definition at line 50 of file TableOutput.h.

Member Function Documentation

◆ flush()

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

Implements SourceXtractor::Output.

Definition at line 40 of file TableOutput.h.

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

Referenced by outputSource().

Here is the call graph for this function:

◆ outputSource()

void SourceXtractor::TableOutput::outputSource ( const SourceInterface source)
inlineoverridevirtual

Implements SourceXtractor::Output.

Definition at line 56 of file TableOutput.h.

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

Here is the call graph for this function:

Member Data Documentation

◆ m_flush_size

size_t SourceXtractor::TableOutput::m_flush_size
private

Definition at line 70 of file TableOutput.h.

Referenced by outputSource().

◆ m_rows

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

Definition at line 69 of file TableOutput.h.

Referenced by flush(), and outputSource().

◆ m_source_handler

SourceHandler SourceXtractor::TableOutput::m_source_handler
private

Definition at line 68 of file TableOutput.h.

Referenced by outputSource().

◆ m_source_to_row

SourceToRowConverter SourceXtractor::TableOutput::m_source_to_row
private

Definition at line 66 of file TableOutput.h.

Referenced by outputSource().

◆ m_table_handler

TableHandler SourceXtractor::TableOutput::m_table_handler
private

Definition at line 67 of file TableOutput.h.

Referenced by flush().

◆ m_total_rows_written

size_t SourceXtractor::TableOutput::m_total_rows_written
private

Definition at line 71 of file TableOutput.h.

Referenced by flush().


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