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

#include <doc.h>

+ Collaboration diagram for Doc:

Public Types

enum  Sections {
  NoSection = -1 , Section1 = 1 , Section2 = 2 , Section3 = 3 ,
  Section4 = 4
}
 

Public Member Functions

 Doc ()=default
 
 Doc (const Location &start_loc, const Location &end_loc, const QString &source, const QSet< QString > &metaCommandSet, const QSet< QString > &topics)
 Parse the qdoc comment source.
 
 Doc (const Doc &doc)
 
 ~Doc ()
 
Docoperator= (const Doc &doc)
 
const Locationlocation () const
 Returns the starting location of a qdoc comment.
 
const LocationstartLocation () const
 Returns the starting location of a qdoc comment.
 
bool isEmpty () const
 
const QStringsource () const
 
const Textbody () const
 
Text briefText (bool inclusive=false) const
 
Text trimmedBriefText (const QString &className) const
 
Text legaleseText () const
 
QSet< QStringparameterNames () const
 
QStringList enumItemNames () const
 
QStringList omitEnumItemNames () const
 
QSet< QStringmetaCommandsUsed () const
 
TopicList topicsUsed () const
 Returns a reference to the list of topic commands used in the current qdoc comment.
 
ArgList metaCommandArgs (const QString &metaCommand) const
 
QList< TextalsoList () const
 
bool hasTableOfContents () const
 
bool hasKeywords () const
 
bool hasTargets () const
 
bool isInternal () const
 Returns true if the set of metacommands used in the doc comment contains {internal}.
 
bool isMarkedReimp () const
 Returns true if the set of metacommands used in the doc comment contains {reimp}.
 
const QList< Atom * > & tableOfContents () const
 
const QList< int > & tableOfContentsLevels () const
 
const QList< Atom * > & keywords () const
 
const QList< Atom * > & targets () const
 
QStringMultiMapmetaTagMap () const
 
QMultiMap< ComparisonCategory, Text > * comparesWithMap () const
 
void constructExtra () const
 

Static Public Member Functions

static void initialize (FileResolver &file_resolver)
 
static void terminate ()
 All the heap allocated variables are deleted.
 
static void trimCStyleComment (Location &location, QString &str)
 Trims the deadwood out of str.
 
static void quoteFromFile (const Location &location, Quoter &quoter, ResolvedFile resolved_file)
 

Related Symbols

(Note that these are not member symbols.)

 ArgList
 A list of metacommand arguments that appear in a Doc.
 

Detailed Description

Definition at line 30 of file doc.h.

Member Enumeration Documentation

◆ Sections

Enumerator
NoSection 
Section1 
Section2 
Section3 
Section4 

Definition at line 34 of file doc.h.

Constructor & Destructor Documentation

◆ Doc() [1/3]

Doc::Doc ( )
default

◆ Doc() [2/3]

Doc::Doc ( const Location & start_loc,
const Location & end_loc,
const QString & source,
const QSet< QString > & metaCommandSet,
const QSet< QString > & topics )

Parse the qdoc comment source.

Build up a list of all the topic commands found including their arguments. This constructor is used when there can be more than one topic command in theqdoc comment. Normally, there is only one topic command in a qdoc comment, but in QML documentation, there is the case where the qdoc {qmlproperty} command can appear multiple times in a qdoc comment.

Definition at line 47 of file doc.cpp.

References body(), and Text::dump().

+ Here is the call graph for this function:

◆ Doc() [3/3]

Doc::Doc ( const Doc & doc)

Definition at line 64 of file doc.cpp.

References operator=().

+ Here is the call graph for this function:

◆ ~Doc()

Doc::~Doc ( )

Definition at line 69 of file doc.cpp.

References DocPrivate::deref().

+ Here is the call graph for this function:

Member Function Documentation

◆ alsoList()

QList< Text > Doc::alsoList ( ) const
nodiscard

