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

#include <MoffatGrouping.h>

Inheritance diagram for SourceXtractor::MoffatGrouping:
Collaboration diagram for SourceXtractor::MoffatGrouping:

Classes

struct  SourceInfo
 

Public Types

using Group = std::vector<std::shared_ptr<SourceInfo>>
 

Public Member Functions

 MoffatGrouping (std::shared_ptr< GroupingCriteria > grouping_criteria, std::shared_ptr< SourceGroupFactory > group_factory, unsigned int hard_limit, float max_range)
 
virtual ~MoffatGrouping ()=default
 
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 Member Functions

void processGroup (unsigned int group_id)
 

Private Attributes

std::shared_ptr< GroupingCriteriam_grouping_criteria
 
std::shared_ptr< SourceGroupFactorym_group_factory
 
unsigned int m_hard_limit
 
float m_max_range
 
size_t m_group_counter
 
std::map< unsigned int, std::shared_ptr< Group > > m_groups
 
QuadTree< std::shared_ptr< SourceInfo > > m_tree
 

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

Definition at line 30 of file MoffatGrouping.h.

Member Typedef Documentation

◆ Group

Constructor & Destructor Documentation

◆ MoffatGrouping()

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

◆ ~MoffatGrouping()

virtual SourceXtractor::MoffatGrouping::~MoffatGrouping ( )
virtualdefault

Member Function Documentation

◆ processGroup()

void SourceXtractor::MoffatGrouping::processGroup ( unsigned int group_id)
private

Definition at line 128 of file MoffatGrouping.cpp.

References m_group_factory, m_groups, m_tree, std::move(), and SourceXtractor::PipelineEmitter< SourceGroupInterface >::sendSource().

Referenced by receiveProcessSignal(), and receiveSource().

Here is the call graph for this function:

◆ receiveProcessSignal()

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

Handles a ProcessSourcesEvent to trigger the processing of some of the Sources stored in SourceGrouping.

Implements SourceXtractor::PipelineReceiver< SourceInterface >.

Definition at line 108 of file MoffatGrouping.cpp.

References m_groups, SourceXtractor::ProcessSourcesEvent::m_selection_criteria, processGroup(), and std::vector< T >::push_back().

Here is the call graph for this function:

◆ receiveSource()

◆ requiredProperties()

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

Returns the set of required properties to compute the grouping.

Implements SourceXtractor::SourceGroupingInterface.

Definition at line 51 of file MoffatGrouping.cpp.

References SourceXtractor::PropertyId::create().

Here is the call graph for this function:

Member Data Documentation

◆ m_group_counter

size_t SourceXtractor::MoffatGrouping::m_group_counter
private

Definition at line 60 of file MoffatGrouping.h.

Referenced by MoffatGrouping(), and receiveSource().

◆ m_group_factory

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

Definition at line 56 of file MoffatGrouping.h.

Referenced by MoffatGrouping(), and processGroup().

◆ m_grouping_criteria

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

Definition at line 55 of file MoffatGrouping.h.

Referenced by MoffatGrouping(), and receiveSource().

◆ m_groups

std::map<unsigned int, std::shared_ptr<Group> > SourceXtractor::MoffatGrouping::m_groups
private

Definition at line 61 of file MoffatGrouping.h.

Referenced by processGroup(), receiveProcessSignal(), and receiveSource().

◆ m_hard_limit

unsigned int SourceXtractor::MoffatGrouping::m_hard_limit
private

Definition at line 57 of file MoffatGrouping.h.

Referenced by MoffatGrouping(), and receiveSource().

◆ m_max_range

float SourceXtractor::MoffatGrouping::m_max_range
private

Definition at line 58 of file MoffatGrouping.h.

Referenced by MoffatGrouping(), and receiveSource().

◆ m_tree

QuadTree<std::shared_ptr<SourceInfo> > SourceXtractor::MoffatGrouping::m_tree
private

Definition at line 62 of file MoffatGrouping.h.

Referenced by processGroup(), and receiveSource().


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