1 | // Copyright (C) 2017 Klaralvdalens Datakonsult AB (KDAB). |
---|---|
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
3 | |
4 | #include "managers_p.h" |
5 | #include <Qt3DAnimation/private/clipblendnode_p.h> |
6 | |
7 | QT_BEGIN_NAMESPACE |
8 | |
9 | namespace Qt3DAnimation { |
10 | namespace Animation { |
11 | |
12 | ClipBlendNodeManager::ClipBlendNodeManager() |
13 | { |
14 | } |
15 | |
16 | ClipBlendNodeManager::~ClipBlendNodeManager() |
17 | { |
18 | qDeleteAll(c: m_nodes); |
19 | } |
20 | |
21 | bool ClipBlendNodeManager::containsNode(Qt3DCore::QNodeId id) const |
22 | { |
23 | return m_nodes.contains(key: id); |
24 | } |
25 | |
26 | void ClipBlendNodeManager::appendNode(Qt3DCore::QNodeId id, ClipBlendNode *node) |
27 | { |
28 | m_nodes.insert(key: id, value: node); |
29 | } |
30 | |
31 | ClipBlendNode *ClipBlendNodeManager::lookupNode(Qt3DCore::QNodeId id) const |
32 | { |
33 | return m_nodes.value(key: id, defaultValue: nullptr); |
34 | } |
35 | |
36 | void ClipBlendNodeManager::releaseNode(Qt3DCore::QNodeId id) |
37 | { |
38 | delete m_nodes.take(key: id); |
39 | } |
40 | |
41 | } // namespace Animation |
42 | } // namespace Qt3DAnimation |
43 | |
44 | QT_END_NAMESPACE |
45 |