Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
typedefnode.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
"typedefnode.h"
5
6
#
include
"aggregate.h"
7
8
QT_BEGIN_NAMESPACE
9
10
/*!
11
\class TypedefNode
12
*/
13
14
/*!
15
Sets the enum associated with the typedef to the node specified by \a enume.
16
This is used to associate a flag type with the enum values that represent
17
individual flags.
18
*/
19
void
TypedefNode
::setAssociatedEnum(
const
EnumNode
*enume)
20
{
21
m_associatedEnum = enume;
22
}
23
24
/*!
25
Clone this node on the heap and make the clone a child of
26
\a parent.
27
28
Returns the pointer to the clone.
29
*/
30
Node
*
TypedefNode
::
clone
(
Aggregate
*parent)
31
{
32
auto
*tn =
new
TypedefNode
(*
this
);
// shallow copy
33
tn
->
setParent
(
nullptr
);
34
parent
->
addChild
(tn);
35
36
return
tn;
37
}
38
39
/*!
40
Extends the base implementation to test whether an associated enum
41
is in the API.
42
*/
43
bool
TypedefNode
::
isInAPI
()
const
44
{
45
return
Node
::
isInAPI
() || (m_associatedEnum && m_associatedEnum
->
isInAPI
());
46
}
47
48
/*!
49
\class TypeAliasNode
50
*/
51
52
/*!
53
Clone this node on the heap and make the clone a child of
54
\a parent.
55
56
Returns the pointer to the clone.
57
*/
58
Node
*
TypeAliasNode
::
clone
(
Aggregate
*parent)
59
{
60
auto
*tan =
new
TypeAliasNode
(*
this
);
// shallow copy
61
tan
->
setParent
(
nullptr
);
62
parent
->
addChild
(tan);
63
64
return
tan;
65
}
66
67
QT_END_NAMESPACE
Aggregate
Definition
aggregate.h:23
Aggregate::addChild
void addChild(Node *child)
Adds the child to this node's child list and sets the child's parent pointer to this Aggregate.
Definition
aggregate.cpp:529
EnumNode
Definition
enumnode.h:22
TypeAliasNode
Definition
typedefnode.h:40
TypeAliasNode::clone
Node * clone(Aggregate *parent) override
Clone this node on the heap and make the clone a child of parent.
Definition
typedefnode.cpp:58
TypedefNode
Definition
typedefnode.h:19
TypedefNode::isInAPI
bool isInAPI() const override
Extends the base implementation to test whether an associated enum is in the API.
Definition
typedefnode.cpp:43
TypedefNode::clone
Node * clone(Aggregate *parent) override
Clone this node on the heap and make the clone a child of parent.
Definition
typedefnode.cpp:30
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
Node
The Node class is the base class for all the nodes in QDoc's parse tree.
Definition
src_corelib_text_qstring.cpp:10
Node::isInAPI
virtual bool isInAPI() const
Returns true if this node is considered to be part of the API as per the InclusionPolicy retrieved fr...
Definition
node.cpp:927
Node::setParent
void setParent(Aggregate *n)
Sets the node's parent pointer to n.
Definition
node.h:182
qttools
src
qdoc
qdoc
src
qdoc
typedefnode.cpp
Generated on
for Qt by
1.18.0