SourceXtractorPlusPlus  0.8
Please provide a description of the project.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
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:
[legend]
Collaboration diagram for SourceXtractor::SourceGrouping:
[legend]

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
 
- Public Member Functions inherited from SourceXtractor::Observer< std::shared_ptr< SourceInterface > >
virtual ~Observer ()=default
 
- Public Member Functions inherited from SourceXtractor::Observer< ProcessSourcesEvent >
virtual ~Observer ()=default
 
- Public Member Functions inherited from SourceXtractor::Observable< std::shared_ptr< SourceGroupInterface > >
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< GroupingCriteriam_grouping_criteria
 
std::shared_ptr
< SourceGroupFactory
m_group_factory
 
std::list< std::shared_ptr
< SourceGroupInterface > > 
m_source_groups
 

Additional Inherited Members

- Protected Member Functions inherited from SourceXtractor::Observable< std::shared_ptr< SourceGroupInterface > >
void notifyObservers (const std::shared_ptr< 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 101 of file SourceGrouping.h.

Constructor & Destructor Documentation

virtual SourceXtractor::SourceGrouping::~SourceGrouping ( )
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.

Member Function Documentation

void SourceXtractor::SourceGrouping::handleMessage ( const std::shared_ptr< SourceInterface > &  source)
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.

Here is the call graph for this function:

void SourceXtractor::SourceGrouping::handleMessage ( const ProcessSourcesEvent source)
overridevirtual

Member Data Documentation

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

Definition at line 122 of file SourceGrouping.h.

Referenced by handleMessage().

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

Definition at line 121 of file SourceGrouping.h.

Referenced by handleMessage().

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

Definition at line 123 of file SourceGrouping.h.

Referenced by handleMessage().


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