SourceXtractorPlusPlus  0.10
Please provide a description of the project.
BlendedFlagTask.h
Go to the documentation of this file.
1 
17 /*
18  * BlendedFlagTask.h
19  *
20  * Created on: Oct 29, 2018
21  * Author: Alejandro Alvarez Ayllon
22  */
23 
24 #ifndef _SEIMPLEMENTATION_PLUGIN_BLENDEDFLAGTASK_H_
25 #define _SEIMPLEMENTATION_PLUGIN_BLENDEDFLAGTASK_H_
26 
27 
30 #include "BlendedFlag.h"
31 
32 namespace SourceXtractor {
33 
34 class BlendedFlagTask : public SourceTask {
35 public:
36  virtual ~BlendedFlagTask() = default;
37 
38  virtual void computeProperties(SourceInterface &source) const {
39  const auto& detection_src_id = source.getProperty<SourceId>();
40  source.setProperty<BlendedFlag>(detection_src_id.getDetectionId() != detection_src_id.getSourceId());
41  };
42 };
43 
44 } // end SourceXtractor
45 
46 #endif // _SEIMPLEMENTATION_PLUGIN_BLENDEDFLAGTASK_H_
SourceXtractor::BlendedFlag
Definition: BlendedFlag.h:31
SourceId.h
SourceXtractor::BlendedFlagTask::computeProperties
virtual void computeProperties(SourceInterface &source) const
Computes one or more properties for the Source.
Definition: BlendedFlagTask.h:38
SourceXtractor::SourceId
Definition: SourceId.h:31
SourceXtractor
Definition: Aperture.h:30
SourceXtractor::SourceTask
A Task that acts on a Source to compute one or more properties.
Definition: SourceTask.h:36
SourceXtractor::BlendedFlagTask::~BlendedFlagTask
virtual ~BlendedFlagTask()=default
SourceXtractor::SourceInterface::getProperty
const PropertyType & getProperty(unsigned int index=0) const
Convenience template method to call getProperty() with a more user-friendly syntax.
Definition: SourceInterface.h:57
BlendedFlag.h
SourceXtractor::SourceInterface
The SourceInterface is an abstract "source" that has properties attached to it.
Definition: SourceInterface.h:46
SourceTask.h
SourceXtractor::SourceInterface::setProperty
void setProperty(Args... args)
Definition: SourceInterface.h:72
SourceXtractor::BlendedFlagTask
Definition: BlendedFlagTask.h:34