1// Copyright (C) 2014 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 "qnodevisitor_p.h"
5
6QT_BEGIN_NAMESPACE
7
8namespace Qt3DCore {
9
10QNodeVisitor::QNodeVisitor()
11{
12}
13
14QNodeVisitor::~QNodeVisitor()
15{
16}
17
18QNode* QNodeVisitor::rootNode() const
19{
20 return m_path.front();
21}
22
23QNode* QNodeVisitor::currentNode() const
24{
25 return m_path.back();
26}
27
28void QNodeVisitor::setPath(QNodeVector path)
29{
30 m_path = path;
31}
32
33QNodeVector QNodeVisitor::path() const
34{
35 return m_path;
36}
37
38void QNodeVisitor::append(QNode *n)
39{
40 m_path.append(t: n);
41}
42
43void QNodeVisitor::pop_back()
44{
45 m_path.pop_back();
46}
47
48} // namespace Qt3DCore
49
50QT_END_NAMESPACE
51

source code of qt3d/src/core/nodes/qnodevisitor.cpp