SourceXtractorPlusPlus  0.10
Please provide a description of the project.
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"
28 
29 namespace SourceXtractor {
30 
38 public:
39 
43  virtual ~PartitionStep() = default;
44 
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 
68 
70  virtual void handleMessage(const std::shared_ptr<SourceInterface>& source) override;
71 
72 private:
74 
75 }; /* End of Partition class */
76 
77 } /* namespace SourceXtractor */
78 
79 
80 #endif
STL class.
virtual ~Partition()=default
Destructor.
std::vector< std::shared_ptr< PartitionStep > > m_steps
Definition: Partition.h:73
Partition(std::vector< std::shared_ptr< PartitionStep >> steps)
Constructor - takes a vector of PartitionSteps to be applied in order.
Definition: Partition.cpp:27
Implements the Observer pattern. Notifications will be made using a message of type T.
Definition: Observable.h:51
For each Source it receives, applies PartitionSteps and outputs one or more Sources.
Definition: Partition.h:57
A PartitionStep gets applied on a single Source and can result any number of Sources being outputed....
Definition: Partition.h:37
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
STL class.
virtual std::vector< std::shared_ptr< SourceInterface > > partition(std::shared_ptr< SourceInterface > source) const =0
Observer interface to be used with Observable to implement the Observer pattern.
Definition: Observable.h:38
virtual ~PartitionStep()=default
Destructor.