-
Notifications
You must be signed in to change notification settings - Fork 0
/
score_addon_onnx.cpp
45 lines (36 loc) · 1.27 KB
/
score_addon_onnx.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#include "score_addon_onnx.hpp"
#include <score/plugins/FactorySetup.hpp>
#include <QFileInfo>
#include <Onnx/CommandFactory.hpp>
#include <Onnx/Executor.hpp>
#include <Onnx/Library.hpp>
#include <Onnx/Process.hpp>
#include <score_addon_onnx_commands_files.hpp>
score_addon_onnx::score_addon_onnx() { }
score_addon_onnx::~score_addon_onnx() { }
std::vector<score::InterfaceBase*>
score_addon_onnx::factories(
const score::ApplicationContext& ctx,
const score::InterfaceKey& key) const
{
return instantiate_factories<
score::ApplicationContext,
FW<Process::ProcessModelFactory, Onnx::ProcessFactory>,
FW<Library::LibraryInterface, Onnx::LibraryHandler>,
FW<Process::ProcessDropHandler, Onnx::DropHandler>,
FW<Execution::ProcessComponentFactory,
Onnx::ProcessExecutorComponentFactory>>(ctx, key);
}
std::pair<const CommandGroupKey, CommandGeneratorMap>
score_addon_onnx::make_commands()
{
using namespace Onnx;
std::pair<const CommandGroupKey, CommandGeneratorMap> cmds{
CommandFactoryName(), CommandGeneratorMap{}};
ossia::for_each_type<
#include <score_addon_onnx_commands.hpp>
>(score::commands::FactoryInserter{cmds.second});
return cmds;
}
#include <score/plugins/PluginInstances.hpp>
SCORE_EXPORT_PLUGIN(score_addon_onnx)