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
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
9
10/*!
11 \class TypedefNode
12 */
13
14/*!
15 */
16void TypedefNode::setAssociatedEnum(const EnumNode *enume)
17{
18 m_associatedEnum = enume;
19}
20
21/*!
22 Clone this node on the heap and make the clone a child of
23 \a parent.
24
25 Returns the pointer to the clone.
26 */
28{
29 auto *tn = new TypedefNode(*this); // shallow copy
30 tn->setParent(nullptr);
31 parent->addChild(tn);
32
33 return tn;
34}
35
36/*!
37 \class TypeAliasNode
38 */
39
40/*!
41 Clone this node on the heap and make the clone a child of
42 \a parent.
43
44 Returns the pointer to the clone.
45 */
47{
48 auto *tan = new TypeAliasNode(*this); // shallow copy
49 tan->setParent(nullptr);
50 parent->addChild(tan);
51
52 return tan;
53}
54
55QT_END_NAMESPACE
void addChild(Node *child)
Adds the child to this node's child list and sets the child's parent pointer to this Aggregate.
void setParent(Aggregate *n)
Sets the node's parent pointer to n.
Definition node.h:213
LinkType
An unsigned char value that probably should be moved out of the Node base class.
Definition node.h:112
Node * clone(Aggregate *parent) override
Clone this node on the heap and make the clone a child of parent.
Node * clone(Aggregate *parent) override
Clone this node on the heap and make the clone a child of parent.
Combined button and popup list for selecting options.