MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / snapshotAllRefs

Function snapshotAllRefs

app/src/DataModel/ProjectModel.cpp:3690–3703  ·  view source on GitHub ↗

* @brief Snapshots one anchor per workspace ref before a reorder. */

Source from the content-addressed store, hash-verified

3688 * @brief Snapshots one anchor per workspace ref before a reorder.
3689 */
3690static std::vector<std::vector<detail::RefAnchor>> snapshotAllRefs(
3691 const std::vector<DataModel::Workspace>& workspaces, const std::vector<DataModel::Group>& groups)
3692{
3693 std::vector<std::vector<detail::RefAnchor>> out;
3694 out.resize(workspaces.size());
3695 for (size_t w = 0; w < workspaces.size(); ++w) {
3696 const auto& ws = workspaces[w];
3697 auto& bucket = out[w];
3698 bucket.reserve(ws.widgetRefs.size());
3699 for (const auto& r : ws.widgetRefs)
3700 bucket.push_back(anchorRef(r, groups));
3701 }
3702 return out;
3703}
3704
3705/**
3706 * @brief Walks one workspace's refs against the new group/dataset layout, refreshing

Callers 2

moveGroupMethod · 0.85
moveDatasetMethod · 0.85

Calls 3

anchorRefFunction · 0.85
resizeMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected