|
SourceXtractorPlusPlus
0.19
SourceXtractor++, the next generation SExtractor
|
SourceGrouping takes Source, groups them together according to its GroupingCriteria and stores them. When a ProcessSourcesEvent is received the sources that need to be processed are output together with the sources they are grouped with as a SourceGroup. More...
#include <SourceGrouping.h>


Public Member Functions | |
| virtual | ~SourceGrouping ()=default |
| Destructor. More... | |
| SourceGrouping (std::shared_ptr< GroupingCriteria > grouping_criteria, std::shared_ptr< SourceGroupFactory > group_factory, unsigned int hard_limit) | |
| std::set< PropertyId > | requiredProperties () const |
| Returns the set of required properties to compute the grouping. More... | |
| void | receiveSource (std::unique_ptr< SourceInterface > source) override |
| Handles a new Source. More... | |
| void | receiveProcessSignal (const ProcessSourcesEvent &event) override |
| Handles a ProcessSourcesEvent to trigger the processing of some of the Sources stored in SourceGrouping. More... | |
Public Member Functions inherited from SourceXtractor::PipelineEmitter< SourceGroupInterface > | |
| ~PipelineEmitter () override=default | |
| void | setNextStage (std::shared_ptr< PipelineReceiver< SourceGroupInterface >> next) |
Public Member Functions inherited from SourceXtractor::Observable< SourceGroupInterface > | |
| virtual | ~Observable ()=default |
| Destructor. More... | |
| virtual void | addObserver (std::shared_ptr< Observer< SourceGroupInterface >> observer) |
| Adds an Observer that will be notified when notify Observers is called. More... | |
| virtual void | removeObserver (std::shared_ptr< Observer< SourceGroupInterface >> observer) |
| Removes a previously added Observer from the list of Observers to notify. More... | |
Public Member Functions inherited from SourceXtractor::PipelineReceiver< SourceInterface > | |
| virtual | ~PipelineReceiver ()=default |
Private Attributes | |
| std::shared_ptr< GroupingCriteria > | m_grouping_criteria |
| std::shared_ptr < SourceGroupFactory > | m_group_factory |
| std::list< std::unique_ptr < SourceGroupInterface > > | m_source_groups |
| unsigned int | m_hard_limit |
Additional Inherited Members | |
Protected Member Functions inherited from SourceXtractor::PipelineEmitter< SourceGroupInterface > | |
| void | sendSource (std::unique_ptr< SourceGroupInterface > source) const |
| void | sendProcessSignal (const ProcessSourcesEvent &event) const |
Protected Member Functions inherited from SourceXtractor::Observable< SourceGroupInterface > | |
| void | notifyObservers (const SourceGroupInterface &message) const |
SourceGrouping takes Source, groups them together according to its GroupingCriteria and stores them. When a ProcessSourcesEvent is received the sources that need to be processed are output together with the sources they are grouped with as a SourceGroup.
Definition at line 90 of file SourceGrouping.h.
|
virtualdefault |
Destructor.
| SourceXtractor::SourceGrouping::SourceGrouping | ( | std::shared_ptr< GroupingCriteria > | grouping_criteria, |
| std::shared_ptr< SourceGroupFactory > | group_factory, | ||
| unsigned int | hard_limit | ||
| ) |
Definition at line 28 of file SourceGrouping.cpp.
|
overridevirtual |
Handles a ProcessSourcesEvent to trigger the processing of some of the Sources stored in SourceGrouping.
Implements SourceXtractor::PipelineReceiver< SourceInterface >.
Definition at line 86 of file SourceGrouping.cpp.
References SourceXtractor::ProcessSourcesEvent::m_selection_criteria, m_source_groups, std::move(), std::vector< T >::push_back(), and SourceXtractor::PipelineEmitter< SourceGroupInterface >::sendSource().

|
overridevirtual |
Handles a new Source.
Implements SourceXtractor::PipelineReceiver< SourceInterface >.
Definition at line 34 of file SourceGrouping.cpp.
References SourceXtractor::SourceGroupInterface::addSource(), std::unique_ptr< T >::get(), m_group_factory, m_grouping_criteria, m_hard_limit, m_source_groups, SourceXtractor::SourceGroupInterface::merge(), std::move(), s, and SourceXtractor::SourceGroupInterface::size().

| std::set< PropertyId > SourceXtractor::SourceGrouping::requiredProperties | ( | ) | const |
Returns the set of required properties to compute the grouping.
Definition at line 108 of file SourceGrouping.cpp.
References m_grouping_criteria.
|
private |
Definition at line 113 of file SourceGrouping.h.
Referenced by receiveSource().
|
private |
Definition at line 112 of file SourceGrouping.h.
Referenced by receiveSource(), and requiredProperties().
|
private |
Definition at line 115 of file SourceGrouping.h.
Referenced by receiveSource().
|
private |
Definition at line 114 of file SourceGrouping.h.
Referenced by receiveProcessSignal(), and receiveSource().
1.8.5