SourceXtractorPlusPlus  0.11
Please provide a description of the project.
SourceIDTaskFactory.h
Go to the documentation of this file.
1 
17 /*
18  * SourceIDTaskFactory.h
19  *
20  * Created on: May 30, 2018
21  * Author: mschefer
22  */
23 
24 #ifndef _SEIMPLEMENTATION_PLUGIN_SOURCEIDS_SOURCEIDTASKFACTORY_H_
25 #define _SEIMPLEMENTATION_PLUGIN_SOURCEIDS_SOURCEIDTASKFACTORY_H_
26 
27 
30 
31 namespace SourceXtractor {
32 
34 public:
36 
38  virtual ~SourceIDTaskFactory() = default;
39 
40  // TaskFactory implementation
41  virtual std::shared_ptr<Task> createTask(const PropertyId& property_id) const override {
42  if (property_id == PropertyId::create<SourceID>()) {
43  return std::make_shared<SourceIDTask>();
44  } else {
45  return nullptr;
46  }
47  }
48 };
49 
50 }
51 
52 #endif /* _SEIMPLEMENTATION_PLUGIN_SOURCEIDS_SOURCEIDTASKFACTORY_H_ */
TaskFactory.h
std::shared_ptr
STL class.
SourceXtractor::TaskFactory
Creates a Task for computing a given property.
Definition: TaskFactory.h:42
SourceXtractor::SourceIDTaskFactory::SourceIDTaskFactory
SourceIDTaskFactory()
Definition: SourceIDTaskFactory.h:35
SourceXtractor::PropertyId
Identifier used to set and retrieve properties.
Definition: PropertyId.h:40
SourceXtractor
Definition: Aperture.h:30
SourceXtractor::SourceIDTaskFactory::~SourceIDTaskFactory
virtual ~SourceIDTaskFactory()=default
Destructor.
SourceXtractor::SourceIDTaskFactory::createTask
virtual std::shared_ptr< Task > createTask(const PropertyId &property_id) const override
Returns a Task producing a Property corresponding to the given PropertyId.
Definition: SourceIDTaskFactory.h:41
SourceIDTask.h
SourceXtractor::SourceIDTaskFactory
Definition: SourceIDTaskFactory.h:33