SourceXtractorPlusPlus
0.13
Please provide a description of the project.
SEImplementation
SEImplementation
Plugin
SourceIDs
SourceIDsPlugin.h
Go to the documentation of this file.
1
17
/*
18
* Copyright (C) 2012-2020 Euclid Science Ground Segment
19
*
20
* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General
21
* Public License as published by the Free Software Foundation; either version 3.0 of the License, or (at your option)
22
* any later version.
23
*
24
* This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
25
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
26
* details.
27
*
28
* You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to
29
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
30
*/
31
32
/*
33
* SourceIDsPlugin.h
34
*
35
* Created on: Apr 27, 2018
36
* Author: mkuemmel@usm.lmu.de
37
*/
38
39
#ifndef __SEIMPLEMENTATION_PLUGIN_SOURCEIDS_SOURCEIDSPLUGIN_H_
40
#define __SEIMPLEMENTATION_PLUGIN_SOURCEIDS_SOURCEIDSPLUGIN_H_
41
42
#include "
SEImplementation/Property/SourceId.h
"
43
#include "
SEFramework/Plugin/Plugin.h
"
44
45
namespace
SourceXtractor
{
46
class
SourceIDsPlugin
:
public
Plugin
{
47
public
:
48
52
virtual
~SourceIDsPlugin
() =
default
;
53
54
virtual
void
registerPlugin
(
PluginAPI
& plugin_api) {
55
plugin_api.
getTaskFactoryRegistry
().
registerTaskFactory
<
SourceIDTaskFactory
,
SourceID
>();
56
57
//TODO: "unsigned int" seems not to work as column
58
plugin_api.
getOutputRegistry
().
registerColumnConverter
<
SourceID
,
int
>(
59
"source_id"
,
60
[](
const
SourceID
& prop){
61
return
prop.getId();
62
},
63
""
,
64
"Running object number"
65
);
66
plugin_api.
getOutputRegistry
().
registerColumnConverter
<
SourceID
,
int
>(
67
"detection_id"
,
68
[](
const
SourceID
& prop){
69
return
prop.getDetectionId();
70
},
71
""
,
72
"Running detection number"
73
);
74
plugin_api.
getOutputRegistry
().
enableOutput
<
SourceID
>(
"SourceIDs"
);
75
}
76
77
virtual
std::string
getIdString
()
const
{
78
return
"source_IDs_plugin"
;
79
}
80
private
:
81
};
82
}
/* namespace SourceXtractor */
83
#endif
/* __SEIMPLEMENTATION_PLUGIN_SOURCEIDS_SOURCEIDSPLUGIN_H_ */
SourceXtractor::Plugin
Plugins must implement this interface.
Definition:
Plugin.h:38
std::string
STL class.
SourceId.h
SourceXtractor::SourceIDsPlugin::getIdString
virtual std::string getIdString() const
Definition:
SourceIDsPlugin.h:77
SourceXtractor::SourceIDsPlugin::registerPlugin
virtual void registerPlugin(PluginAPI &plugin_api)
Definition:
SourceIDsPlugin.h:54
SourceXtractor::SourceID
Definition:
SourceID.h:33
Plugin.h
SourceXtractor
Definition:
Aperture.h:30
SourceXtractor::PluginAPI
This interface is given to the plugin to let it access object instances from the framework.
Definition:
PluginAPI.h:39
SourceXtractor::SourceIDsPlugin
Definition:
SourceIDsPlugin.h:46
SourceXtractor::TaskFactoryRegistry::registerTaskFactory
void registerTaskFactory()
Definition:
TaskFactoryRegistry.h:51
SourceXtractor::PluginAPI::getOutputRegistry
virtual OutputRegistry & getOutputRegistry() const =0
SourceXtractor::PluginAPI::getTaskFactoryRegistry
virtual TaskFactoryRegistry & getTaskFactoryRegistry() const =0
SourceXtractor::SourceIDTaskFactory
Definition:
SourceIDTaskFactory.h:33
SourceXtractor::OutputRegistry::enableOutput
void enableOutput(std::string alias_name, bool configurable_output=false)
Definition:
OutputRegistry.h:141
SourceXtractor::OutputRegistry::registerColumnConverter
void registerColumnConverter(std::string column_name, ColumnConverter< PropertyType, OutType > converter, std::string column_unit="", std::string column_description="")
Definition:
OutputRegistry.h:46
SourceXtractor::SourceIDsPlugin::~SourceIDsPlugin
virtual ~SourceIDsPlugin()=default
Destructor.
Generated by
1.8.20