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 | */ |
16 | void 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 | */ |
27 | Node *TypedefNode::clone(Aggregate *parent) |
28 | { |
29 | auto *tn = new TypedefNode(*this); // shallow copy |
30 | tn->setParent(nullptr); |
31 | parent->addChild(child: 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 | */ |
46 | Node *TypeAliasNode::clone(Aggregate *parent) |
47 | { |
48 | auto *tan = new TypeAliasNode(*this); // shallow copy |
49 | tan->setParent(nullptr); |
50 | parent->addChild(child: tan); |
51 | |
52 | return tan; |
53 | } |
54 | |
55 | QT_END_NAMESPACE |
56 |