SourceXtractorPlusPlus 1.0.3
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
SourceXtractor::SourceGrouping Class Reference

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>

Inheritance diagram for SourceXtractor::SourceGrouping:
Collaboration diagram for SourceXtractor::SourceGrouping:

Public Member Functions

virtual ~SourceGrouping ()=default
 Destructor.
 SourceGrouping (std::shared_ptr< GroupingCriteria > grouping_criteria, std::shared_ptr< SourceGroupFactory > group_factory, unsigned int hard_limit)
std::set< PropertyIdrequiredProperties () const override
 Returns the set of required properties to compute the grouping.
void receiveSource (std::unique_ptr< SourceInterface > source) override
 Handles a new Source.
void receiveProcessSignal (const ProcessSourcesEvent &event) override
 Handles a ProcessSourcesEvent to trigger the processing of some of the Sources stored in SourceGrouping.
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.
virtual void addObserver (std::shared_ptr< Observer< SourceGroupInterface > > observer)
 Adds an Observer that will be notified when notify Observers is called.
virtual void removeObserver (std::shared_ptr< Observer< SourceGroupInterface > > observer)
 Removes a previously added Observer from the list of Observers to notify.
Public Member Functions inherited from SourceXtractor::PipelineReceiver< SourceInterface >
virtual ~PipelineReceiver ()=default

Private Attributes

std::shared_ptr< GroupingCriteriam_grouping_criteria
std::shared_ptr< SourceGroupFactorym_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

Detailed Description

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 98 of file SourceGrouping.h.

Constructor & Destructor Documentation

◆ ~SourceGrouping()

virtual SourceXtractor::SourceGrouping::~SourceGrouping ( )
virtualdefault

Destructor.

◆ SourceGrouping()

SourceXtractor::SourceGrouping::SourceGrouping ( std::shared_ptr< GroupingCriteria > grouping_criteria,
std::shared_ptr< SourceGroupFactory > group_factory,
unsigned int hard_limit )

Definition at line 29 of file SourceGrouping.cpp.

References m_group_factory, m_grouping_criteria, and m_hard_limit.

Member Function Documentation

◆ receiveProcessSignal()

void SourceXtractor::SourceGrouping::receiveProcessSignal ( const ProcessSourcesEvent & event)
overridevirtual

◆ receiveSource()

◆ requiredProperties()

std::set< PropertyId > SourceXtractor::SourceGrouping::requiredProperties ( ) const
overridevirtual

Returns the set of required properties to compute the grouping.

Implements SourceXtractor::SourceGroupingInterface.

Definition at line 109 of file SourceGrouping.cpp.

References m_grouping_criteria.

Member Data Documentation

◆ m_group_factory

std::shared_ptr<SourceGroupFactory> SourceXtractor::SourceGrouping::m_group_factory
private

Definition at line 121 of file SourceGrouping.h.

Referenced by receiveSource(), and SourceGrouping().

◆ m_grouping_criteria

std::shared_ptr<GroupingCriteria> SourceXtractor::SourceGrouping::m_grouping_criteria
private

Definition at line 120 of file SourceGrouping.h.

Referenced by receiveSource(), requiredProperties(), and SourceGrouping().

◆ m_hard_limit

unsigned int SourceXtractor::SourceGrouping::m_hard_limit
private

Definition at line 123 of file SourceGrouping.h.

Referenced by receiveSource(), and SourceGrouping().

◆ m_source_groups

std::list<std::unique_ptr<SourceGroupInterface> > SourceXtractor::SourceGrouping::m_source_groups
private

Definition at line 122 of file SourceGrouping.h.

Referenced by receiveProcessSignal(), and receiveSource().


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