SourceXtractorPlusPlus
0.15
Please provide a description of the project.
|
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) | |
virtual void | handleMessage (const std::shared_ptr< SourceInterface > &source) override |
Handles a new Source. More... | |
virtual void | handleMessage (const ProcessSourcesEvent &source) override |
Handles a ProcessSourcesEvent to trigger the processing of some of the Sources stored in SourceGrouping. More... | |
std::set< PropertyId > | requiredProperties () const |
Returns the set of required properties to compute the grouping. More... | |
![]() | |
virtual | ~Observer ()=default |
![]() | |
virtual | ~Observer ()=default |
![]() | |
virtual | ~Observable ()=default |
Destructor. More... | |
virtual void | addObserver (std::shared_ptr< Observer< std::shared_ptr< SourceGroupInterface > >> observer) |
Adds an Observer that will be notified when notify Observers is called. More... | |
virtual void | removeObserver (std::shared_ptr< Observer< std::shared_ptr< SourceGroupInterface > >> observer) |
Removes a previously added Observer from the list of Observers to notify. More... | |
Private Attributes | |
std::shared_ptr< GroupingCriteria > | m_grouping_criteria |
std::shared_ptr < SourceGroupFactory > | m_group_factory |
std::list< std::shared_ptr < SourceGroupInterface > > | m_source_groups |
Additional Inherited Members | |
![]() | |
void | notifyObservers (const std::shared_ptr< 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 105 of file SourceGrouping.h.
|
virtualdefault |
Destructor.
SourceXtractor::SourceGrouping::SourceGrouping | ( | std::shared_ptr< GroupingCriteria > | grouping_criteria, |
std::shared_ptr< SourceGroupFactory > | group_factory | ||
) |
Definition at line 28 of file SourceGrouping.cpp.
|
overridevirtual |
Handles a new Source.
Implements SourceXtractor::Observer< std::shared_ptr< SourceInterface > >.
Definition at line 33 of file SourceGrouping.cpp.
References std::list< T >::begin(), std::list< T >::emplace_back(), std::list< T >::end(), std::list< T >::erase(), m_group_factory, m_grouping_criteria, m_source_groups, and s.
|
overridevirtual |
Handles a ProcessSourcesEvent to trigger the processing of some of the Sources stored in SourceGrouping.
Implements SourceXtractor::Observer< ProcessSourcesEvent >.
Definition at line 72 of file SourceGrouping.cpp.
References std::list< T >::begin(), std::list< T >::end(), std::list< T >::erase(), SourceXtractor::ProcessSourcesEvent::m_selection_criteria, m_source_groups, SourceXtractor::Observable< std::shared_ptr< SourceGroupInterface > >::notifyObservers(), and std::vector< T >::push_back().
std::set< PropertyId > SourceXtractor::SourceGrouping::requiredProperties | ( | ) | const |
Returns the set of required properties to compute the grouping.
Definition at line 94 of file SourceGrouping.cpp.
References m_grouping_criteria.
|
private |
Definition at line 129 of file SourceGrouping.h.
Referenced by handleMessage().
|
private |
Definition at line 128 of file SourceGrouping.h.
Referenced by handleMessage(), and requiredProperties().
|
private |
Definition at line 130 of file SourceGrouping.h.
Referenced by handleMessage().