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 Class Reference

#include <cppcodeparser.h>

Collaboration diagram for CppCodeParser:

Public Member Functions

 CppCodeParser (FnCommandParser &&parser)
FunctionNodeparseMacroArg (const Location &location, const QString &macroArg)
 Parse the macro arguments in macroArg ad hoc, without using any actual parser.
FunctionNodeparseOtherFuncArg (const QString &topic, const Location &location, const QString &funcArg)
 Parse QML signal/method topic commands.
std::pair< std::vector< TiedDocumentation >, std::vector< FnMatchError > > processTopicArgs (const UntiedDocumentation &untied)
void processMetaCommand (const Doc &doc, const QString &command, const ArgPair &argLocPair, Node *node)
 Process the metacommand command in the context of the node associated with the topic command and the doc.
void processMetaCommands (const Doc &doc, Node *node)
 The topic command has been processed, and now doc and node are passed to this function to get the metacommands from doc and process them one at a time.
void processMetaCommands (const std::vector< TiedDocumentation > &tied)

Static Public Member Functions

static bool isQMLMethodTopic (const QString &t)
 returns true if t is {qmlsignal}, {qmlmethod}, {qmlattachedsignal}, or {qmlattachedmethod}.
static bool isQMLPropertyTopic (const QString &t)
 Returns true if t is {qmlproperty}, {qmlpropertygroup}, or {qmlattachedproperty}.

Static Public Attributes

static const QSet< QStringtopic_commands
static const QSet< QStringmeta_commands

Protected Member Functions

virtual NodeprocessTopicCommand (const Doc &doc, const QString &command, const ArgPair &arg)
 Process the topic command found in the doc with argument arg.
std::vector< TiedDocumentationprocessQmlProperties (const UntiedDocumentation &untied)

Detailed Description

Definition at line 20 of file cppcodeparser.h.

Constructor & Destructor Documentation

◆ CppCodeParser()

CppCodeParser::CppCodeParser ( FnCommandParser && parser)
explicit

Definition at line 59 of file cppcodeparser.cpp.

References CppCodeParser().

Referenced by CppCodeParser(), and processQdocconfFile().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ isQMLMethodTopic()

bool CppCodeParser::isQMLMethodTopic ( const QString & t)
static

returns true if t is {qmlsignal}, {qmlmethod}, {qmlattachedsignal}, or {qmlattachedmethod}.

Definition at line 858 of file cppcodeparser.cpp.

◆ isQMLPropertyTopic()

bool CppCodeParser::isQMLPropertyTopic ( const QString & t)
static

Returns true if t is {qmlproperty}, {qmlpropertygroup}, or {qmlattachedproperty}.

Definition at line 868 of file cppcodeparser.cpp.

◆ parseMacroArg()

FunctionNode * CppCodeParser::parseMacroArg ( const Location & location,
const QString & macroArg )

Parse the macro arguments in macroArg ad hoc, without using any actual parser.

If successful, return a pointer to the new FunctionNode for the macro. Otherwise return null. location is used for reporting errors.

Definition at line 743 of file cppcodeparser.cpp.

References Node< _Tp >::doc(), FunctionNode::MacroWithoutParams, FunctionNode::MacroWithParams, Node< _Tp >::parent(), QDocDatabase::primaryTreeRoot(), Public, and QDocDatabase::qdocDB().

Here is the call graph for this function:

◆ parseOtherFuncArg()

FunctionNode * CppCodeParser::parseOtherFuncArg ( const QString & topic,
const Location & location,
const QString & funcArg )

Parse QML signal/method topic commands.

Definition at line 684 of file cppcodeparser.cpp.

References Public.

◆ processMetaCommand()

void CppCodeParser::processMetaCommand ( const Doc & doc,
const QString & command,
const ArgPair & argPair,
Node * node )

◆ processMetaCommands() [1/2]

void CppCodeParser::processMetaCommands ( const Doc & doc,
Node * node )

The topic command has been processed, and now doc and node are passed to this function to get the metacommands from doc and process them one at a time.

node is the node where doc resides.

Definition at line 615 of file cppcodeparser.cpp.

References Node< _Tp >::isSharedCommentNode().

Referenced by parseSourceFiles().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ processMetaCommands() [2/2]

void CppCodeParser::processMetaCommands ( const std::vector< TiedDocumentation > & tied)

