summaryrefslogtreecommitdiffstats
path: root/src/qdoc/qdoc/src/qdoc/typedefnode.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qdoc/qdoc/src/qdoc/typedefnode.cpp')
-rw-r--r--src/qdoc/qdoc/src/qdoc/typedefnode.cpp55
1 files changed, 55 insertions, 0 deletions
diff --git a/src/qdoc/qdoc/src/qdoc/typedefnode.cpp b/src/qdoc/qdoc/src/qdoc/typedefnode.cpp
new file mode 100644
index 000000000..997e570d3
--- /dev/null
+++ b/src/qdoc/qdoc/src/qdoc/typedefnode.cpp
@@ -0,0 +1,55 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
+#include "typedefnode.h"
+
+#include "aggregate.h"
+
+QT_BEGIN_NAMESPACE
+
+/*!
+ \class TypedefNode
+ */
+
+/*!
+ */
+void TypedefNode::setAssociatedEnum(const EnumNode *enume)
+{
+ m_associatedEnum = enume;
+}
+
+/*!
+ Clone this node on the heap and make the clone a child of
+ \a parent.
+
+ Returns the pointer to the clone.
+ */
+Node *TypedefNode::clone(Aggregate *parent)
+{
+ auto *tn = new TypedefNode(*this); // shallow copy
+ tn->setParent(nullptr);
+ parent->addChild(tn);
+
+ return tn;
+}
+
+/*!
+ \class TypeAliasNode
+ */
+
+/*!
+ Clone this node on the heap and make the clone a child of
+ \a parent.
+
+ Returns the pointer to the clone.
+ */
+Node *TypeAliasNode::clone(Aggregate *parent)
+{
+ auto *tan = new TypeAliasNode(*this); // shallow copy
+ tan->setParent(nullptr);
+ parent->addChild(tan);
+
+ return tan;
+}
+
+QT_END_NAMESPACE