Loading...
Searching...
No Matches
score-lib-process/Process/ProcessMetadata.hpp
1#pragma once
2#include <Process/Dataflow/PortType.hpp>
3#include <Process/ProcessFlags.hpp>
4
5#include <score/plugins/SerializableInterface.hpp>
7#include <score/tools/Metadata.hpp>
8#include <score/tools/std/Optional.hpp>
9
10#include <QStringList>
11#include <QUrl>
12
13#include <cinttypes>
14
15namespace Process
16{
17SCORE_LIB_PROCESS_EXPORT
18const QIcon& getCategoryIcon(const QString& category) noexcept;
19enum ProcessCategory : uint64_t
20{
21 Other,
23 Generator, // lfo, etc
24 MediaSource, // sound, video, image, etc
25 Analyzer,
26 AudioEffect, // audio in and audio out
27 MidiEffect, // midi in and midi out
28 Synth, // midi in and audio out
29 Mapping, // value in and value out
30 Script, // JS, PD, etc
31 Structure, // scenario, loop, etc
32 Visual, // gfx processes
33 Deprecated = (1ULL << 63), // gfx processes
34};
35
37{
38 QString prettyName;
39 ProcessCategory category{};
40 QString categoryText;
41 QString description;
42 QString author{"ossia score"};
43 QStringList tags;
44 std::optional<std::vector<Process::PortType>> inlets;
45 std::optional<std::vector<Process::PortType>> outlets;
46 QUrl documentationLink;
47};
48class Descriptor_k;
49}
50#define PROCESS_FLAGS_METADATA(Export, Model, Flags) \
51 TYPED_METADATA(Export, Model, Process::ProcessFlags_k, Process::ProcessFlags, Flags)
52
53#define PROCESS_METADATA( \
54 Export, Model, Uuid, ObjectKey, PrettyName, CategoryEnum, Category, Desc, Author, \
55 Tags, InputSpec, OutputSpec, DocumentationLink, Flags) \
56 MODEL_METADATA(Export, Process::ProcessModel, Model, Uuid, ObjectKey, PrettyName) \
57 CATEGORY_METADATA(Export, Model, Category) \
58 TAGS_METADATA(Export, Model, Tags) \
59 PROCESS_FLAGS_METADATA(Export, Model, (Process::ProcessFlags)(Flags)) \
60 template <> \
61 struct Export Metadata<::Process::Descriptor_k, Model> \
62 { \
63 static ::Process::Descriptor get() \
64 { \
65 static const ::Process::Descriptor k{PrettyName, CategoryEnum, Category, \
66 Desc, Author, Tags, \
67 InputSpec, OutputSpec, DocumentationLink};\
68 return k; \
69 } \
70 };
71
72#define PROCESS_METADATA_IMPL(Model) \
73 MODEL_METADATA_IMPL(Model) \
74 QString prettyShortName() const noexcept override \
75 { \
76 return Metadata<PrettyName_k, Model>::get(); \
77 } \
78 QString category() const noexcept override \
79 { \
80 return Metadata<Category_k, Model>::get(); \
81 } \
82 QStringList tags() const noexcept override \
83 { \
84 return Metadata<Tags_k, Model>::get(); \
85 } \
86 Process::ProcessFlags flags() const noexcept override \
87 { \
88 return Metadata<Process::ProcessFlags_k, Model>::get(); \
89 }
Namespace related to the Automation process.
Definition AutomationColors.cpp:8
Base classes and tools to implement processes and layers.
Definition JSONVisitor.hpp:1324
Definition score-lib-process/Process/ProcessMetadata.hpp:37