Definition at line 248 of file doc.cpp.

◆ body()

const Text & Doc::body ( ) const
nodiscard

Definition at line 115 of file doc.cpp.

References DocPrivate::m_text.

Referenced by Doc(), WebXMLGenerator::append(), briefText(), DocBookGenerator::generateBody(), Generator::generateBody(), and legaleseText().

+ Here is the caller graph for this function:

◆ briefText()

Text Doc::briefText ( bool inclusive = false) const
nodiscard

Definition at line 121 of file doc.cpp.

References body(), Atom::BriefLeft, Atom::BriefRight, and Text::subText().

Referenced by DocBookGenerator::generateHeader(), and trimmedBriefText().

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

◆ comparesWithMap()

QMultiMap< ComparisonCategory, Text > * Doc::comparesWithMap ( ) const
nodiscard

Definition at line 297 of file doc.cpp.

References DocPrivate::extra.

◆ constructExtra()

void Doc::constructExtra ( ) const

Definition at line 302 of file doc.cpp.

References DocPrivate::constructExtra().

+ Here is the call graph for this function:

◆ enumItemNames()

QStringList Doc::enumItemNames ( ) const
nodiscard

Definition at line 200 of file doc.cpp.

◆ hasKeywords()

bool Doc::hasKeywords ( ) const
nodiscard

Definition at line 258 of file doc.cpp.

References DocPrivate::extra.

◆ hasTableOfContents()

bool Doc::hasTableOfContents ( ) const
nodiscard

Definition at line 253 of file doc.cpp.

References DocPrivate::extra.

◆ hasTargets()

bool Doc::hasTargets ( ) const
nodiscard

Definition at line 263 of file doc.cpp.

References DocPrivate::extra.

◆ initialize()

void Doc::initialize ( FileResolver & file_resolver)
static

Definition at line 308 of file doc.cpp.

References DocParser::initialize().

Referenced by processQdocconfFile().

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

◆ isEmpty()

bool Doc::isEmpty ( ) const
nodiscard

Definition at line 110 of file doc.cpp.

Referenced by Node< _Tp >::hasDoc(), and Node< _Tp >::setDoc().

+ Here is the caller graph for this function:

◆ isInternal()

bool Doc::isInternal ( ) const
nodiscard

Returns true if the set of metacommands used in the doc comment contains {internal}.

Definition at line 219 of file doc.cpp.

Referenced by CppCodeParser::processMetaCommand().

+ Here is the caller graph for this function:

◆ isMarkedReimp()

bool Doc::isMarkedReimp ( ) const
nodiscard

Returns true if the set of metacommands used in the doc comment contains {reimp}.

Definition at line 228 of file doc.cpp.

Referenced by Node< _Tp >::setDoc().

+ Here is the caller graph for this function:

◆ keywords()

const QList< Atom * > & Doc::keywords ( ) const
nodiscard

Definition at line 280 of file doc.cpp.

References DocPrivate::constructExtra(), and DocPrivate::extra.

+ Here is the call graph for this function:

◆ legaleseText()

Text Doc::legaleseText ( ) const
nodiscard

Definition at line 187 of file doc.cpp.

References Text::Text(), body(), Atom::LegaleseLeft, Atom::LegaleseRight, DocPrivate::m_hasLegalese, and Text::subText().

+ Here is the call graph for this function:

◆ location()

◆ metaCommandArgs()

ArgList Doc::metaCommandArgs ( const QString & metaCommand) const
nodiscard

Definition at line 243 of file doc.cpp.

◆ metaCommandsUsed()

QSet< QString > Doc::metaCommandsUsed ( ) const
nodiscard

Definition at line 210 of file doc.cpp.

◆ metaTagMap()

QStringMultiMap * Doc::metaTagMap ( ) const
nodiscard

Definition at line 292 of file doc.cpp.

References DocPrivate::extra, and DocPrivateExtra::m_metaMap.

