SourceXtractorPlusPlus
0.12
Please provide a description of the project.
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
SEImplementation
src
lib
Plugin
MeasurementFrame
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
27
#include "
SEImplementation/Configuration/MeasurementFrameConfig.h
"
28
29
#include "
SEImplementation/Plugin/MeasurementFrame/MeasurementFrame.h
"
30
#include "
SEImplementation/Plugin/MeasurementFrame/MeasurementFrameTask.h
"
31
#include "
SEImplementation/Plugin/MeasurementFrame/MeasurementFrameTaskFactory.h
"
32
33
namespace
SourceXtractor {
34
35
std::shared_ptr<Task>
MeasurementFrameTaskFactory::createTask
(
const
PropertyId
& property_id)
const
{
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
46
void
MeasurementFrameTaskFactory::reportConfigDependencies
(
Euclid::Configuration::ConfigManager
& manager)
const
{
47
manager.
registerConfiguration
<
MeasurementFrameConfig
>();
48
}
49
50
void
MeasurementFrameTaskFactory::configure
(
Euclid::Configuration::ConfigManager
& manager) {
51
m_measurement_frames
= manager.
getConfiguration
<
MeasurementFrameConfig
>().getFrames();
52
}
53
54
}
std::out_of_range
STL class.
std::shared_ptr
SourceXtractor::MeasurementFrameTaskFactory::reportConfigDependencies
void reportConfigDependencies(Euclid::Configuration::ConfigManager &manager) const override
Registers all the Configuration dependencies.
Definition:
MeasurementFrameTaskFactory.cpp:46
Euclid::Configuration::ConfigManager::registerConfiguration
void registerConfiguration()
SourceXtractor::PropertyId::getIndex
unsigned int getIndex() const
Definition:
PropertyId.h:70
Euclid::Configuration::ConfigManager
MeasurementFrame.h
Euclid::Configuration::ConfigManager::getConfiguration
T & getConfiguration()
MeasurementFrameTaskFactory.h
MeasurementFrameConfig.h
SourceXtractor::PropertyId
Identifier used to set and retrieve properties.
Definition:
PropertyId.h:40
SourceXtractor::PropertyId::getTypeId
std::type_index getTypeId() const
Definition:
PropertyId.h:66
SourceXtractor::MeasurementFrameTaskFactory::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:
MeasurementFrameTaskFactory.cpp:35
MeasurementFrameTask.h
SourceXtractor::MeasurementFrameTaskFactory::m_measurement_frames
std::map< int, std::shared_ptr< MeasurementImageFrame > > m_measurement_frames
Definition:
MeasurementFrameTaskFactory.h:47
SourceXtractor::MeasurementFrameConfig
Definition:
MeasurementFrameConfig.h:30
SourceXtractor::MeasurementFrameTaskFactory::configure
void configure(Euclid::Configuration::ConfigManager &manager) override
Method which should initialize the object.
Definition:
MeasurementFrameTaskFactory.cpp:50
Generated by
1.8.5