| 1 | // Copyright (C) 2021 The Qt Company Ltd. |
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 |
| 3 | |
| 4 | #ifndef RELATEDCLASS_H |
| 5 | #define RELATEDCLASS_H |
| 6 | |
| 7 | #include "access.h" |
| 8 | |
| 9 | #include <QtCore/qstring.h> |
| 10 | #include <QtCore/qstringlist.h> |
| 11 | |
| 12 | #include <utility> |
| 13 | |
| 14 | QT_BEGIN_NAMESPACE |
| 15 | |
| 16 | class ClassNode; |
| 17 | |
| 18 | struct RelatedClass |
| 19 | { |
| 20 | RelatedClass() = default; |
| 21 | // constructor for resolved base class |
| 22 | RelatedClass(Access access, ClassNode *node) : m_access(access), m_node(node) {} |
| 23 | // constructor for unresolved base class |
| 24 | RelatedClass(Access access, QStringList path) : m_access(access), m_path(std::move(path)) { } |
| 25 | [[nodiscard]] bool isPrivate() const; |
| 26 | |
| 27 | Access m_access {}; |
| 28 | ClassNode *m_node { nullptr }; |
| 29 | QStringList m_path {}; |
| 30 | }; |
| 31 | |
| 32 | QT_END_NAMESPACE |
| 33 | |
| 34 | #endif // RELATEDCLASS_H |
| 35 | |