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
cppcodeparser.cpp File Reference

(86182345c8aab88b1cbf7e0e016b5da206986003)

#include "cppcodeparser.h"
#include "access.h"
#include "qmlenumnode.h"
#include "classnode.h"
#include "clangcodeparser.h"
#include "collectionnode.h"
#include "comparisoncategory.h"
#include "config.h"
#include "examplenode.h"
#include "externalpagenode.h"
#include "functionnode.h"
#include "generator.h"
#include "genustypes.h"
#include "headernode.h"
#include "inclusionfilter.h"
#include "inclusionpolicy.h"
#include "namespacenode.h"
#include "qdocdatabase.h"
#include "qmltypenode.h"
#include "qmlpropertyarguments.h"
#include "qmlpropertynode.h"
#include "sharedcommentnode.h"
#include "utilities.h"
#include <QtCore/qdebug.h>
#include <QtCore/qmap.h>
#include <algorithm>
Include dependency graph for cppcodeparser.cpp:

Go to the source code of this file.

Typedefs

typedef bool(Node::* NodeTypeTestFunc) () const

Functions

static void setQmlAttributesFromNativeType (QmlTypeNode *qmlType, const ClassNode *classNode)
 Takes the singleton or uncreatable attribute of qmlType from its native type classNode.
static bool hasNativeTypeCommand (const Doc &doc)
 Returns true if doc names the native type of a QML type explicitly, using either \nativetype or the deprecated \instantiates.
QmlTypeNodefindOrCreateQmlType (const QString &moduleName, const QString &name, const Location &location)
 Finds a QmlTypeNode name, under the specific moduleName, from the primary tree.
static void checkModuleInclusion (Node *n)
 For each node that is part of C++ API and produces a documentation page, this function ensures that the node belongs to a module.

Variables

static QT_BEGIN_NAMESPACE const QMap< QString, NodeTypes_nodeTypeMap
static const QMap< QString, NodeTypeTestFuncs_nodeTypeTestFuncMap

Typedef Documentation

◆ NodeTypeTestFunc

typedef bool(Node::* NodeTypeTestFunc)() const

Definition at line 50 of file cppcodeparser.cpp.

Function Documentation

◆ checkModuleInclusion()

void checkModuleInclusion ( Node * n)
static

For each node that is part of C++ API and produces a documentation page, this function ensures that the node belongs to a module.

Definition at line 1018 of file cppcodeparser.cpp.

References Class, Node< _Tp >::doc(), HeaderFile, Node< _Tp >::isInAPI(), Doc::location(), Namespace, Node< _Tp >::nodeType(), QDocDatabase::qdocDB(), Struct, and Union.

Here is the call graph for this function:

◆ findOrCreateQmlType()

QmlTypeNode * findOrCreateQmlType ( const QString & moduleName,
const QString & name,
const Location & location )

Finds a QmlTypeNode name, under the specific moduleName, from the primary tree.

If one is not found, creates one.

Returns the found or created node.

Definition at line 267 of file cppcodeparser.cpp.

References QDocDatabase::qdocDB(), and Node< _Tp >::setLocation().

Here is the call graph for this function:

◆ hasNativeTypeCommand()

bool hasNativeTypeCommand ( const Doc & doc)
static

Returns true if doc names the native type of a QML type explicitly, using either \nativetype or the deprecated \instantiates.

Definition at line 104 of file cppcodeparser.cpp.

Referenced by CppCodeParser::processTopicCommand().

Here is the caller graph for this function:

◆ setQmlAttributesFromNativeType()

void setQmlAttributesFromNativeType ( QmlTypeNode * qmlType,
const ClassNode * classNode )
static

Takes the singleton or uncreatable attribute of qmlType from its native type classNode.

Attributes given explicitly in the QML documentation win, so a type documented as \qmlsingletontype or \qmluncreatabletype is left alone.

Definition at line 89 of file cppcodeparser.cpp.

References ClassNode::isQmlSingleton(), ClassNode::isQmlUncreatable(), QmlTypeNode::isSingleton(), QmlTypeNode::isUncreatable(), QmlTypeNode::setSingleton(), and QmlTypeNode::setUncreatable().

Here is the call graph for this function:

Variable Documentation

◆ s_nodeTypeMap

QT_BEGIN_NAMESPACE const QMap< QString, NodeType > s_nodeTypeMap
static
Initial value:

Definition at line 42 of file cppcodeparser.cpp.

◆ s_nodeTypeTestFuncMap

const QMap< QString, NodeTypeTestFunc > s_nodeTypeTestFuncMap
static
Initial value:
{
}
bool isNamespace() const
Returns true if the node type is Namespace.
Definition node.h:110
bool isTypedef() const
Returns true if the node type is Typedef.
Definition node.h:128
bool isEnumType() const
Returns true if the node type is Enum.
Definition node.h:94
bool isStruct() const
Returns true if the node type is Struct.
Definition node.h:125
bool isVariable() const
Returns true if the node type is Variable.
Definition node.h:133
bool isProperty() const
Returns true if the node type is Property.
Definition node.h:114
bool isTypeAlias() const
Returns true if the node type is Typedef.
Definition node.h:127
virtual bool isClassNode() const
Returns true if this is an instance of ClassNode.
Definition node.h:145
bool isUnion() const
Returns true if the node type is Union.
Definition node.h:132

Definition at line 51 of file cppcodeparser.cpp.