SourceXtractorPlusPlus
0.11
Please provide a description of the project.
|
For each Source it receives, applies PartitionSteps and outputs one or more Sources. More...
#include <Partition.h>
Public Member Functions | |
virtual | ~Partition ()=default |
Destructor. More... | |
Partition (std::vector< std::shared_ptr< PartitionStep >> steps) | |
Constructor - takes a vector of PartitionSteps to be applied in order. More... | |
virtual void | handleMessage (const std::shared_ptr< SourceInterface > &source) override |
Handles a Source (applies PartitionSteps) and notifies the Observers for every Source in the final result. More... | |
![]() | |
virtual | ~Observer ()=default |
![]() | |
virtual | ~Observable ()=default |
Destructor. More... | |
virtual void | addObserver (std::shared_ptr< Observer< std::shared_ptr< SourceInterface > >> observer) |
Adds an Observer that will be notified when notify Observers is called. More... | |
virtual void | removeObserver (std::shared_ptr< Observer< std::shared_ptr< SourceInterface > >> observer) |
Removes a previously added Observer from the list of Observers to notify. More... | |
Private Attributes | |
std::vector< std::shared_ptr < PartitionStep > > | m_steps |
Additional Inherited Members | |
![]() | |
void | notifyObservers (const std::shared_ptr< SourceInterface > &message) const |
For each Source it receives, applies PartitionSteps and outputs one or more Sources.
The first PartitionStep is applied to the Source that was received. Each subsequent PartitionStep is applied to the Source(s) produced by the previous step. The Sources resulting from the last step are notified to the Observers one by one.
Definition at line 57 of file Partition.h.
|
virtualdefault |
Destructor.
SourceXtractor::Partition::Partition | ( | std::vector< std::shared_ptr< PartitionStep >> | steps | ) |
Constructor - takes a vector of PartitionSteps to be applied in order.
Definition at line 27 of file Partition.cpp.
References std::move().
|
overridevirtual |
Handles a Source (applies PartitionSteps) and notifies the Observers for every Source in the final result.
Implements SourceXtractor::Observer< std::shared_ptr< SourceInterface > >.
Definition at line 31 of file Partition.cpp.
References std::vector< T >::end(), std::vector< T >::insert(), m_steps, std::move(), and SourceXtractor::Observable< std::shared_ptr< SourceInterface > >::notifyObservers().
|
private |
Definition at line 73 of file Partition.h.
Referenced by handleMessage().