Referenced by formatStatus(), and Node< _Tp >::nodeSortKeyOrNameLessThan().

+ Here is the caller graph for this function:

◆ omitEnumItemNames()

QStringList Doc::omitEnumItemNames ( ) const
nodiscard

Definition at line 205 of file doc.cpp.

◆ operator=()

Doc & Doc::operator= ( const Doc & doc)

Definition at line 75 of file doc.cpp.

References DocPrivate::deref(), and DocPrivate::ref().

Referenced by Doc(), and Node< _Tp >::setDoc().

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

◆ parameterNames()

QSet< QString > Doc::parameterNames ( ) const
nodiscard

Definition at line 195 of file doc.cpp.

◆ quoteFromFile()

void Doc::quoteFromFile ( const Location & location,
Quoter & quoter,
ResolvedFile resolved_file )
static

Definition at line 403 of file doc.cpp.

References Quoter::reset().

Referenced by DocBookGenerator::generateExampleFilePage(), HtmlGenerator::generateExampleFilePage(), and WebXMLGenerator::generateExampleFilePage().

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

◆ source()

const QString & Doc::source ( ) const
nodiscard

Definition at line 104 of file doc.cpp.

◆ startLocation()

const Location & Doc::startLocation ( ) const
nodiscard

Returns the starting location of a qdoc comment.

Definition at line 99 of file doc.cpp.

References location().

Referenced by CppCodeParser::processQmlProperties(), and CppCodeParser::processTopicCommand().

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

◆ tableOfContents()

const QList< Atom * > & Doc::tableOfContents ( ) const
nodiscard

Definition at line 268 of file doc.cpp.

References DocPrivate::constructExtra(), and DocPrivate::extra.

+ Here is the call graph for this function:

◆ tableOfContentsLevels()

const QList< int > & Doc::tableOfContentsLevels ( ) const
nodiscard

Definition at line 274 of file doc.cpp.

References DocPrivate::constructExtra(), and DocPrivate::extra.

+ Here is the call graph for this function:

◆ targets()

const QList< Atom * > & Doc::targets ( ) const
nodiscard

Definition at line 286 of file doc.cpp.

References DocPrivate::constructExtra(), and DocPrivate::extra.

+ Here is the call graph for this function:

◆ terminate()

void Doc::terminate ( )
static

All the heap allocated variables are deleted.

Definition at line 361 of file doc.cpp.

References DocUtilities::cmdHash, and DocUtilities::macroHash.

Referenced by processQdocconfFile().

+ Here is the caller graph for this function:

◆ topicsUsed()

TopicList Doc::topicsUsed ( ) const
nodiscard

Returns a reference to the list of topic commands used in the current qdoc comment.

Normally there is only one, but there can be multiple {qmlproperty} commands, for example.

Definition at line 238 of file doc.cpp.

References DocPrivate::m_topics.

Referenced by ClangCodeParser::parse_cpp_file(), and CppCodeParser::processQmlProperties().

+ Here is the caller graph for this function:

◆ trimCStyleComment()

void Doc::trimCStyleComment ( Location & location,
QString & str )
static

Trims the deadwood out of str.

i.e., this function cleans up str.

Definition at line 371 of file doc.cpp.

References Location::columnNo().

+ Here is the call graph for this function:

◆ trimmedBriefText()

Text Doc::trimmedBriefText ( const QString & className) const
nodiscard

Definition at line 126 of file doc.cpp.

References Atom::AutoLink, briefText(), Atom::C, Text::firstAtom(), Atom::next(), Atom::String, and Atom::type().

+ Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ ArgList()

ArgList
related

A list of metacommand arguments that appear in a Doc.

Each entry in the list is a <QString, QString> pair (ArgPair):

\list

  • {ArgPair.first} - arguments passed to the command.
  • {ArgPair.second} - optional argument string passed within brackets immediately following the command. \endlist

Definition at line 27 of file doc.h.


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