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

#include <docparser.h>

+ Collaboration diagram for DocParser:

Public Member Functions

void parse (const QString &source, DocPrivate *docPrivate, const QSet< QString > &metaCommandSet, const QSet< QString > &possibleTopics)
 Parse the source string to build a Text data structure in docPrivate.
 

Static Public Member Functions

static void initialize (const Config &config, FileResolver &file_resolver)
 
static int endCmdFor (int cmd)
 
static QString cmdName (int cmd)
 
static QString endCmdName (int cmd)
 
static QString untabifyEtc (const QString &str)
 
static int indentLevel (const QString &str)
 
static QString dedent (int level, const QString &str)
 

Static Public Attributes

static int s_tabSize
 
static QStringList s_ignoreWords
 
static bool s_quoting = false
 

Detailed Description

Definition at line 28 of file docparser.h.

Member Function Documentation

◆ cmdName()

QString DocParser::cmdName ( int cmd)
static

Definition at line 2634 of file docparser.cpp.

References name.

◆ dedent()

QString DocParser::dedent ( int level,
const QString & str )
static

Definition at line 2694 of file docparser.cpp.

◆ endCmdFor()

◆ endCmdName()

QString DocParser::endCmdName ( int cmd)
static

Definition at line 2639 of file docparser.cpp.

◆ indentLevel()

int DocParser::indentLevel ( const QString & str)
static

Definition at line 2677 of file docparser.cpp.

◆ initialize()

void DocParser::initialize ( const Config & config,
FileResolver & file_resolver )
static

Definition at line 248 of file docparser.cpp.

References DocUtilities::cmdHash, name, no, s_quoting, and s_tabSize.

Referenced by Doc::initialize().

+ Here is the caller graph for this function:

◆ parse()

void DocParser::parse ( const QString & source,
DocPrivate * docPrivate,
const QSet< QString > & metaCommandSet,
const QSet< QString > & possibleTopics )

Parse the source string to build a Text data structure in docPrivate.

The Text data structure is a linked list of Atoms.

metaCommandSet is the set of metacommands that may be found in source. These metacommands are not markup text commands. They are topic commands and related metacommands.

Definition at line 283 of file docparser.cpp.

References Atom::AutoLink, Atom::BR, Atom::C, Atom::chopString(), CMD_ANNOTATEDLIST, CMD_BADCODE, CMD_BOLD, CMD_BRIEF, CMD_CAPTION, CMD_CODE, CMD_CODELINE, CMD_COMPARESWITH, CMD_DETAILS, CMD_DIV, CMD_DOTS, CMD_ELSE, CMD_ENDCODE, CMD_ENDCOMPARESWITH, CMD_ENDDETAILS, CMD_ENDDIV, CMD_ENDFOOTNOTE, CMD_ENDIF, CMD_ENDLEGALESE, CMD_ENDLINK, CMD_ENDLIST, CMD_ENDOMIT, CMD_ENDQML, CMD_ENDQUOTATION, CMD_ENDRAW, CMD_ENDSECTION1, CMD_ENDSECTION2, CMD_ENDSECTION3, CMD_ENDSECTION4, CMD_ENDSIDEBAR, CMD_ENDTABLE, CMD_FOOTNOTE, CMD_GENERATELIST, CMD_HEADER, CMD_HR, CMD_I, CMD_IMAGE, CMD_IMPORTANT, CMD_INCLUDE, CMD_INDEX, CMD_INPUT, CMD_KEYWORD, CMD_LEGALESE, CMD_LI, CMD_LINK, CMD_LIST, CMD_META, CMD_NOTE, CMD_O, CMD_OMITVALUE, CMD_OVERLOAD, CMD_PRINTLINE, CMD_PRINTTO, CMD_PRINTUNTIL, CMD_QML, CMD_QUOTATION, CMD_QUOTEFILE, CMD_QUOTEFROMFILE, CMD_RAW, CMD_ROW, CMD_SA, CMD_SECTION1, CMD_SECTION2, CMD_SECTION3, CMD_SECTION4, CMD_SIDEBAR, CMD_SINCELIST, CMD_SKIPLINE, CMD_SKIPTO, CMD_SKIPUNTIL, CMD_SNIPPET, CMD_TABLE, CMD_TABLEOFCONTENTS, CMD_TARGET, CMD_UNICODE, CMD_VALUE, CMD_WARNING, DocUtilities::cmdHash, Atom::CodeQuoteArgument, Atom::CodeQuoteCommand, Atom::ComparesLeft, Atom::ComparesRight, DocPrivate::constructExtra(), Atom::DetailsRight, Atom::DivLeft, Atom::DivRight, Atom::FootnoteLeft, Atom::FootnoteRight, Atom::FormatElse, Atom::FormatEndif, Atom::FormatIf, Atom::FormattingLeft, Atom::FormattingRight, Atom::HR, Text::lastAtom(), Atom::LegaleseLeft, Atom::LegaleseRight, Atom::Link, Atom::ListItemLeft, Atom::ListTagLeft, Atom::ListTagRight, DocPrivate::m_hasLegalese, DocPrivate::m_text, DocPrivate::m_topics, DocUtilities::macroHash, Atom::Nop, Doc::NoSection, NOT_A_CMD, Atom::ParaLeft, Atom::ParaRight, processComparesWithCommand(), Atom::QuotationLeft, Atom::QuotationRight, s_quoting, Doc::Section1, Doc::Section2, Doc::Section3, Doc::Section4, Atom::SidebarLeft, Atom::SidebarRight, Atom::SinceTagLeft, Atom::SinceTagRight, Atom::SnippetCommand, Atom::SnippetIdentifier, Atom::SnippetLocation, Atom::String, Text::stripFirstAtom(), Atom::TableHeaderLeft, Atom::TableItemRight, Atom::TableOfContents, Atom::TableRight, Atom::TableRowLeft, Atom::type(), and Atom::UnknownCommand.

+ Here is the call graph for this function:

◆ untabifyEtc()

QString DocParser::untabifyEtc ( const QString & str)
static

Definition at line 2644 of file docparser.cpp.

Member Data Documentation

◆ s_ignoreWords

QStringList DocParser::s_ignoreWords
static

Definition at line 43 of file docparser.h.

◆ s_quoting

bool DocParser::s_quoting = false
static

Definition at line 44 of file docparser.h.

Referenced by initialize(), and parse().

◆ s_tabSize

int DocParser::s_tabSize
static

Definition at line 42 of file docparser.h.

Referenced by initialize().


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