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>
23 , Jit::JitEffectModel,
"0a3b49d6-4ce7-4668-aec3-9505b6ee1a60",
"Jit",
"JIT",
24 Process::ProcessCategory::Script,
"Script",
"JIT compilation process",
"ossia score",
25 QStringList{}, {}, {},
26 QUrl(
"https://ossia.io/score-docs/processes/cpp_jit.html#c-jit"),
27 Process::ProcessFlags::SupportsAll)
32using NodeCompiler = Driver;
33using NodeFactory = std::function<ossia::graph_node*()>;
38 friend class JitUpdateUI;
39 SCORE_SERIALIZE_FRIENDS
40 PROCESS_METADATA_IMPL(JitEffectModel)
42 W_OBJECT(JitEffectModel)
47 ~JitEffectModel()
override;
54 bool validate(
const QString& txt)
const noexcept;
56 const QString& script()
const {
return m_text; }
58 void scriptChanged(
const QString& txt) W_SIGNAL(scriptChanged, txt);
59 void programChanged() W_SIGNAL(programChanged);
61 static constexpr
bool hasExternalUI() noexcept {
return true; }
63 QString prettyName() const noexcept override;
65 std::shared_ptr<NodeFactory> factory;
67 void errorMessage(
int line, const QString& e) W_SIGNAL(errorMessage, line, e);
68 PROPERTY(QString, script READ script WRITE setScript NOTIFY scriptChanged)
70 std::shared_ptr<NodeFactory> getJitFactory();
72 QString effect() const noexcept override;
73 void loadPreset(const
Process::Preset& preset) override;
74 Process::Preset savePreset() const noexcept override;
77 [[nodiscard]]
Process::ScriptChangeResult reload();
79 std::unique_ptr<NodeCompiler> m_compiler;
84 static constexpr const char* language =
"C++";
91 JitEffectModel, JitEffectModel::p_script, LanguageSpec>>;
98EffectProcessFactory_T<Jit::JitEffectModel>::customConstructionData() const noexcept;
102EffectProcessFactory_T<Jit::JitEffectModel>::descriptor(QString d) const noexcept;
105Process::Descriptor EffectProcessFactory_T<Jit::JitEffectModel>::descriptor(
106 const
Process::ProcessModel& d) const noexcept;
114 COMPONENT_METADATA(
"122ceaeb-cbcc-4808-91f2-1929e3ca8292")
117 static constexpr bool is_unique =
true;
131 SCORE_COMMAND_DECL(CommandFactoryName(),
EditScript,
"Edit a C++ program")
143 using Jit::EditScript::EditScript;
Definition DataStreamVisitor.hpp:202
Definition JitModel.hpp:113
Definition Process/Execution/ProcessComponent.hpp:119
Definition JSONVisitor.hpp:423
Definition JitModel.hpp:130
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
Components used for the execution of a score.
Definition ProcessComponent.cpp:12
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