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#include "relatedclass.h"
5
6#include "node.h"
7
8/*!
9 \struct RelatedClass
10 \brief A struct for indicating that a ClassNode is related in some way to another ClassNode.
11
12 This struct has nothing to do with the \c {\\relates} command. This struct
13 is used for indicating that a ClassNode is a base class of another ClassNode,
14 is a derived class of another ClassNode, or is an ignored base class of
15 another ClassNode. This struct is only used in ClassNode.
16*/
17
18/*! \fn RelatedClass::RelatedClass()
19 The default constructor does nothing. It is only used for allocating empty
20 instances of RelatedClass in containers.
21 */
22
23/*! \fn RelatedClass::RelatedClass(Access access, ClassNode *node)
24 This is the constructor used when the related class has been resolved.
25 In other words, when the ClassNode has been created so that \a node is
26 not \c nullptr.
27*/
28
29/*! \fn RelatedClass::RelatedClass(Access access, const QStringList &path, const QString &signature)
30 This is the constructor used when the related class has not bee resolved,
31 because it hasn't been created yet. In that case, we store the qualified
32 \a path name of the class and the \a signature of the class, which I think
33 is just the name of the class.
34
35 \note We might be able to simplify the whole RelatedClass concept. Maybe we
36 can get rid of it completely.
37*/
38
39/*! \fn bool RelatedClass::isPrivate() const
40 Returns \c true if this RelatedClass is marked as Access::Private.
41*/
42bool RelatedClass::isPrivate() const
43{
44 return (m_access == Access::Private);
45}
46
47

source code of qttools/src/qdoc/qdoc/relatedclass.cpp