Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
headernode.cpp
Go to the documentation of this file.
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
"headernode.h"
5
6
QT_BEGIN_NAMESPACE
7
8
/*!
9
\class Headernode
10
\brief This class represents a C++ header file.
11
*/
12
13
HeaderNode
::
HeaderNode
(Aggregate *parent,
const
QString &name) :
Aggregate
(HeaderFile, parent, name)
14
{
15
// Set the include file with enclosing angle brackets removed
16
if
(name.startsWith(QChar(
'<'
)) && name.size() > 2)
17
Aggregate::setIncludeFile(name.mid(1).chopped(1));
18
else
19
Aggregate::setIncludeFile(name);
20
}
21
22
/*!
23
Returns true if this header file node is not private and
24
contains at least one public child node with documentation.
25
*/
26
bool
HeaderNode
::
docMustBeGenerated
()
const
27
{
28
if
(
isInAPI
())
29
return
true
;
30
return
hasDocumentedChildren
(
)
;
31
}
32
33
/*!
34
Returns true if this header file node contains at least one
35
child that has documentation and is not private or internal.
36
*/
37
bool
HeaderNode
::
hasDocumentedChildren
()
const
38
{
39
return
std
::any_of(
m_children
.cbegin(),
m_children
.cend(),
40
[](
Node
*child) {
return
child
->
isInAPI
(
)
; });
41
}
42
43
QT_END_NAMESPACE
Aggregate
Definition
aggregate.h:22
Aggregate::m_children
NodeList m_children
Definition
aggregate.h:83
HeaderNode
Definition
headernode.h:15
HeaderNode::hasDocumentedChildren
bool hasDocumentedChildren() const
Returns true if this header file node contains at least one child that has documentation and is not p...
Definition
headernode.cpp:37
HeaderNode::docMustBeGenerated
bool docMustBeGenerated() const override
Returns true if this header file node is not private and contains at least one public child node with...
Definition
headernode.cpp:26
Node::isInAPI
bool isInAPI() const
Definition
node.h:272
Node::LinkType
LinkType
An unsigned char value that probably should be moved out of the Node base class.
Definition
node.h:112
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qstandardpaths_haiku.cpp:21
std
Definition
qfloat16.h:492
qttools
src
qdoc
qdoc
src
qdoc
headernode.cpp
Generated on Sat Sep 21 2024 00:51:15 for Qt by
1.12.0