Definition at line 988 of file cppcodeparser.cpp.

◆ processQmlProperties()

std::vector< TiedDocumentation > CppCodeParser::processQmlProperties ( const UntiedDocumentation & untied)
protected

Definition at line 237 of file cppcodeparser.cpp.

References UntiedDocumentation::documentation, Doc::location(), QmlPropertyArguments::parse(), QmlPropertyArguments::RequireQualifiedPath, Doc::startLocation(), and Doc::topicsUsed().

Here is the call graph for this function:

◆ processTopicArgs()

std::pair< std::vector< TiedDocumentation >, std::vector< FnMatchError > > CppCodeParser::processTopicArgs ( const UntiedDocumentation & untied)

Definition at line 874 of file cppcodeparser.cpp.

◆ processTopicCommand()

Node * CppCodeParser::processTopicCommand ( const Doc & doc,
const QString & command,
const ArgPair & arg )
protectedvirtual

Member Data Documentation

◆ meta_commands

const QSet<QString> CppCodeParser::meta_commands
inlinestatic
Initial value:
static const QSet< QString > common_meta_commands
Definition codeparser.h:110
Definition qset.h:19
#define COMMAND_NEXTPAGE
Definition codeparser.h:39
#define COMMAND_RELATES
Definition codeparser.h:74
#define COMMAND_QMLNATIVETYPE
Definition codeparser.h:61
#define COMMAND_OVERLOAD
Definition codeparser.h:43
#define COMMAND_COMPARESWITH
Definition codeparser.h:19
#define COMMAND_REIMP
Definition codeparser.h:73
#define COMMAND_INHEADERFILE
Definition codeparser.h:30
#define COMMAND_PREVIOUSPAGE
Definition codeparser.h:46
#define COMMAND_COMPARES
Definition codeparser.h:18
#define COMMAND_QMLINSTANTIATES
Definition codeparser.h:58

Definition at line 34 of file cppcodeparser.h.

◆ topic_commands

const QSet<QString> CppCodeParser::topic_commands
inlinestatic
Initial value:
{
}
#define COMMAND_ENUM
Definition codeparser.h:23
#define COMMAND_HEADERFILE
Definition codeparser.h:28
#define COMMAND_EXTERNALPAGE
Definition codeparser.h:25
#define COMMAND_MODULE
Definition codeparser.h:36
#define COMMAND_QMLSIGNAL
Definition codeparser.h:66
#define COMMAND_STRUCT
Definition codeparser.h:76
#define COMMAND_QMLENUM
Definition codeparser.h:55
#define COMMAND_QMLSINGLETONTYPE
Definition codeparser.h:68
#define COMMAND_QMLPROPERTYGROUP
Definition codeparser.h:63
#define COMMAND_PROPERTY
Definition codeparser.h:47
#define COMMAND_CLASS
Definition codeparser.h:14
#define COMMAND_NAMESPACE
Definition codeparser.h:38
#define COMMAND_QMLMODULE
Definition codeparser.h:60
#define COMMAND_QMLPROPERTY
Definition codeparser.h:62
#define COMMAND_FN
Definition codeparser.h:26
#define COMMAND_QMLATTACHEDPROPERTY
Definition codeparser.h:50
#define COMMAND_UNION
Definition codeparser.h:85
#define COMMAND_MACRO
Definition codeparser.h:35
#define COMMAND_GROUP
Definition codeparser.h:27
#define COMMAND_VARIABLE
Definition codeparser.h:83
#define COMMAND_QMLBASICTYPE
Definition codeparser.h:90
#define COMMAND_PAGE
Definition codeparser.h:44
#define COMMAND_EXAMPLE
Definition codeparser.h:24
#define COMMAND_TYPEDEF
Definition codeparser.h:82
#define COMMAND_QMLMETHOD
Definition codeparser.h:59
#define COMMAND_DONTDOCUMENT
Definition codeparser.h:22
#define COMMAND_QMLVALUETYPE
Definition codeparser.h:52
#define COMMAND_TYPEALIAS
Definition codeparser.h:81
#define COMMAND_QMLTYPE
Definition codeparser.h:67
#define COMMAND_QMLATTACHEDMETHOD
Definition codeparser.h:49
#define COMMAND_QMLATTACHEDSIGNAL
Definition codeparser.h:51

Definition at line 23 of file cppcodeparser.h.


The documentation for this class was generated from the following files: