Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
The Atom class is the fundamental unit for representing documents internally. More...
#include <atom.h>
Public Types | |
enum | AtomType { AnnotatedList , AutoLink , BaseName , BR , BriefLeft , BriefRight , C , CaptionLeft , CaptionRight , Code , CodeBad , CodeQuoteArgument , CodeQuoteCommand , ComparesLeft , ComparesRight , DetailsLeft , DetailsRight , DivLeft , DivRight , ExampleFileLink , ExampleImageLink , FootnoteLeft , FootnoteRight , FormatElse , FormatEndif , FormatIf , FormattingLeft , FormattingRight , GeneratedList , HR , Image , ImageText , ImportantLeft , ImportantRight , InlineImage , Keyword , LegaleseLeft , LegaleseRight , LineBreak , Link , LinkNode , ListLeft , ListItemNumber , ListTagLeft , ListTagRight , ListItemLeft , ListItemRight , ListRight , NavAutoLink , NavLink , Nop , NoteLeft , NoteRight , ParaLeft , ParaRight , Qml , QuotationLeft , QuotationRight , RawString , SectionLeft , SectionRight , SectionHeadingLeft , SectionHeadingRight , SidebarLeft , SidebarRight , SinceList , SinceTagLeft , SinceTagRight , SnippetCommand , SnippetIdentifier , SnippetLocation , String , TableLeft , TableRight , TableHeaderLeft , TableHeaderRight , TableRowLeft , TableRowRight , TableItemLeft , TableItemRight , TableOfContents , Target , UnhandledFormat , WarningLeft , WarningRight , UnknownCommand , Last = UnknownCommand } |
\value AnnotatedList \value AutoLink \value BaseName \value BriefLeft \value BriefRight \value C \value CaptionLeft \value CaptionRight \value Code \value CodeBad \value CodeQuoteArgument \value CodeQuoteCommand \value DetailsLeft \value DetailsRight \value DivLeft \value DivRight \value ExampleFileLink \value ExampleImageLink \value FormatElse \value FormatEndif \value FormatIf \value FootnoteLeft \value FootnoteRight \value FormattingLeft \value FormattingRight \value GeneratedList \value Image \value ImageText \value ImportantNote \value InlineImage \value Keyword \value LineBreak \value Link \value LinkNode \value ListLeft \value ListItemNumber \value ListTagLeft \value ListTagRight \value ListItemLeft \value ListItemRight \value ListRight \value NavAutoLink \value NavLink \value Nop \value Note \value ParaLeft \value ParaRight \value Qml \value QuotationLeft \value QuotationRight \value RawString \value SectionLeft \value SectionRight \value SectionHeadingLeft \value SectionHeadingRight \value SidebarLeft \value SidebarRight \value SinceList \value SinceTagLeft \value SinceTagRight \value String \value TableLeft \value TableRight \value TableHeaderLeft \value TableHeaderRight \value TableRowLeft \value TableRowRight \value TableItemLeft \value TableItemRight \value TableOfContents \value Target \value UnhandledFormat \value UnknownCommand More... | |
Public Member Functions | |
Atom (AtomType type, const QString &string="") | |
Constructs an atom of the specified type with the single parameter string and does not put the new atom in a list. | |
Atom (AtomType type, const QString &p1, const QString &p2) | |
Constructs an atom of the specified type with the two parameters p1 and p2 and does not put the new atom in a list. | |
Atom (Atom *previous, AtomType type, const QString &string) | |
Atom (Atom *previous, AtomType type, const QString &p1, const QString &p2) | |
Constructs an atom of the specified type with the two parameters p1 and p2 and inserts the new atom into the list after the previous atom. | |
virtual | ~Atom ()=default |
void | appendChar (QChar ch) |
Appends ch to the string parameter of this atom. | |
void | concatenateString (const QString &string) |
Appends string to the string parameter of this atom. | |
void | append (const QString &string) |
void | chopString () |
\also string() | |
void | setString (const QString &string) |
Atom * | next () |
Return the next atom in the atom list. | |
void | setNext (Atom *newNext) |
const Atom * | find (AtomType t) const |
Starting from this Atom, searches the linked list for the atom of specified type t and returns it. | |
const Atom * | find (AtomType t, const QString &s) const |
Starting from this Atom, searches the linked list for the atom of specified type t and string s, and returns it. | |
const Atom * | next () const |
Return the next atom in the atom list. | |
const Atom * | next (AtomType t) const |
Return the next Atom in the list if it is of AtomType t. | |
const Atom * | next (AtomType t, const QString &s) const |
Return the next Atom in the list if it is of AtomType t and its string part is s. | |
AtomType | type () const |
Return the type of this atom. | |
QString | typeString () const |
Return the type of this atom as a string. | |
const QString & | string () const |
Returns the string parameter that together with the type characterizes this atom. | |
const QString & | string (int i) const |
qsizetype | count () const |
QString | linkText () const |
For a link atom, returns the string representing the link text if one exist in the list of atoms. | |
const QStringList & | strings () const |
virtual bool | isLinkAtom () const |
virtual Node::Genus | genus () |
virtual Tree * | domain () |
virtual void | resolveSquareBracketParams () |
Protected Attributes | |
Atom * | m_next = nullptr |
AtomType | m_type {} |
QStringList | m_strs {} |
Friends | |
class | LinkAtom |
The Atom class is the fundamental unit for representing documents internally.
Atoms have a \i type and are completed by a \i string whose meaning depends on the \i type. For example, the string \quotation \i italic text looks nicer than \bold bold text \endquotation is represented by the following atoms: \quotation (FormattingLeft, ATOM_FORMATTING_ITALIC) (String, "italic") (FormattingRight, ATOM_FORMATTING_ITALIC) (String, " text is more attractive than ") (FormattingLeft, ATOM_FORMATTING_BOLD) (String, "bold") (FormattingRight, ATOM_FORMATTING_BOLD) (String, " text") \endquotation
\also Text
enum Atom::AtomType |
\value AnnotatedList \value AutoLink \value BaseName \value BriefLeft \value BriefRight \value C \value CaptionLeft \value CaptionRight \value Code \value CodeBad \value CodeQuoteArgument \value CodeQuoteCommand \value DetailsLeft \value DetailsRight \value DivLeft \value DivRight \value ExampleFileLink \value ExampleImageLink \value FormatElse \value FormatEndif \value FormatIf \value FootnoteLeft \value FootnoteRight \value FormattingLeft \value FormattingRight \value GeneratedList \value Image \value ImageText \value ImportantNote \value InlineImage \value Keyword \value LineBreak \value Link \value LinkNode \value ListLeft \value ListItemNumber \value ListTagLeft \value ListTagRight \value ListItemLeft \value ListItemRight \value ListRight \value NavAutoLink \value NavLink \value Nop \value Note \value ParaLeft \value ParaRight \value Qml \value QuotationLeft \value QuotationRight \value RawString \value SectionLeft \value SectionRight \value SectionHeadingLeft \value SectionHeadingRight \value SidebarLeft \value SidebarRight \value SinceList \value SinceTagLeft \value SinceTagRight \value String \value TableLeft \value TableRight \value TableHeaderLeft \value TableHeaderRight \value TableRowLeft \value TableRowRight \value TableItemLeft \value TableItemRight \value TableOfContents \value Target \value UnhandledFormat \value UnknownCommand
|
virtualdefault |
|
inline |
\also string()
Definition at line 139 of file atom.h.
Referenced by DocParser::parse().
|
inlinevirtual |
Reimplemented in LinkAtom.
Definition at line 159 of file atom.h.
Referenced by QDocDatabase::findNodeForAtom().
|
inlinevirtual |
Reimplemented in LinkAtom.
Definition at line 158 of file atom.h.
References Node< _Tp >::DontCare.
Referenced by QDocDatabase::findNodeForAtom().
|
inlinenodiscardvirtual |
Reimplemented in LinkAtom.
Definition at line 157 of file atom.h.
Referenced by QDocDatabase::findNodeForAtom(), and HtmlGenerator::generateAtom().
|
nodiscard |
|
inline |
Return the next atom in the atom list.
Definition at line 141 of file atom.h.
References m_next.
Referenced by Text::clear(), Text::splitAtFirst(), Text::stripFirstAtom(), and Text::stripLastAtom().
|
inlinenodiscard |
Return the next atom in the atom list.
Definition at line 146 of file atom.h.
References m_next.
Referenced by WebXMLGenerator::addAtomElements(), Text::compare(), Text::contains(), Text::dump(), find(), find(), DocBookGenerator::generateAtom(), HtmlGenerator::generateAtom(), Generator::generateAtomList(), XmlGenerator::getAtomListValue(), XmlGenerator::isOneColumnValueTable(), XmlGenerator::isThreeColumnEnumValueTable(), linkText(), Generator::matchAhead(), nextSection(), Text::operator<<(), Tree::refForAtom(), XmlGenerator::rewritePropertyBrief(), Text::sectionHeading(), Generator::skipAtoms(), Text::subText(), Text::subText(), Text::toString(), and Doc::trimmedBriefText().
|
inlinevirtual |
Definition at line 142 of file atom.h.
References m_next.
Referenced by Text::splitAtFirst(), and Text::stripLastAtom().
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
Return the type of this atom.
Definition at line 149 of file atom.h.
References m_type.
Referenced by WebXMLGenerator::addAtomElements(), Generator::appendTrademark(), Text::compare(), Text::contains(), find(), find(), DocBookGenerator::generateAtom(), HtmlGenerator::generateAtom(), Generator::generateAtomList(), XmlGenerator::getAtomListValue(), XmlGenerator::isOneColumnValueTable(), XmlGenerator::isThreeColumnEnumValueTable(), linkText(), Generator::matchAhead(), next(), next(), Text::operator<<(), DocParser::parse(), Tree::refForAtom(), XmlGenerator::rewritePropertyBrief(), Text::sectionHeading(), Generator::skipAtoms(), Text::splitAtFirst(), Text::subText(), Text::toString(), Doc::trimmedBriefText(), and typeString().
|
nodiscard |
|
protected |
|
protected |