Loading...
Searching...
No Matches
ChangeId.hpp
1#pragma once
2#include <score/model/IdentifiedObject.hpp>
3
4namespace score
5{
6namespace IDocument
7{
8
9template <typename T>
10void changeObjectId(IdentifiedObject<T>& obj, const Id<T>& new_id)
11{
12 obj.setId(new_id);
13 const auto& cld = ((QObject&)obj).findChildren<IdentifiedObjectAbstract*>();
14 for(auto child : cld)
15 child->resetCache();
16}
17}
18}
Base class for IdentifiedObject.
Definition IdentifiedObjectAbstract.hpp:16
The IdentifiedObject class.
Definition IdentifiedObject.hpp:19
The id_base_t class.
Definition Identifier.hpp:57
Base toolkit upon which the software is built.
Definition Application.cpp:90