Loading...
Searching...
No Matches
CableHelpers.hpp
1#pragma once
2
3#include <Process/Dataflow/CableData.hpp>
4#include <Process/Dataflow/PortType.hpp>
5
6#include <ossia/detail/json.hpp>
7
8#include <score_plugin_scenario_export.h>
9
10#include <vector>
11
13namespace Process
14{
15class Cable;
16struct CableData;
17class ProcessModel;
18}
19namespace Dataflow
20{
21using SerializedCables = std::vector<std::pair<Id<Process::Cable>, Process::CableData>>;
22
24SCORE_PLUGIN_SCENARIO_EXPORT
25std::vector<Process::Cable*>
26getCablesInChildObjects(QObjectList objs, const score::DocumentContext& ctx);
27
29SCORE_PLUGIN_SCENARIO_EXPORT
30SerializedCables saveCables(QObjectList objs, const score::DocumentContext& ctx);
31
34SCORE_PLUGIN_SCENARIO_EXPORT
35SerializedCables serializedCablesFromCableJson(
36 const ObjectPath& old_path, const ObjectPath& new_path,
37 const rapidjson::Document::Array& arr);
38SCORE_PLUGIN_SCENARIO_EXPORT
39SerializedCables serializedCablesFromCableJson(
40 const ObjectPath& old_path, const rapidjson::Document::Array& arr);
41
43SCORE_PLUGIN_SCENARIO_EXPORT
44void removeCables(const SerializedCables& cbls, const score::DocumentContext& ctx);
45
48SCORE_PLUGIN_SCENARIO_EXPORT
49void restoreCables(const SerializedCables& cbls, const score::DocumentContext& ctx);
50
53SCORE_PLUGIN_SCENARIO_EXPORT
54void loadCables(
55 const ObjectPath& old_path, const ObjectPath& new_path,
56 Dataflow::SerializedCables& cables, const score::DocumentContext& ctx);
57
62SCORE_PLUGIN_SCENARIO_EXPORT
63void unstripCables(const ObjectPath& new_path, Dataflow::SerializedCables& cables);
64
66{
67 QString name;
68 Process::PortType type;
69 QByteArray data;
70};
71
75SCORE_PLUGIN_SCENARIO_EXPORT
76void reloadPortsInNewProcess(
77 const std::vector<SavedPort>& m_oldInlets,
78 const std::vector<SavedPort>& m_oldOutlets,
79 const Dataflow::SerializedCables& m_oldCables, Process::ProcessModel& cmt,
80 const score::DocumentContext& ctx);
81
83SCORE_PLUGIN_SCENARIO_EXPORT
84void reloadPortsInNewProcess(
85 const std::vector<SavedPort>& m_oldInlets,
86 const std::vector<SavedPort>& m_oldOutlets, Process::ProcessModel& cmt);
87}
The ObjectPath class.
Definition ObjectPath.hpp:37
The Process class.
Definition score-lib-process/Process/Process.hpp:61
Base classes and tools to implement processes and layers.
Definition JSONVisitor.hpp:1324
Definition CableHelpers.hpp:66
Definition CableData.hpp:18
Definition DocumentContext.hpp:18