SourceXtractorPlusPlus
0.12
Please provide a description of the project.
SEFramework
SEFramework
Pipeline
Partition.h
Go to the documentation of this file.
1
23
#ifndef _SEFRAMEWORK_PIPELINE_PARTITION_H
24
#define _SEFRAMEWORK_PIPELINE_PARTITION_H
25
26
#include "
SEUtils/Observable.h
"
27
#include "
SEFramework/Source/SourceInterface.h
"
28
29
namespace
SourceXtractor
{
30
37
class
PartitionStep
{
38
public
:
39
43
virtual
~PartitionStep
() =
default
;
44
45
virtual
std::vector<std::shared_ptr<SourceInterface>
>
partition
(
std::shared_ptr<SourceInterface>
source)
const
= 0;
46
};
47
57
class
Partition
:
public
Observer
<std::shared_ptr<SourceInterface>>,
public
Observable
<std::shared_ptr<SourceInterface>> {
58
59
public
:
60
64
virtual
~Partition
() =
default
;
65
67
Partition
(
std::vector
<
std::shared_ptr<PartitionStep>
> steps);
68
70
virtual
void
handleMessage
(
const
std::shared_ptr<SourceInterface>
& source)
override
;
71
72
private
:
73
std::vector<std::shared_ptr<PartitionStep>
>
m_steps
;
74
75
};
/* End of Partition class */
76
77
}
/* namespace SourceXtractor */
78
79
80
#endif
std::shared_ptr
SourceXtractor::Partition::~Partition
virtual ~Partition()=default
Destructor.
Observable.h
SourceXtractor::Partition::m_steps
std::vector< std::shared_ptr< PartitionStep > > m_steps
Definition:
Partition.h:73
SourceXtractor::Partition::Partition
Partition(std::vector< std::shared_ptr< PartitionStep >> steps)
Constructor - takes a vector of PartitionSteps to be applied in order.
Definition:
Partition.cpp:27
SourceXtractor::Observable
Implements the Observer pattern. Notifications will be made using a message of type T...
Definition:
Observable.h:51
SourceXtractor::Partition
For each Source it receives, applies PartitionSteps and outputs one or more Sources.
Definition:
Partition.h:57
SourceXtractor::PartitionStep
A PartitionStep gets applied on a single Source and can result any number of Sources being outputed...
Definition:
Partition.h:37
SourceXtractor
Definition:
Aperture.h:30
SourceXtractor::Partition::handleMessage
virtual void handleMessage(const std::shared_ptr< SourceInterface > &source) override
Handles a Source (applies PartitionSteps) and notifies the Observers for every Source in the final re...
Definition:
Partition.cpp:31
SourceInterface.h
std::vector
STL class.
SourceXtractor::PartitionStep::partition
virtual std::vector< std::shared_ptr< SourceInterface > > partition(std::shared_ptr< SourceInterface > source) const =0
SourceXtractor::Observer
Observer interface to be used with Observable to implement the Observer pattern.
Definition:
Observable.h:38
SourceXtractor::PartitionStep::~PartitionStep
virtual ~PartitionStep()=default
Destructor.
Generated by
1.8.14