bpp-seq-omics  2.4.1
bpp::MafIteratorSynchronizer Class Reference

This special iterator synchronizes two adaptors. More...

#include <Bpp/Seq/Io/Maf/MafIterator.h>

+ Inheritance diagram for bpp::MafIteratorSynchronizer:
+ Collaboration diagram for bpp::MafIteratorSynchronizer:

Public Member Functions

 MafIteratorSynchronizer (MafIterator *primaryIterator, MafIterator *secondaryIterator)
 
void setLogStream (std::shared_ptr< OutputStream > logstream)
 
void addIterationListener (IterationListener *listener)
 
MafBlocknextBlock ()
 Get the next available alignment block. More...
 
bool isVerbose () const
 
void setVerbose (bool yn)
 

Protected Member Functions

virtual void fireIterationStartSignal_ ()
 
virtual void fireIterationMoveSignal_ (const MafBlock &currentBlock)
 
virtual void fireIterationStopSignal_ ()
 

Protected Attributes

MafIteratoriterator_
 
MafBlockcurrentBlock_
 
std::shared_ptr< OutputStreamlogstream_
 
std::vector< IterationListener * > iterationListeners_
 
bool started_
 
bool verbose_
 

Private Member Functions

 MafIteratorSynchronizer (const MafIteratorSynchronizer &iterator)
 
MafIteratorSynchronizeroperator= (const MafIteratorSynchronizer &iterator)
 
MafBlockanalyseCurrentBlock_ ()
 

Private Attributes

MafIteratorsecondaryIterator_
 

Detailed Description

This special iterator synchronizes two adaptors.

It takes as input a main iterator and a secondary one. The nextBlock method of the secondary iterator will be called immediately after the one of the primary one. The resulting block of the main iterator will be forwarded, while the one of the secondary iterator will be destroyed.

Definition at line 216 of file MafIterator.h.

Constructor & Destructor Documentation

◆ MafIteratorSynchronizer() [1/2]

bpp::MafIteratorSynchronizer::MafIteratorSynchronizer ( MafIterator primaryIterator,
MafIterator secondaryIterator 
)
inline

Definition at line 223 of file MafIterator.h.

◆ MafIteratorSynchronizer() [2/2]

bpp::MafIteratorSynchronizer::MafIteratorSynchronizer ( const MafIteratorSynchronizer iterator)
inlineprivate

Definition at line 228 of file MafIterator.h.

Member Function Documentation

◆ addIterationListener()

void bpp::AbstractMafIterator::addIterationListener ( IterationListener listener)
inlinevirtualinherited

Implements bpp::MafIterator.

Definition at line 99 of file MafIterator.h.

References bpp::AbstractMafIterator::iterationListeners_.

◆ analyseCurrentBlock_()

MafBlock* bpp::MafIteratorSynchronizer::analyseCurrentBlock_ ( )
inlineprivatevirtual

◆ fireIterationMoveSignal_()

void AbstractMafIterator::fireIterationMoveSignal_ ( const MafBlock currentBlock)
protectedvirtualinherited

Definition at line 57 of file MafIterator.cpp.

Referenced by bpp::AbstractMafIterator::nextBlock().

◆ fireIterationStartSignal_()

void AbstractMafIterator::fireIterationStartSignal_ ( )
protectedvirtualinherited

Definition at line 51 of file MafIterator.cpp.

Referenced by bpp::AbstractMafIterator::nextBlock().

◆ fireIterationStopSignal_()

void AbstractMafIterator::fireIterationStopSignal_ ( )
protectedvirtualinherited

Definition at line 63 of file MafIterator.cpp.

Referenced by bpp::AbstractMafIterator::nextBlock().

◆ isVerbose()

bool bpp::AbstractMafIterator::isVerbose ( ) const
inlinevirtualinherited

Implements bpp::MafIterator.

Definition at line 116 of file MafIterator.h.

References bpp::AbstractMafIterator::verbose_.

◆ nextBlock()

MafBlock* bpp::AbstractMafIterator::nextBlock ( )
inlinevirtualinherited

Get the next available alignment block.

Returns
A maf alignment block, or a null pointer if no more block is available.

Implements bpp::MafIterator.

Definition at line 103 of file MafIterator.h.

References bpp::AbstractMafIterator::analyseCurrentBlock_(), bpp::AbstractMafIterator::fireIterationMoveSignal_(), bpp::AbstractMafIterator::fireIterationStartSignal_(), bpp::AbstractMafIterator::fireIterationStopSignal_(), and bpp::AbstractMafIterator::started_.

◆ operator=()

MafIteratorSynchronizer& bpp::MafIteratorSynchronizer::operator= ( const MafIteratorSynchronizer iterator)
inlineprivate

Definition at line 233 of file MafIterator.h.

References secondaryIterator_.

◆ setLogStream()

void bpp::AbstractFilterMafIterator::setLogStream ( std::shared_ptr< OutputStream logstream)
inlineinherited

Definition at line 178 of file MafIterator.h.

References bpp::AbstractFilterMafIterator::logstream_.

◆ setVerbose()

void bpp::AbstractMafIterator::setVerbose ( bool  yn)
inlinevirtualinherited

Implements bpp::MafIterator.

Definition at line 117 of file MafIterator.h.

References bpp::AbstractMafIterator::verbose_.

Member Data Documentation

◆ currentBlock_

◆ iterationListeners_

std::vector<IterationListener*> bpp::AbstractMafIterator::iterationListeners_
protectedinherited

Definition at line 89 of file MafIterator.h.

Referenced by bpp::AbstractMafIterator::addIterationListener().

◆ iterator_

◆ logstream_

◆ secondaryIterator_

MafIterator* bpp::MafIteratorSynchronizer::secondaryIterator_
private

Definition at line 220 of file MafIterator.h.

Referenced by analyseCurrentBlock_(), and operator=().

◆ started_

bool bpp::AbstractMafIterator::started_
protectedinherited

Definition at line 90 of file MafIterator.h.

Referenced by bpp::AbstractMafIterator::nextBlock().

◆ verbose_

bool bpp::AbstractMafIterator::verbose_
protectedinherited

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