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