SourceXtractorPlusPlus  0.12
Please provide a description of the project.
MeasurementFrameTaskFactory.cpp
Go to the documentation of this file.
1 
17 /*
18  * MeasurementFrameTaskFactory.cpp
19  *
20  * Created on: Nov 3, 2016
21  * Author: mschefer
22  */
23 
24 //#include <iostream>
25 //#include <sstream>
26 
28 
32 
33 namespace SourceXtractor {
34 
36  if (property_id.getTypeId() == PropertyId::create<MeasurementFrame>().getTypeId()) {
37  auto instance = property_id.getIndex();
38 
39  try {
40  return std::make_shared<MeasurementFrameTask>(instance, m_measurement_frames.at(instance));
41  } catch (const std::out_of_range&) {}
42  }
43  return nullptr;
44 }
45 
48 }
49 
52 }
53 
54 }
unsigned int getIndex() const
Definition: PropertyId.h:70
void reportConfigDependencies(Euclid::Configuration::ConfigManager &manager) const override
Registers all the Configuration dependencies.
Identifier used to set and retrieve properties.
Definition: PropertyId.h:40
virtual std::shared_ptr< Task > createTask(const PropertyId &property_id) const override
Returns a Task producing a Property corresponding to the given PropertyId.
std::type_index getTypeId() const
Definition: PropertyId.h:66
std::map< int, std::shared_ptr< MeasurementImageFrame > > m_measurement_frames
void configure(Euclid::Configuration::ConfigManager &manager) override
Method which should initialize the object.