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
node.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 "node.h"
5
6#include "aggregate.h"
7#include "codemarker.h"
8#include "config.h"
9#include "enumnode.h"
10#include "functionnode.h"
11#include "generator.h"
13#include "nodecontext.h"
14#include "qdocdatabase.h"
15#include "qmltypenode.h"
17#include "relatedclass.h"
19#include "tokenizer.h"
20#include "tree.h"
21
22#include <QtCore/quuid.h>
23#include <QtCore/qversionnumber.h>
24
25#include <utility>
26
28
29using namespace Qt::StringLiterals;
30
31/*!
32 \class Node
33 \brief The Node class is the base class for all the nodes in QDoc's parse tree.
34
35 Class Node is the base class of all the node subclasses. There is a subclass of Node
36 for each type of entity that QDoc can document. The types of entities that QDoc can
37 document are listed in the enum type NodeType.
38
39 After ClangCodeParser has parsed all the header files to build its precompiled header,
40 it then visits the clang Abstract Syntax Tree (AST). For each node in the AST that it
41 determines is in the public API and must be documented, it creates an instance of one
42 of the Node subclasses and adds it to the QDoc Tree.
43
44 Each instance of a sublass of Node has a parent pointer to link it into the Tree. The
45 parent pointer is obtained by calling \l {parent()}, which returns a pointer to an
46 instance of the Node subclass, Aggregate, which is never instantiated directly, but
47 as the base class for certain subclasses of Node that can have children. For example,
48 ClassNode and QmlTypeNode can have children, so they both inherit Aggregate, while
49 PropertyNode and QmlPropertyNode can not have children, so they both inherit Node.
50
51 \sa Aggregate, ClassNode, PropertyNode
52 */
53
54// Helper macro for comparing any a < b
55#define LT_RETURN_IF_NOT_EQUAL(a, b)
56 if ((a) != (b))
57 return (a) < (b);
58
59// Helper macro for comparing strings a < b
60#define LT_RETURN_IF_NOT_EQUAL_QSTR(a, b)
61 if ((a) != (b))
62 return QString::compare(a, b) < 0;
63
64/*!
65 Returns \c true if the node \a n1 is less than node \a n2. The
66 comparison is performed by comparing properties of the nodes
67 in order of increasing complexity.
68
69 String properties are compared in a locale- and platform-
70 independent manner.
71
72 Use for sorting lists of Nodes for output not intended for
73 human consumption, for example, ordering elements in an index
74 file.
75
76 \sa nodeNameLessThan()
77 */
78bool Node::nodeLessThan(const Node *n1, const Node *n2)
79{
80 if (n1->isFunction() && n2->isFunction()) {
81 const auto *f1 = static_cast<const FunctionNode *>(n1);
82 const auto *f2 = static_cast<const FunctionNode *>(n2);
83
85 LT_RETURN_IF_NOT_EQUAL_QSTR(f1->signature(Node::SignatureReturnType),
86 f2->signature(Node::SignatureReturnType));
87 }
88
90 LT_RETURN_IF_NOT_EQUAL_QSTR(n1->name(), n2->name());
91 LT_RETURN_IF_NOT_EQUAL_QSTR(n1->logicalModuleName(), n2->logicalModuleName());
93 LT_RETURN_IF_NOT_EQUAL_QSTR(n1->location().filePath(), n2->location().filePath());
95
96 return false;
97}
98
99/*!
100 Returns \c true if the node \a n1 is less than node \a n2. The
101 comparison is performed by comparing properties of the nodes
102 in order of increasing complexity.
103
104 Use for sorting lists of Nodes for output intended for human
105 consumption. Sorting by name/title takes precedence over other
106 properties.
107
108 \sa nodeLessThan()
109 */
110bool Node::nodeNameLessThan(const Node *n1, const Node *n2)
111{
112 if (n1->isPageNode() && n2->isPageNode()) {
113 LT_RETURN_IF_NOT_EQUAL(n1->fullName(), n2->fullName());
114 LT_RETURN_IF_NOT_EQUAL(n1->fullTitle(), n2->fullTitle());
115 }
116
117 if (n1->isFunction() && n2->isFunction()) {
118 const auto *f1 = static_cast<const FunctionNode *>(n1);
119 const auto *f2 = static_cast<const FunctionNode *>(n2);
120
123 f2->signature(Node::SignatureReturnType));
124 }
125
127 LT_RETURN_IF_NOT_EQUAL(n1->name(), n2->name());
128 LT_RETURN_IF_NOT_EQUAL(n1->logicalModuleName(), n2->logicalModuleName());
130 LT_RETURN_IF_NOT_EQUAL(n1->location().filePath(), n2->location().filePath());
131
132 return false;
133}
134
135/*!
136 Returns \c true if node \a n1 is less than node \a n2 when comparing
137 the sort keys, defined with
138
139 \badcode
140 \meta sortkey {<value>}
141 \endcode
142
143 in the respective nodes' documentation. If the two sort keys are equal,
144 falls back to nodeNameLessThan(). If \a n1 defines a sort key and \a n2
145 does not, then n1 < n2.
146
147*/
148bool Node::nodeSortKeyOrNameLessThan(const Node *n1, const Node *n2)
149{
150 const QString default_sortkey{QChar{QChar::LastValidCodePoint}};
151 const auto *n1_metamap{n1->doc().metaTagMap()};
152 const auto *n2_metamap{n2->doc().metaTagMap()};
153 if (auto cmp = QString::compare(
154 n1_metamap ? n1_metamap->value(u"sortkey"_s, default_sortkey) : default_sortkey,
155 n2_metamap ? n2_metamap->value(u"sortkey"_s, default_sortkey) : default_sortkey); cmp != 0) {
156 return cmp < 0;
157 }
158 return nodeNameLessThan(n1, n2);
159}
160
161
163{
164 NodeContext context;
165 context.type = nodeType();
166 context.isPrivate = isPrivate();
167 context.isInternal = isInternal();
169
170 return context;
171}
172
173
174/*!
175 \internal
176 \fn setComparisonCategory(const ComparisonCategory category)
177
178 Sets the comparison category of this node to \a category.
179
180 \sa ComparisonCategory, comparisonCategory()
181 */
182
183/*!
184 \internal
185 \fn ComparisonCategory comparisonCategory()
186
187 Returns the comparison category of this node.
188
189 \sa ComparisonCategory, setComparisonCategory()
190 */
191
192/*!
193 \enum Access
194
195 An unsigned char value that indicates the C++ access level.
196
197 \value Public The element has public access.
198 \value Protected The element has protected access.
199 \value Private The element has private access.
200*/
201
202/*!
203 \enum Node::Status
204
205 An unsigned char that specifies the status of the documentation element in
206 the documentation set.
207
208 \value Deprecated The element has been deprecated.
209 \value Preliminary The element is new; the documentation is preliminary.
210 \value Active The element is current.
211 \value Internal The element is for internal use only, not to be published.
212 \value DontDocument The element is not to be documented.
213*/
214
215/*!
216 \enum Node::ThreadSafeness
217
218 An unsigned char that specifies the degree of thread-safeness of the element.
219
220 \value UnspecifiedSafeness The thread-safeness is not specified.
221 \value NonReentrant The element is not reentrant.
222 \value Reentrant The element is reentrant.
223 \value ThreadSafe The element is threadsafe.
224*/
225
226/*!
227 \enum Node::LinkType
228
229 An unsigned char value that probably should be moved out of the Node base class.
230
231 \value StartLink
232 \value NextLink
233 \value PreviousLink
234 \value ContentsLink
235 */
236
237/*!
238 \enum Node::FlagValue
239
240 A value used in PropertyNode and QmlPropertyNode that can be -1, 0, or +1.
241 Properties and QML properties have flags, which can be 0 or 1, false or true,
242 or not set. FlagValueDefault is the not set value. In other words, if a flag
243 is set to FlagValueDefault, the meaning is the flag has not been set.
244
245 \value FlagValueDefault -1 Not set.
246 \value FlagValueFalse 0 False.
247 \value FlagValueTrue 1 True.
248*/
249
250/*!
251 \fn Node::~Node()
252
253 The default destructor is virtual so any subclass of Node can be
254 deleted by deleting a pointer to Node.
255 */
256
257/*! \fn bool Node::isActive() const
258 Returns true if this node's status is \c Active.
259 */
260
261/*! \fn bool Node::isClass() const
262 Returns true if the node type is \c Class.
263 */
264
265/*! \fn bool Node::isCppNode() const
266 Returns true if this node's Genus value is \c CPP.
267 */
268
269/*! \fn bool Node::isDeprecated() const
270 Returns true if this node's status is \c Deprecated.
271 */
272
273/*! \fn bool Node::isDontDocument() const
274 Returns true if this node's status is \c DontDocument.
275 */
276
277/*! \fn bool Node::isEnumType() const
278 Returns true if the node type is \c Enum.
279 */
280
281/*! \fn bool Node::isExample() const
282 Returns true if the node type is \c Example.
283 */
284
285/*! \fn bool Node::isExternalPage() const
286 Returns true if the node type is \c ExternalPage.
287 */
288
289/*! \fn bool Node::isFunction(Genus g = DontCare) const
290 Returns true if this is a FunctionNode and its Genus is set to \a g.
291 */
292
293/*! \fn bool Node::isGroup() const
294 Returns true if the node type is \c Group.
295 */
296
297/*! \fn bool Node::isHeader() const
298 Returns true if the node type is \c HeaderFile.
299 */
300
301/*! \fn bool Node::isIndexNode() const
302 Returns true if this node was created from something in an index file.
303 */
304
305/*! \fn bool Node::isModule() const
306 Returns true if the node type is \c Module.
307 */
308
309/*! \fn bool Node::isNamespace() const
310 Returns true if the node type is \c Namespace.
311 */
312
313/*! \fn bool Node::isPage() const
314 Returns true if the node type is \c Page.
315 */
316
317/*! \fn bool Node::isPreliminary() const
318 Returns true if this node's status is \c Preliminary.
319 */
320
321/*! \fn bool Node::isPrivate() const
322 Returns true if this node's access is \c Private.
323 */
324
325/*! \fn bool Node::isProperty() const
326 Returns true if the node type is \c Property.
327 */
328
329/*! \fn bool Node::isProxyNode() const
330 Returns true if the node type is \c Proxy.
331 */
332
333/*! \fn bool Node::isPublic() const
334 Returns true if this node's access is \c Public.
335 */
336
337/*! \fn bool Node::isProtected() const
338 Returns true if this node's access is \c Protected.
339 */
340
341/*! \fn bool Node::isQmlBasicType() const
342 Returns true if the node type is \c QmlBasicType.
343 */
344
345/*! \fn bool Node::isQmlModule() const
346 Returns true if the node type is \c QmlModule.
347 */
348
349/*! \fn bool Node::isQmlNode() const
350 Returns true if this node's Genus value is \c QML.
351 */
352
353/*! \fn bool Node::isQmlProperty() const
354 Returns true if the node type is \c QmlProperty.
355 */
356
357/*! \fn bool Node::isQmlType() const
358 Returns true if the node type is \c QmlType or \c QmlValueType.
359 */
360
361/*! \fn bool Node::isRelatedNonmember() const
362 Returns true if this is a related nonmember of something.
363 */
364
365/*! \fn bool Node::isStruct() const
366 Returns true if the node type is \c Struct.
367 */
368
369/*! \fn bool Node::isSharedCommentNode() const
370 Returns true if the node type is \c SharedComment.
371 */
372
373/*! \fn bool Node::isTypeAlias() const
374 Returns true if the node type is \c Typedef.
375 */
376
377/*! \fn bool Node::isTypedef() const
378 Returns true if the node type is \c Typedef.
379 */
380
381/*! \fn bool Node::isUnion() const
382 Returns true if the node type is \c Union.
383 */
384
385/*! \fn bool Node::isVariable() const
386 Returns true if the node type is \c Variable.
387 */
388
389/*! \fn bool Node::isGenericCollection() const
390 Returns true if the node type is \c Collection.
391 */
392
393/*! \fn bool Node::isAbstract() const
394 Returns true if the ClassNode or QmlTypeNode is marked abstract.
395*/
396
397/*! \fn bool Node::isAggregate() const
398 Returns true if this node is an aggregate, which means it
399 inherits Aggregate and can therefore have children.
400*/
401
402/*! \fn bool Node::isFirstClassAggregate() const
403 Returns true if this Node is an Aggregate but not a ProxyNode.
404*/
405
406/*! \fn bool Node::isAlias() const
407 Returns true if this QML property is marked as an alias.
408*/
409
410/*! \fn bool Node::isAttached() const
411 Returns true if the QML property or QML method node is marked as attached.
412*/
413
414/*! \fn bool Node::isClassNode() const
415 Returns true if this is an instance of ClassNode.
416*/
417
418/*! \fn bool Node::isCollectionNode() const
419 Returns true if this is an instance of CollectionNode.
420*/
421
422/*! \fn bool Node::isDefault() const
423 Returns true if the QML property node is marked as default.
424*/
425
426/*! \fn bool Node::isMacro() const
427 returns true if either FunctionNode::isMacroWithParams() or
428 FunctionNode::isMacroWithoutParams() returns true.
429*/
430
431/*! \fn bool Node::isPageNode() const
432 Returns true if this node represents something that generates a documentation
433 page. In other words, if this Node's subclass inherits PageNode, then this
434 function will return \e true.
435*/
436
437/*! \fn bool Node::isRelatableType() const
438 Returns true if this node is something you can relate things to with
439 the \e relates command. NamespaceNode, ClassNode, HeaderNode, and
440 ProxyNode are relatable types.
441*/
442
443/*! \fn bool Node::isMarkedReimp() const
444 Returns true if the FunctionNode is marked as a reimplemented function.
445 That means it is virtual in the base class and it is reimplemented in
446 the subclass.
447*/
448
449/*! \fn bool Node::isPropertyGroup() const
450 Returns true if the node is a SharedCommentNode for documenting
451 multiple C++ properties or multiple QML properties.
452*/
453
454/*! \fn bool Node::isStatic() const
455 Returns true if the FunctionNode represents a static function.
456*/
457
458/*! \fn bool Node::isTextPageNode() const
459 Returns true if the node is a PageNode but not an Aggregate.
460*/
461
462/*!
463 Returns this node's name member. Appends "()" to the returned
464 name if this node is a function node, but not if it is a macro
465 because macro names normally appear without parentheses.
466 */
468{
469 if (isFunction() && !isMacro())
470 return m_name + QLatin1String("()");
471 return m_name;
472}
473
474/*!
475 Constructs and returns the node's fully qualified name by
476 recursively ascending the parent links and prepending each
477 parent name + "::". Breaks out when reaching a HeaderNode,
478 or when the parent pointer is \a relative. Typically, calls
479 to this function pass \c nullptr for \a relative.
480 */
481QString Node::plainFullName(const Node *relative) const
482{
483 if (m_name.isEmpty())
484 return QLatin1String("global");
485 if (isHeader())
486 return plainName();
487
488 QStringList parts;
489 const Node *node = this;
490 while (node && !node->isHeader()) {
491 parts.prepend(node->plainName());
492 if (node->parent() == relative || node->parent()->name().isEmpty())
493 break;
494 node = node->parent();
495 }
496 return parts.join(QLatin1String("::"));
497}
498
499/*!
500 Constructs and returns the node's fully qualified signature
501 by recursively ascending the parent links and prepending each
502 parent name + "::" to the plain signature. The return type is
503 not included.
504 */
506{
507 if (m_name.isEmpty())
508 return QLatin1String("global");
509
510 QString fullName;
511 const Node *node = this;
512 while (node) {
513 fullName.prepend(node->signature(Node::SignaturePlain));
514 if (node->parent()->name().isEmpty())
515 break;
516 fullName.prepend(QLatin1String("::"));
517 node = node->parent();
518 }
519 return fullName;
520}
521
522/*!
523 Constructs and returns this node's full name. The full name is
524 often just the title(). When it is not the title, it is the
525 plainFullName().
526 */
527QString Node::fullName(const Node *relative) const
528{
529 if ((isTextPageNode() || isGroup()) && !title().isEmpty())
530 return title();
531 return plainFullName(relative);
532}
533
534/*!
535 Sets this Node's Doc to \a doc. If \a replace is false and
536 this Node already has a Doc, and if this doc is not marked
537 with the \\reimp command, a warning is reported that the
538 existing Doc is being overridden, and it reports where the
539 previous Doc was found. If \a replace is true, the Doc is
540 replaced silently.
541 */
542void Node::setDoc(const Doc &doc, bool replace)
543{
544 if (!m_doc.isEmpty() && !replace && !doc.isMarkedReimp()) {
545 doc.location().warning(QStringLiteral("Overrides a previous doc"),
546 QStringLiteral("from here: %1").arg(m_doc.location().toString()));
547 }
548 m_doc = doc;
549}
550
551/*!
552 Sets the node's status to \a t.
553
554 \sa Status
555*/
557{
558 m_status = t;
559
560 // Set non-null, empty URL to nodes that are ignored as
561 // link targets
562 switch (t) {
563 case Internal: {
564 const InclusionPolicy policy = Config::instance().createInclusionPolicy();
566 break;
567 Q_FALLTHROUGH();
568 }
569 case DontDocument:
570 m_url = QStringLiteral("");
571 break;
572 default:
573 break;
574 }
575}
576
577/*!
578 Construct a node with the given \a type and having the
579 given \a parent and \a name. The new node is added to the
580 parent's child list.
581 */
582Node::Node(NodeType type, Aggregate *parent, QString name)
583 : m_nodeType(type),
584 m_indexNodeFlag(false),
585 m_relatedNonmember(false),
586 m_hadDoc(false),
587 m_parent(parent),
589{
590 if (m_parent)
591 m_parent->addChild(this);
592
594}
595
596/*!
597 Determines the appropriate Genus value for the NodeType
598 value \a t and returns that Genus value. Note that this
599 function is called in the Node() constructor. It always
600 returns Node::CPP when \a t is Node::Function, which
601 means the FunctionNode() constructor must determine its
602 own Genus value separately, because class FunctionNode
603 is a subclass of Node.
604 */
606{
607 switch (t) {
608 case NodeType::Enum:
609 case NodeType::Class:
610 case NodeType::Struct:
611 case NodeType::Union:
612 case NodeType::Module:
620 return Genus::CPP;
626 return Genus::QML;
627 case NodeType::Page:
628 case NodeType::Group:
631 return Genus::DOC;
634 case NodeType::Proxy:
635 default:
636 return Genus::DontCare;
637 }
638}
639
640/*! \fn QString Node::url() const
641 Returns the node's URL, which is the url of the documentation page
642 created for the node or the url of an external page if the node is
643 an ExternalPageNode. The url is used for generating a link to the
644 page the node represents.
645
646 \sa Node::setUrl()
647 */
648
649/*! \fn void Node::setUrl(const QString &url)
650 Sets the node's URL to \a url, which is the url to the page that the
651 node represents. This function is only called when an index file is
652 read. In other words, a node's url is set when qdoc decides where its
653 page will be and what its name will be, which happens when qdoc writes
654 the index file for the module being documented.
655
656 \sa QDocIndexFiles
657 */
658
659/*!
660 Returns this node's type as a string for use as an
661 attribute value in XML or HTML.
662 */
664{
665 if (isFunction()) {
666 const auto *fn = static_cast<const FunctionNode *>(this);
667 return fn->kindString();
668 }
669 return nodeTypeString(nodeType());
670}
671
672/*!
673 Returns the node type \a t as a string for use as an
674 attribute value in XML or HTML.
675 */
676QString Node::nodeTypeString(NodeType t)
677{
678 switch (t) {
680 return QLatin1String("namespace");
681 case NodeType::Class:
682 return QLatin1String("class");
683 case NodeType::Struct:
684 return QLatin1String("struct");
685 case NodeType::Union:
686 return QLatin1String("union");
688 return QLatin1String("header");
689 case NodeType::Page:
690 return QLatin1String("page");
691 case NodeType::Enum:
692 return QLatin1String("enum");
694 return QLatin1String("example");
696 return QLatin1String("external page");
699 return QLatin1String("typedef");
701 return QLatin1String("function");
703 return QLatin1String("property");
704 case NodeType::Proxy:
705 return QLatin1String("proxy");
707 return QLatin1String("variable");
708 case NodeType::Group:
709 return QLatin1String("group");
710 case NodeType::Module:
711 return QLatin1String("module");
712
714 return QLatin1String("QML type");
716 return QLatin1String("QML value type");
718 return QLatin1String("QML module");
720 return QLatin1String("QML property");
721
723 return QLatin1String("shared comment");
725 return QLatin1String("collection");
726 default:
727 break;
728 }
729 return QString();
730}
731
732/*! Converts the boolean value \a b to an enum representation
733 of the boolean type, which includes an enum value for the
734 \e {default value} of the item, i.e. true, false, or default.
735 */
737{
738 return b ? FlagValueTrue : FlagValueFalse;
739}
740
741/*!
742 Converts the enum \a fv back to a boolean value.
743 If \a fv is neither the true enum value nor the
744 false enum value, the boolean value returned is
745 \a defaultValue.
746 */
747bool Node::fromFlagValue(FlagValue fv, bool defaultValue)
748{
749 switch (fv) {
750 case FlagValueTrue:
751 return true;
752 case FlagValueFalse:
753 return false;
754 default:
755 return defaultValue;
756 }
757}
758
759/*!
760 This function creates a pair that describes a link.
761 The pair is composed from \a link and \a desc. The
762 \a linkType is the map index the pair is filed under.
763 */
764void Node::setLink(LinkType linkType, const QString &link, const QString &desc)
765{
766 std::pair<QString, QString> linkPair;
767 linkPair.first = std::move(link);
768 linkPair.second = std::move(desc);
769 m_linkMap[linkType] = std::move(linkPair);
770}
771
772/*!
773 Sets the information about the project and version a node was introduced
774 in, unless the version is lower than the 'ignoresince.<project>'
775 configuration variable.
776 */
777void Node::setSince(const QString &since)
778{
779 QStringList parts = since.split(QLatin1Char(' '));
780 QString project;
781 if (parts.size() > 1)
782 project = Config::dot + parts.first();
783
784 QVersionNumber cutoff =
785 QVersionNumber::fromString(Config::instance().get(CONFIG_IGNORESINCE + project).asString())
786 .normalized();
787
788 if (!cutoff.isNull() && QVersionNumber::fromString(parts.last()).normalized() < cutoff)
789 return;
790
791 m_since = parts.join(QLatin1Char(' '));
792}
793
794/*!
795 Extract a class name from the type \a string and return it.
796 */
797QString Node::extractClassName(const QString &string) const
798{
799 QString result;
800 for (int i = 0; i <= string.size(); ++i) {
801 QChar ch;
802 if (i != string.size())
803 ch = string.at(i);
804
805 QChar lower = ch.toLower();
806 if ((lower >= QLatin1Char('a') && lower <= QLatin1Char('z')) || ch.digitValue() >= 0
807 || ch == QLatin1Char('_') || ch == QLatin1Char(':')) {
808 result += ch;
809 } else if (!result.isEmpty()) {
810 if (result != QLatin1String("const"))
811 return result;
812 result.clear();
813 }
814 }
815 return result;
816}
817
818/*!
819 Returns the thread safeness value for whatever this node
820 represents. But if this node has a parent and the thread
821 safeness value of the parent is the same as the thread
822 safeness value of this node, what is returned is the
823 value \c{UnspecifiedSafeness}. Why?
824 */
826{
827 if (m_parent && m_safeness == m_parent->inheritedThreadSafeness())
828 return UnspecifiedSafeness;
829 return m_safeness;
830}
831
832/*!
833 If this node has a parent, the parent's thread safeness
834 value is returned. Otherwise, this node's thread safeness
835 value is returned. Why?
836 */
838{
839 if (m_parent && m_safeness == UnspecifiedSafeness)
840 return m_parent->inheritedThreadSafeness();
841 return m_safeness;
842}
843
844/*!
845 Returns \c true if the node's status is \c Internal, or if
846 its parent is a class with \c Internal status.
847 */
848bool Node::isInternal() const
849{
850 if (status() == Internal)
851 return true;
853}
854
855/*! \fn void Node::markInternal()
856 Sets the node's access to Private and its status to Internal.
857 */
858
859/*!
860 Returns a pointer to the root of the Tree this node is in.
861 */
862Aggregate *Node::root() const
863{
864 if (parent() == nullptr)
865 return (this->isAggregate() ? static_cast<Aggregate *>(const_cast<Node *>(this)) : nullptr);
866 Aggregate *t = parent();
867 while (t->parent() != nullptr)
868 t = t->parent();
869 return t;
870}
871
872/*!
873 Returns a pointer to the Tree this node is in.
874 */
875Tree *Node::tree() const
876{
877 return root()->tree();
878}
879
880/*!
881 Sets the node's declaration location, its definition
882 location, or both, depending on the suffix of the file
883 name from the file path in location \a t.
884 */
885void Node::setLocation(const Location &t)
886{
887 QString suffix = t.fileSuffix();
888 if (suffix == "h")
889 m_declLocation = t;
890 else if (suffix == "cpp")
891 m_defLocation = t;
892 else {
893 m_declLocation = t;
894 m_defLocation = t;
895 }
896}
897
898/*!
899 Returns \c true if this node is documented, or it represents
900 a documented node read from the index ('had doc'), or this
901 node is sharing a non-empty doc with other nodes.
902
903 \sa Doc
904 */
905bool Node::hasDoc() const
906{
907 if (m_hadDoc)
908 return true;
909
910 if (!m_doc.isEmpty())
911 return true;
912
913 return (m_sharedCommentNode && m_sharedCommentNode->hasDoc());
914}
915
916/*!
917 Returns the CPP node's qualified name by prepending the
918 namespaces name + "::" if there isw a namespace.
919 */
921{
922 if (m_parent && m_parent->isNamespace() && !m_parent->name().isEmpty())
923 return m_parent->name() + "::" + m_name;
924 return m_name;
925}
926
927/*!
928 Return the name of this node qualified with the parent name
929 and "::" if there is a parent name.
930 */
932{
933 if (m_parent && !m_parent->name().isEmpty())
934 return m_parent->name() + "::" + m_name;
935 return m_name;
936}
937
938/*!
939 Returns the QML node's qualified name by prepending the logical
940 module name.
941 */
943{
944 return logicalModuleName() + "::" + m_name;
945}
946
947/*!
948 Returns \c true if the node is a class node or a QML type node
949 that is marked as being a wrapper class or wrapper QML type,
950 or if it is a member of a wrapper class or type.
951 */
952bool Node::isWrapper() const
953{
954 return m_parent != nullptr && m_parent->isWrapper();
955}
956
957/*!
958 Construct the full document name for this node and return it.
959 */
961{
962 QStringList pieces;
963 const Node *n = this;
964
965 do {
966 if (!n->name().isEmpty())
967 pieces.insert(0, n->name());
968
969 if (n->isQmlType() && !n->logicalModuleName().isEmpty()) {
970 pieces.insert(0, n->logicalModuleName());
971 break;
972 }
973
975 break;
976
977 // Examine the parent if the node is a member
979 break;
980
981 n = n->parent();
982 } while (true);
983
984 // Create a name based on the type of the ancestor node.
985 QString concatenator = "::";
986 if (n->isQmlType())
987 concatenator = QLatin1Char('.');
988
990 concatenator = QLatin1Char('#');
991
992 return pieces.join(concatenator);
993}
994
995/*!
996 Sets the Node status to Node::Deprecated, unless \a sinceVersion represents
997 a future version.
998
999 Stores \a sinceVersion representing the version in which the deprecation
1000 took (or will take) place.
1001
1002 Fetches the current version from the config ('version' variable) as a
1003 string, and compared to \a sinceVersion. If both string represent a valid
1004 version and \a sinceVersion is greater than the currect version, do not
1005 mark the node as deprecated; leave it active.
1006*/
1007void Node::setDeprecated(const QString &sinceVersion)
1008{
1009
1010 if (!m_deprecatedSince.isEmpty())
1011 qCWarning(lcQdoc) << QStringLiteral(
1012 "Setting deprecated since version for %1 to %2 even though it "
1013 "was already set to %3. This is very unexpected.")
1014 .arg(this->m_name, sinceVersion, this->m_deprecatedSince);
1015 m_deprecatedSince = sinceVersion;
1016
1017 if (!sinceVersion.isEmpty()) {
1018 QVersionNumber since = QVersionNumber::fromString(sinceVersion).normalized();
1019 QVersionNumber current = QVersionNumber::fromString(
1020 Config::instance().get(CONFIG_VERSION).asString())
1021 .normalized();
1022 if (!current.isNull() && !since.isNull()) {
1023 if (current < since)
1024 return;
1025 }
1026 }
1028}
1029
1030/*! \fn Node *Node::clone(Aggregate *parent)
1031
1032 When reimplemented in a subclass, this function creates a
1033 clone of this node on the heap and makes the clone a child
1034 of \a parent. A pointer to the clone is returned.
1035
1036 Here in the base class, this function does nothing and returns
1037 nullptr.
1038 */
1039
1040/*! \fn NodeType Node::nodeType() const
1041 Returns this node's type.
1042
1043 \sa NodeType
1044*/
1045
1046/*! \fn Genus Node::genus() const
1047 Returns this node's Genus.
1048
1049 \sa Genus
1050*/
1051
1052/*! void Node::setGenus(Genus t)
1053 Sets this node's Genus to \a t.
1054*/
1055
1056/*! \fn QString Node::signature(Node::SignatureOptions options) const
1057
1058 Specific parts of the signature are included according to flags in
1059 \a options.
1060
1061 If this node is not a FunctionNode, this function returns plainName().
1062
1063 \sa FunctionNode::signature()
1064*/
1065
1066/*! \fn const QString &Node::fileNameBase() const
1067 Returns the node's file name base string, which is built once, when
1068 Generator::fileBase() is called and stored in the Node.
1069*/
1070
1071/*! \fn bool Node::hasFileNameBase() const
1072 Returns true if the node's file name base has been set.
1073
1074 \sa Node::fileNameBase()
1075*/
1076
1077/*! \fn void Node::setFileNameBase(const QString &t)
1078 Sets the node's file name base to \a t. Only called by
1079 Generator::fileBase().
1080*/
1081
1082/*! \fn void Node::setAccess(Access t)
1083 Sets the node's access type to \a t.
1084
1085 \sa Access
1086*/
1087
1088/*! \fn void Node::setThreadSafeness(ThreadSafeness t)
1089 Sets the node's thread safeness to \a t.
1090
1091 \sa ThreadSafeness
1092*/
1093
1094/*! \fn void Node::setPhysicalModuleName(const QString &name)
1095 Sets the node's physical module \a name.
1096*/
1097
1098/*! \fn void Node::setReconstitutedBrief(const QString &t)
1099 When reading an index file, this function is called with the
1100 reconstituted brief clause \a t to set the node's brief clause.
1101 I think this is needed for linking to something in the brief clause.
1102*/
1103
1104/*! \fn void Node::setParent(Aggregate *n)
1105 Sets the node's parent pointer to \a n. Such a thing
1106 is not lightly done. All the calls to this function
1107 are in other member functions of Node subclasses. See
1108 the code in the subclass implementations to understand
1109 when this function can be called safely and why it is called.
1110*/
1111
1112/*! \fn void Node::setIndexNodeFlag(bool isIndexNode = true)
1113 Sets a flag in this Node that indicates the node was created
1114 for something in an index file. This is important to know
1115 because an index node is not to be documented in the current
1116 module. When the index flag is set, it means the Node
1117 represents something in another module, and it will be
1118 documented in that module's documentation.
1119*/
1120
1121/*! \fn void Node::setRelatedNonmember(bool b)
1122 Sets a flag in the node indicating whether this node is a related nonmember
1123 of something. This function is called when the \c relates command is seen.
1124 */
1125
1126/*! \fn void Node::addMember(Node *node)
1127 In a CollectionNode, this function adds \a node to the collection
1128 node's members list. It does nothing if this node is not a CollectionNode.
1129 */
1130
1131/*! \fn bool Node::hasNamespaces() const
1132 Returns \c true if this is a CollectionNode and its members list
1133 contains namespace nodes. Otherwise it returns \c false.
1134 */
1135
1136/*! \fn bool Node::hasClasses() const
1137 Returns \c true if this is a CollectionNode and its members list
1138 contains class nodes. Otherwise it returns \c false.
1139 */
1140
1141/*! \fn void Node::setAbstract(bool b)
1142 If this node is a ClassNode or a QmlTypeNode, the node's abstract flag
1143 data member is set to \a b.
1144 */
1145
1146/*! \fn void Node::setWrapper()
1147 If this node is a ClassNode or a QmlTypeNode, the node's wrapper flag
1148 data member is set to \c true.
1149 */
1150
1151/*! \fn void Node::setDataType(const QString &dataType)
1152 If this node is a PropertyNode or a QmlPropertyNode, its
1153 data type data member is set to \a dataType. Otherwise,
1154 this function does nothing.
1155 */
1156
1157/*! \fn bool Node::wasSeen() const
1158 Returns the \c seen flag data member of this node if it is a NamespaceNode
1159 or a CollectionNode. Otherwise it returns \c false. If \c true is returned,
1160 it means that the location where the namespace or collection is to be
1161 documented has been found.
1162 */
1163
1164/*! \fn void appendGroupName(const QString &t)
1165 If this node is a PageNode, the group name \a t is appended to the node's
1166 list of group names. It is not clear to me what this list of group names
1167 is used for, but it is written to the index file, and it is used in the
1168 navigation bar.
1169 */
1170
1171/*! \fn QString Node::element() const
1172 If this node is a QmlPropertyNode or a FunctionNode, this function
1173 returns the name of the parent node. Otherwise it returns an empty
1174 string.
1175 */
1176
1177/*! \fn bool Node::docMustBeGenerated() const
1178 This function is called to perform a test to decide if the node must have
1179 documentation generated. In the Node base class, it always returns \c false.
1180
1181 In the ProxyNode class it always returns \c true. There aren't many proxy
1182 nodes, but when one appears, it must generate documentation. In the overrides
1183 in NamespaceNode and ClassNode, a meaningful test is performed to decide if
1184 documentation must be generated.
1185 */
1186
1187/*! \fn QString Node::title() const
1188 Returns a string that can be used to print a title in the documentation for
1189 whatever this Node is. In the Node base class, the node's name() is returned.
1190 In a PageNode, the function returns the title data member. In a HeaderNode,
1191 if the title() is empty, the name() is returned.
1192 */
1193
1194/*! \fn QString Node::subtitle() const { return QString(); }
1195 Returns a string that can be used to print a subtitle in the documentation for
1196 whatever this Node is. In the Node base class, the empty string is returned.
1197 In a PageNode, the function returns the subtitle data member. In a HeaderNode,
1198 the subtitle data member is returned.
1199 */
1200
1201/*! \fn QString Node::fullTitle() const
1202 Returns a string that can be used as the full title for the documentation of
1203 this node. In this base class, the name() is returned. In a PageNode, title()
1204 is returned. In a HeaderNode, if the title() is empty, the name() is returned.
1205 If the title() is not empty then name-title is returned. In a CollectionNode,
1206 the title() is returned.
1207 */
1208
1209/*! \fn bool Node::setTitle(const QString &title)
1210 Sets the node's \a title, which is used for the title of
1211 the documentation page, if one is generated for this node.
1212 Returns \c true if the title is set. In this base class,
1213 there is no title string stored, so in the base class,
1214 nothing happens and \c false is returned. The override in
1215 the PageNode class is where the title is set.
1216 */
1217
1218/*! \fn bool Node::setSubtitle(const QString &subtitle)
1219 Sets the node's \a subtitle, which is used for the subtitle
1220 of the documentation page, if one is generated for this node.
1221 Returns \c true if the subtitle is set. In this base class,
1222 there is no subtitle string stored, so in the base class,
1223 nothing happens and \c false is returned. The override in
1224 the PageNode and HeaderNode classes is where the subtitle is
1225 set.
1226 */
1227
1228/*! \fn void Node::markDefault()
1229 If this node is a QmlPropertyNode, it is marked as the default property.
1230 Otherwise the function does nothing.
1231 */
1232
1233/*! \fn void Node::markReadOnly(bool flag)
1234 If this node is a QmlPropertyNode, then the property's read-only
1235 flag is set to \a flag.
1236 */
1237
1238/*! \fn Aggregate *Node::parent() const
1239 Returns the node's parent pointer.
1240*/
1241
1242/*! \fn const QString &Node::name() const
1243 Returns the node's name data member.
1244*/
1245
1246/*! \fn void Node::setQtVariable(const QString &v)
1247 If this node is a CollectionNode, its QT variable is set to \a v.
1248 Otherwise the function does nothing. I don't know what the QT variable
1249 is used for.
1250 */
1251
1252/*! \fn QString Node::qtVariable() const
1253 If this node is a CollectionNode, its QT variable is returned.
1254 Otherwise an empty string is returned. I don't know what the QT
1255 variable is used for.
1256 */
1257
1258/*! \fn bool Node::hasTag(const QString &t) const
1259 If this node is a FunctionNode, the function returns \c true if
1260 the function has the tag \a t. Otherwise the function returns
1261 \c false. I don't know what the tag is used for.
1262 */
1263
1264/*! \fn const QMap<LinkType, std::pair<QString, QString> > &Node::links() const
1265 Returns a reference to this node's link map. The link map should
1266 probably be moved to the PageNode, because it contains links to the
1267 start page, next page, previous page, and contents page, and these
1268 are only used in PageNode, I think.
1269 */
1270
1271/*! \fn Access Node::access() const
1272 Returns the node's Access setting, which can be \c Public,
1273 \c Protected, or \c Private.
1274 */
1275
1276/*! \fn const Location& Node::declLocation() const
1277 Returns the Location where this node's declaration was seen.
1278 Normally the declaration location is in an \e include file.
1279 The declaration location is used in qdoc error/warning messages
1280 about the declaration.
1281 */
1282
1283/*! \fn const Location& Node::defLocation() const
1284 Returns the Location where this node's dedefinition was seen.
1285 Normally the definition location is in a \e .cpp file.
1286 The definition location is used in qdoc error/warning messages
1287 when the error is discovered at the location of the definition,
1288 although the way to correct the problem often requires changing
1289 the declaration.
1290 */
1291
1292/*! \fn const Location& Node::location() const
1293 If this node's definition location is empty, this function
1294 returns this node's declaration location. Otherwise it
1295 returns the definition location.
1296
1297 \sa Location
1298 */
1299
1300/*! \fn const Doc &Node::doc() const
1301 Returns a reference to the node's Doc data member.
1302
1303 \sa Doc
1304 */
1305
1306/*! \fn Status Node::status() const
1307 Returns the node's status value.
1308
1309 \sa Status
1310 */
1311
1312/*! \fn QString Node::since() const
1313 Returns the node's since string, which can be empty.
1314 */
1315
1316/*! \fn QString Node::templateStuff() const
1317 Returns the node's template parameters string, if this node
1318 represents a templated element.
1319 */
1320
1321/*! \fn bool Node::isSharingComment() const
1322 This function returns \c true if the node is sharing a comment
1323 with other nodes. For example, multiple functions can be documented
1324 with a single qdoc comment by listing the \c {\\fn} signatures for
1325 all the functions in the single qdoc comment.
1326 */
1327
1328/*! \fn QString Node::qmlTypeName() const
1329 If this is a QmlPropertyNode or a FunctionNode representing a QML
1330 method, this function returns the qmlTypeName() of
1331 the parent() node. Otherwise it returns the name data member.
1332 */
1333
1334/*! \fn QString Node::qmlFullBaseName() const
1335 If this is a QmlTypeNode, this function returns the QML full
1336 base name. Otherwise it returns an empty string.
1337 */
1338
1339/*! \fn QString Node::logicalModuleName() const
1340 If this is a CollectionNode, this function returns the logical
1341 module name. Otherwise it returns an empty string.
1342 */
1343
1344/*! \fn QString Node::logicalModuleVersion() const
1345 If this is a CollectionNode, this function returns the logical
1346 module version number. Otherwise it returns an empty string.
1347 */
1348
1349/*! \fn QString Node::logicalModuleIdentifier() const
1350 If this is a CollectionNode, this function returns the logical
1351 module identifier. Otherwise it returns an empty string.
1352 */
1353
1354/*! \fn void Node::setLogicalModuleInfo(const QString &arg)
1355 If this node is a CollectionNode, this function splits \a arg
1356 on the blank character to get a logical module name and version
1357 number. If the version number is present, it splits the version
1358 number on the '.' character to get a major version number and a
1359 minor version number. If the version number is present, both the
1360 major and minor version numbers should be there, but the minor
1361 version number is not absolutely necessary.
1362
1363 The strings are stored in the appropriate data members for use
1364 when the QML module page is generated.
1365 */
1366
1367/*! \fn void Node::setLogicalModuleInfo(const QStringList &info)
1368 If this node is a CollectionNode, this function accepts the
1369 logical module \a info as a string list. If the logical module
1370 info contains the version number, it splits the version number
1371 on the '.' character to get the major and minor version numbers.
1372 Both major and minor version numbers should be provided, but
1373 the minor version number is not strictly necessary.
1374
1375 The strings are stored in the appropriate data members for use
1376 when the QML module page is generated. This overload
1377 of the function is called when qdoc is reading an index file.
1378 */
1379
1380/*! \fn CollectionNode *Node::logicalModule() const
1381 If this is a QmlTypeNode, a pointer to its QML module is returned,
1382 which is a pointer to a CollectionNode. Otherwise the \c nullptr
1383 is returned.
1384 */
1385
1386/*! \fn void Node::setQmlModule(CollectionNode *t)
1387 If this is a QmlTypeNode, this function sets the QML type's QML module
1388 pointer to the CollectionNode \a t. Otherwise the function does nothing.
1389 */
1390
1391/*! \fn ClassNode *Node::classNode()
1392 If this is a QmlTypeNode, this function returns the pointer to
1393 the C++ ClassNode that this QML type represents. Otherwise the
1394 \c nullptr is returned.
1395 */
1396
1397/*! \fn void Node::setClassNode(ClassNode *cn)
1398 If this is a QmlTypeNode, this function sets the C++ class node
1399 to \a cn. The C++ ClassNode is the C++ implementation of the QML
1400 type.
1401 */
1402
1403/*! \fn NodeType Node::goal(const QString &t)
1404 When a square-bracket parameter is used in a qdoc command, this
1405 function might be called to convert the text string \a t obtained
1406 from inside the square brackets to be a Goal value, which is returned.
1407
1408 \sa Goal
1409 */
1410
1411QT_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.
Definition doc.h:31
const Location & location() const
Returns the starting location of a qdoc comment.
Definition doc.cpp:90
Doc & operator=(const Doc &doc)
Definition doc.cpp:75
bool isMarkedReimp() const
Returns true if the set of metacommands used in the doc comment contains {reimp}.
Definition doc.cpp:228
QStringMultiMap * metaTagMap() const
Definition doc.cpp:300
bool isEmpty() const
Definition doc.cpp:110
This node is used to represent any kind of function being documented.
bool isConst() const
static bool processInternalDocs(const InclusionPolicy &policy)
The Location class provides a way to mark a location in a file.
Definition location.h:20
int lineNo() const
Returns the current line number.
Definition location.h:50
This class constructs and maintains a tree of instances of the subclasses of Node.
Definition tree.h:58
#define CONFIG_VERSION
Definition config.h:442
#define CONFIG_IGNORESINCE
Definition config.h:391
NodeType
Definition genustypes.h:150
@ SharedComment
Definition genustypes.h:173
Combined button and popup list for selecting options.
#define LT_RETURN_IF_NOT_EQUAL(a, b)
Definition node.cpp:55
#define LT_RETURN_IF_NOT_EQUAL_QSTR(a, b)
Definition node.cpp:60
bool isInternal
Definition nodecontext.h:18
bool isPureVirtual
Definition nodecontext.h:19
NodeType type
Definition nodecontext.h:16
The Node class is the base class for all the nodes in QDoc's parse tree.
virtual QString plainName() const
Returns this node's name member.
Definition node.cpp:467
const Doc & doc() const
Returns a reference to the node's Doc data member.
Definition node.h:242
void setGenus(Genus t)
Definition node.h:93
virtual bool isWrapper() const
Returns true if the node is a class node or a QML type node that is marked as being a wrapper class o...
Definition node.cpp:952
bool isPrivate() const
Returns true if this node's access is Private.
Definition node.h:118
virtual bool isAbstract() const
Returns true if the ClassNode or QmlTypeNode is marked abstract.
Definition node.h:142
QString nodeTypeString() const
Returns this node's type as a string for use as an attribute value in XML or HTML.
Definition node.cpp:663
bool isQmlType() const
Returns true if the node type is QmlType or QmlValueType.
Definition node.h:128
virtual bool isInternal() const
Returns true if the node's status is Internal, or if its parent is a class with Internal status.
Definition node.cpp:848
bool isHeader() const
Returns true if the node type is HeaderFile.
Definition node.h:112
NodeType nodeType() const override
Returns this node's type.
Definition node.h:89
virtual bool isPageNode() const
Returns true if this node represents something that generates a documentation page.
Definition node.h:155
virtual Status status() const
Returns the node's status value.
Definition node.h:249
virtual bool isTextPageNode() const
Returns true if the node is a PageNode but not an Aggregate.
Definition node.h:160
Aggregate * parent() const
Returns the node's parent pointer.
Definition node.h:215
static bool fromFlagValue(FlagValue fv, bool defaultValue)
Converts the enum fv back to a boolean value.
Definition node.cpp:747
void setLocation(const Location &t)
Sets the node's declaration location, its definition location, or both, depending on the suffix of th...
Definition node.cpp:885
QString plainFullName(const Node *relative=nullptr) const
Constructs and returns the node's fully qualified name by recursively ascending the parent links and ...
Definition node.cpp:481
virtual bool isAggregate() const
Returns true if this node is an aggregate, which means it inherits Aggregate and can therefore have c...
Definition node.h:143
FlagValue
A value used in PropertyNode and QmlPropertyNode that can be -1, 0, or +1.
Definition node.h:82
@ FlagValueTrue
Definition node.h:82
@ FlagValueFalse
Definition node.h:82
QString qualifyQmlName()
Returns the QML node's qualified name by prepending the logical module name.
Definition node.cpp:942
static bool nodeNameLessThan(const Node *first, const Node *second)
Returns true if the node n1 is less than node n2.
Definition node.cpp:110
QString qualifyCppName()
Returns the CPP node's qualified name by prepending the namespaces name + "::" if there isw a namespa...
Definition node.cpp:920
ThreadSafeness inheritedThreadSafeness() const
If this node has a parent, the parent's thread safeness value is returned.
Definition node.cpp:837
const Location & location() const
If this node's definition location is empty, this function returns this node's declaration location.
Definition node.h:238
Access access() const
Returns the node's Access setting, which can be Public, Protected, or Private.
Definition node.h:235
bool isFunction(Genus g=Genus::DontCare) const
Returns true if this is a FunctionNode and its Genus is set to g.
Definition node.h:107
ThreadSafeness threadSafeness() const
Returns the thread safeness value for whatever this node represents.
Definition node.cpp:825
Aggregate * root() const
QString fullDocumentName() const
Construct the full document name for this node and return it.
Definition node.cpp:960
virtual Tree * tree() const
Returns a pointer to the Tree this node is in.
Definition node.cpp:875
NodeContext createContext() const
Definition node.cpp:162
void setDoc(const Doc &doc, bool replace=false)
Sets this Node's Doc to doc.
Definition node.cpp:542
Node(NodeType type, Aggregate *parent, QString name)
Construct a node with the given type and having the given parent and name.
Definition node.cpp:582
ThreadSafeness
An unsigned char that specifies the degree of thread-safeness of the element.
Definition node.h:65
@ UnspecifiedSafeness
Definition node.h:66
QString fullName(const Node *relative) const
Constructs and returns this node's full name.
Definition node.cpp:527
virtual bool isPureVirtual() const
Definition node.h:123
bool hasDoc() const
Returns true if this node is documented, or it represents a documented node read from the index ('had...
Definition node.cpp:905
static Genus getGenus(NodeType t)
Determines the appropriate Genus value for the NodeType value t and returns that Genus value.
Definition node.cpp:605
static FlagValue toFlagValue(bool b)
Converts the boolean value b to an enum representation of the boolean type, which includes an enum va...
Definition node.cpp:736
bool isRelatedNonmember() const
Returns true if this is a related nonmember of something.
Definition node.h:129
void setSince(const QString &since)
Sets the information about the project and version a node was introduced in, unless the version is lo...
Definition node.cpp:777
void setStatus(Status t)
Sets the node's status to t.
Definition node.cpp:556
QString extractClassName(const QString &string) const
Extract a class name from the type string and return it.
Definition node.cpp:797
void setDeprecated(const QString &sinceVersion)
Sets the Node status to Node::Deprecated, unless sinceVersion represents a future version.
Definition node.cpp:1007
static bool nodeSortKeyOrNameLessThan(const Node *n1, const Node *n2)
Returns true if node n1 is less than node n2 when comparing the sort keys, defined with.
Definition node.cpp:148
Status
An unsigned char that specifies the status of the documentation element in the documentation set.
Definition node.h:57
@ Internal
Definition node.h:61
@ Deprecated
Definition node.h:58
@ SignatureReturnType
Definition node.h:75
@ SignaturePlain
Definition node.h:73
QString qualifyWithParentName()
Return the name of this node qualified with the parent name and "::" if there is a parent name.
Definition node.cpp:931
QString plainSignature() const
Constructs and returns the node's fully qualified signature by recursively ascending the parent links...
Definition node.cpp:505
static bool nodeLessThan(const Node *first, const Node *second)
Returns true if the node n1 is less than node n2.
Definition node.cpp:78