SourceXtractorPlusPlus
0.11
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
SEImplementation
Plugin
SourceFlags
SourceFlagsPlugin.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
39
#ifndef _SEIMPLEMENTATION_PLUGIN_SOURCEFLAGSPLUGIN_H_
40
#define _SEIMPLEMENTATION_PLUGIN_SOURCEFLAGSPLUGIN_H_
41
42
#include "
SourceFlags.h
"
43
#include "
SEFramework/Plugin/Plugin.h
"
44
#include "
SEImplementation/Plugin/SourceFlags/SourceFlagsTaskFactory.h
"
45
46
#include <vector>
47
48
namespace
SourceXtractor {
49
50
class
SourceFlagsPlugin
:
public
Plugin
{
51
public
:
52
virtual
~SourceFlagsPlugin
() =
default
;
53
54
virtual
void
registerPlugin
(
PluginAPI
&plugin_api) {
55
plugin_api.
getTaskFactoryRegistry
().
registerTaskFactory
<
SourceFlagsTaskFactory
,
SourceFlags
>();
56
plugin_api.
getOutputRegistry
().
registerColumnConverter
<
SourceFlags
,
std::vector<int64_t>
>(
57
"source_flags"
,
58
[](
const
SourceFlags
&prop) {
59
return
flags2long
(prop.getSourceFlags());
60
},
61
""
,
62
"The source flags"
63
);
64
plugin_api.
getOutputRegistry
().
enableOutput
<
SourceFlags
>(
"SourceFlags"
);
65
}
66
67
virtual
std::string
getIdString
()
const
{
68
return
"source_flags"
;
69
}
70
71
private
:
72
};
// end of SourceFlagsPlugin class
73
74
}
// namespace SourceXtractor
75
#endif
/* _SEIMPLEMENTATION_PLUGIN_SOURCEFLAGSPLUGIN_H_ */
SourceXtractor::flags2long
constexpr int64_t flags2long(const Flags &a)
Definition:
SourceFlags.h:67
SourceXtractor::SourceFlagsTaskFactory
Definition:
SourceFlagsTaskFactory.h:46
SourceXtractor::PluginAPI::getOutputRegistry
virtual OutputRegistry & getOutputRegistry() const =0
Plugin.h
SourceXtractor::TaskFactoryRegistry::registerTaskFactory
void registerTaskFactory()
Definition:
TaskFactoryRegistry.h:51
SourceFlags.h
SourceXtractor::SourceFlagsPlugin::registerPlugin
virtual void registerPlugin(PluginAPI &plugin_api)
Definition:
SourceFlagsPlugin.h:54
std::string
STL class.
SourceFlagsTaskFactory.h
SourceXtractor::SourceFlagsPlugin::getIdString
virtual std::string getIdString() const
Definition:
SourceFlagsPlugin.h:67
SourceXtractor::PluginAPI
This interface is given to the plugin to let it access object instances from the framework.
Definition:
PluginAPI.h:39
SourceXtractor::SourceFlags
Definition:
SourceFlags.h:48
std::vector
STL class.
SourceXtractor::Plugin
Plugins must implement this interface.
Definition:
Plugin.h:38
SourceXtractor::OutputRegistry::enableOutput
void enableOutput(std::string alias_name)
Definition:
OutputRegistry.h:128
SourceXtractor::PluginAPI::getTaskFactoryRegistry
virtual TaskFactoryRegistry & getTaskFactoryRegistry() const =0
SourceXtractor::SourceFlagsPlugin
Definition:
SourceFlagsPlugin.h:50
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::SourceFlagsPlugin::~SourceFlagsPlugin
virtual ~SourceFlagsPlugin()=default
Generated by
1.8.5