2#include <Process/Execution/ProcessComponent.hpp>
3#include <Process/GenericProcessFactory.hpp>
4#include <Process/Process.hpp>
5#include <Process/ProcessMetadata.hpp>
6#include <Process/Script/ScriptEditor.hpp>
8#include <Scenario/Commands/ScriptEditCommand.hpp>
10#include <Control/DefaultEffectItem.hpp>
11#include <Effect/EffectFactory.hpp>
12#include <JitCpp/EditScript.hpp>
14#include <ossia/dataflow/execution_state.hpp>
15#include <ossia/dataflow/graph_node.hpp>
16#include <ossia/dataflow/node_process.hpp>
18#include <score_plugin_jit_export.h>
29 , AvndJit::Model,
"193686f2-1f3b-45ce-9251-2e79ca06933b",
"Jit",
"Avendish",
30 Process::ProcessCategory::Script,
"Script",
"Avendish compilation process",
31 "ossia score", QStringList{}, {}, {},
32 QUrl(
"https://ossia.io/score-docs/development/plugins/plugins-with-avendish.html#avendish-documentation"),
33 Process::ProcessFlags::SupportsAll)
37using NodeFunction = ossia::graph_node*(int, double);
38using NodeFactory = std::function<NodeFunction>;
42 friend class JitUpdateUI;
43 SCORE_SERIALIZE_FRIENDS
44 PROCESS_METADATA_IMPL(Model)
58 bool validate(
const QString& txt)
const noexcept;
60 const QString& script()
const {
return m_text; }
62 void scriptChanged(
const QString& txt) W_SIGNAL(scriptChanged, txt);
63 void programChanged() W_SIGNAL(programChanged);
65 static constexpr
bool hasExternalUI() noexcept {
return true; }
67 QString prettyName() const noexcept override;
69 std::shared_ptr<NodeFactory> factory;
71 void errorMessage(
int line, const QString& e) W_SIGNAL(errorMessage, line, e);
72 PROPERTY(QString, script READ script WRITE setScript NOTIFY scriptChanged)
74 std::shared_ptr<NodeFactory> getJitFactory();
76 QString effect() const noexcept override;
77 void loadPreset(const
Process::Preset& preset) override;
78 Process::Preset savePreset() const noexcept override;
81 [[nodiscard]]
Process::ScriptChangeResult reload();
83 std::unique_ptr<NodeCompiler> m_compiler;
88 static constexpr const char* language =
"C++";
100QString EffectProcessFactory_T<AvndJit::Model>::customConstructionData() const noexcept;
104EffectProcessFactory_T<AvndJit::Model>::descriptor(QString d) const noexcept;
107Process::Descriptor EffectProcessFactory_T<AvndJit::Model>::descriptor(
108 const
Process::ProcessModel& d) const noexcept;
116 COMPONENT_METADATA(
"086fbfcf-44e9-4ea6-baad-b4f76e938d69")
119 static constexpr bool is_unique =
true;
131 SCORE_COMMAND_DECL(Jit::CommandFactoryName(),
EditAvndScript,
"Edit a C++ program")
143 using AvndJit::EditAvndScript::EditAvndScript;
Definition AvndJit.hpp:130
Definition AvndJit.hpp:115
Definition DataStreamVisitor.hpp:202
Definition Process/Execution/ProcessComponent.hpp:119
Definition JSONVisitor.hpp:423
Definition DefaultEffectItem.hpp:26
Definition EffectFactory.hpp:67
Definition EffectFactory.hpp:14
The Process class.
Definition score-lib-process/Process/Process.hpp:61
Definition ScriptEditor.hpp:42
Definition ScriptEditCommand.hpp:18
The id_base_t class.
Definition Identifier.hpp:57
Base classes and tools to implement processes and layers.
Definition JSONVisitor.hpp:1324
Base toolkit upon which the software is built.
Definition Application.cpp:90
Definition ExecutionContext.hpp:76
Definition Process/Execution/ProcessComponent.hpp:89
Definition ScriptProcess.hpp:14
Definition TimeValue.hpp:21
Definition PropertyCommand.hpp:112