SourceXtractorPlusPlus  0.10
Please provide a description of the project.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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_
const PropertyType & getProperty(unsigned int index=0) const
Convenience template method to call getProperty() with a more user-friendly syntax.
virtual void computeProperties(SourceInterface &source) const
Computes one or more properties for the Source.
A Task that acts on a Source to compute one or more properties.
Definition: SourceTask.h:36
virtual ~BlendedFlagTask()=default
The SourceInterface is an abstract &quot;source&quot; that has properties attached to it.