SourceXtractorPlusPlus
1.0.3
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
SEImplementation
src
lib
Plugin
Onnx
OnnxPlugin.cpp
Go to the documentation of this file.
1
17
18
#include "
SEImplementation/Plugin/Onnx/OnnxPlugin.h
"
19
#include "
SEFramework/Plugin/StaticPlugin.h
"
20
#include "
SEImplementation/Plugin/Onnx/OnnxProperty.h
"
21
#include "
SEImplementation/Plugin/Onnx/OnnxTaskFactory.h
"
22
23
namespace
SourceXtractor
{
24
25
static
StaticPlugin<OnnxPlugin>
onnx_plugin
;
26
Elements::Logging
onnx_logger
=
Elements::Logging::getLogger
(
"MLMeasurement"
);
27
28
std::string
OnnxPlugin::getIdString
()
const
{
29
return
"MLMeasurementPlugin"
;
30
}
31
32
void
OnnxPlugin::registerPlugin
(
PluginAPI
& plugin_api) {
33
plugin_api.
getTaskFactoryRegistry
().
registerTaskFactory
<
OnnxTaskFactory
,
OnnxProperty
>();
34
// Note that we do not now the output yet, so we do not register any columns
35
36
plugin_api.
getOutputRegistry
().
registerColumnConverter
<
OnnxProperty
,
int
>(
37
"ml_measurment_flags"
,
38
[](
const
OnnxProperty
&) {
39
return
0;
// Dummy property for now to avoid crash
40
},
41
""
,
42
"flags"
43
);
44
plugin_api.
getOutputRegistry
().
enableOutput
<
OnnxProperty
>(
"MLMeasurement"
,
true
);
45
}
46
47
}
// end of namespace SourceXtractor
OnnxPlugin.h
OnnxProperty.h
OnnxTaskFactory.h
StaticPlugin.h
std::string
Elements::Logging
Elements::Logging::getLogger
static Logging getLogger(const std::string &name="")
SourceXtractor::OnnxPlugin::registerPlugin
void registerPlugin(PluginAPI &plugin_api) override
Definition
OnnxPlugin.cpp:32
SourceXtractor::OnnxPlugin::getIdString
std::string getIdString() const override
Definition
OnnxPlugin.cpp:28
SourceXtractor::OnnxProperty
Definition
OnnxProperty.h:30
SourceXtractor::OnnxTaskFactory
Definition
OnnxTaskFactory.h:30
SourceXtractor::OutputRegistry::registerColumnConverter
void registerColumnConverter(std::string column_name, ColumnConverter< PropertyType, OutType > converter, std::string column_unit="", std::string column_description="")
Definition
OutputRegistry.h:47
SourceXtractor::OutputRegistry::enableOutput
void enableOutput(std::string alias_name, bool configurable_output=false)
Definition
OutputRegistry.h:142
SourceXtractor::PluginAPI
This interface is given to the plugin to let it access object instances from the framework.
Definition
PluginAPI.h:40
SourceXtractor::PluginAPI::getOutputRegistry
virtual OutputRegistry & getOutputRegistry() const =0
SourceXtractor::PluginAPI::getTaskFactoryRegistry
virtual TaskFactoryRegistry & getTaskFactoryRegistry() const =0
SourceXtractor::StaticPlugin
Used to register compile-time (static) plugins with the PluginManager.
Definition
StaticPlugin.h:38
SourceXtractor::TaskFactoryRegistry::registerTaskFactory
void registerTaskFactory()
Definition
TaskFactoryRegistry.h:51
SourceXtractor
Definition
Aperture.h:30
SourceXtractor::onnx_logger
Elements::Logging onnx_logger
Logger for the ONNX plugin.
Definition
OnnxPlugin.cpp:26
SourceXtractor::onnx_plugin
static StaticPlugin< OnnxPlugin > onnx_plugin
Definition
OnnxPlugin.cpp:25
Generated by
1.14.0