CableHelpers.hpp
1 #pragma once
2 #include <Process/Dataflow/Cable.hpp>
3 
4 #include <ossia/detail/json.hpp>
5 
6 #include <score_plugin_scenario_export.h>
7 
9 namespace Process
10 {
11 class ProcessModel;
12 }
13 namespace Dataflow
14 {
15 using SerializedCables = std::vector<std::pair<Id<Process::Cable>, Process::CableData>>;
16 
18 SCORE_PLUGIN_SCENARIO_EXPORT
19 std::vector<Process::Cable*>
20 getCablesInChildObjects(QObjectList objs, const score::DocumentContext& ctx);
21 
23 SCORE_PLUGIN_SCENARIO_EXPORT
24 SerializedCables saveCables(QObjectList objs, const score::DocumentContext& ctx);
25 
28 SCORE_PLUGIN_SCENARIO_EXPORT
29 SerializedCables serializedCablesFromCableJson(
30  const ObjectPath& old_path, const ObjectPath& new_path,
31  const rapidjson::Document::Array& arr);
32 SCORE_PLUGIN_SCENARIO_EXPORT
33 SerializedCables serializedCablesFromCableJson(
34  const ObjectPath& old_path, const rapidjson::Document::Array& arr);
35 
37 SCORE_PLUGIN_SCENARIO_EXPORT
38 void removeCables(const SerializedCables& cbls, const score::DocumentContext& ctx);
39 
42 SCORE_PLUGIN_SCENARIO_EXPORT
43 void restoreCables(const SerializedCables& cbls, const score::DocumentContext& ctx);
44 
47 SCORE_PLUGIN_SCENARIO_EXPORT
48 void loadCables(
49  const ObjectPath& old_path, const ObjectPath& new_path,
50  Dataflow::SerializedCables& cables, const score::DocumentContext& ctx);
51 
56 SCORE_PLUGIN_SCENARIO_EXPORT
57 void unstripCables(const ObjectPath& new_path, Dataflow::SerializedCables& cables);
58 }
The ObjectPath class.
Definition: ObjectPath.hpp:37
Base classes and tools to implement processes and layers.
Definition: JSONVisitor.hpp:1324
Definition: Cable.hpp:45
Definition: DocumentContext.hpp:18