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
7QT_BEGIN_NAMESPACE
8
9namespace Qt3DAnimation {
10namespace Animation {
11
12ClipBlendNodeManager::ClipBlendNodeManager()
13{
14}
15
16ClipBlendNodeManager::~ClipBlendNodeManager()
17{
18 qDeleteAll(c: m_nodes);
19}
20
21bool ClipBlendNodeManager::containsNode(Qt3DCore::QNodeId id) const
22{
23 return m_nodes.contains(key: id);
24}
25
26void ClipBlendNodeManager::appendNode(Qt3DCore::QNodeId id, ClipBlendNode *node)
27{
28 m_nodes.insert(key: id, value: node);
29}
30
31ClipBlendNode *ClipBlendNodeManager::lookupNode(Qt3DCore::QNodeId id) const
32{
33 return m_nodes.value(key: id, defaultValue: nullptr);
34}
35
36void ClipBlendNodeManager::releaseNode(Qt3DCore::QNodeId id)
37{
38 delete m_nodes.take(key: id);
39}
40
41} // namespace Animation
42} // namespace Qt3DAnimation
43
44QT_END_NAMESPACE
45

source code of qt3d/src/animation/backend/managers.cpp