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

#include <atom.h>

Inheritance diagram for LinkAtom:
Collaboration diagram for LinkAtom:

Public Member Functions

 LinkAtom (const QString &p1, const QString &p2, Location location=Location())
 The only constructor for LinkAtom.
 LinkAtom (const LinkAtom &t)
 Standard copy constructor of LinkAtom t.
 LinkAtom (Atom *previous, const LinkAtom &t)
 Special copy constructor of LinkAtom t, where where the new LinkAtom will not be the first one in the list.
 ~LinkAtom () override=default
bool isLinkAtom () const override
Genus genus () override
Treedomain () override
void resolveSquareBracketParams () override
 This function resolves the parameters that were enclosed in square brackets.
Public Member Functions inherited from Atom
 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)
Atomnext ()
 Return the next atom in the atom list.
void setNext (Atom *newNext)
const Atomfind (AtomType t, qsizetype *offset=nullptr) const
 Starting from this Atom, searches the linked list for the atom of specified type t and returns it.
const Atomfind (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 Atomnext () const
 Return the next atom in the atom list.
const Atomnext (AtomType t) const
 Return the next Atom in the list if it is of AtomType t.
const Atomnext (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 QStringstring () const
 Returns the string parameter that together with the type characterizes this atom.
const QStringstring (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 QStringListstrings () const

Public Attributes

Location location

Protected Attributes

bool m_resolved {}
Genus m_genus {}
Treem_domain {}
QString m_squareBracketParams {}
Protected Attributes inherited from Atom
Atomm_next = nullptr
AtomType m_type {}
QStringList m_strs {}

Additional Inherited Members

Public Types inherited from Atom
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 ,
  TableOfContentsLeft , TableOfContentsRight , 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 TableOfContentsLeft \value TableOfContentsRight \value Target \value UnhandledFormat \value UnknownCommand More...

Detailed Description

Definition at line 170 of file atom.h.

Constructor & Destructor Documentation

◆ LinkAtom() [1/3]

LinkAtom::LinkAtom ( const QString & p1,
const QString & p2,
Location location = Location() )

The only constructor for LinkAtom.

It creates an Atom of type Atom::Link. p1 being the link target. p2 is the parameters in square brackets. Normally there is just one word in the square brackets, but there can be up to three words separated by spaces. The constructor splits p2 on the space character.

Definition at line 390 of file atom.cpp.

References LinkAtom(), Atom::Link, m_domain, m_genus, and m_resolved.

Referenced by LinkAtom().

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

◆ LinkAtom() [2/3]

LinkAtom::LinkAtom ( const LinkAtom & t)

Standard copy constructor of LinkAtom t.

Definition at line 443 of file atom.cpp.

References LinkAtom(), Atom::Link, m_domain, m_genus, and m_resolved.

Referenced by LinkAtom(), and Text::operator<<().

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

◆ LinkAtom() [3/3]

LinkAtom::LinkAtom ( Atom * previous,
const LinkAtom & t )

Special copy constructor of LinkAtom t, where where the new LinkAtom will not be the first one in the list.

Definition at line 459 of file atom.cpp.

References LinkAtom(), Atom::Link, m_domain, m_genus, Atom::m_next, and m_resolved.

Referenced by LinkAtom(), and Text::operator<<().

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

◆ ~LinkAtom()

LinkAtom::~LinkAtom ( )
overridedefault

Member Function Documentation

◆ domain()

Tree * LinkAtom::domain ( )
inlineoverridevirtual

Reimplemented from Atom.

Definition at line 184 of file atom.h.

References m_domain, and resolveSquareBracketParams().

Here is the call graph for this function:

◆ genus()

Genus LinkAtom::genus ( )
inlineoverridevirtual

Reimplemented from Atom.

Definition at line 179 of file atom.h.

References m_genus, and resolveSquareBracketParams().

Here is the call graph for this function:

◆ isLinkAtom()

bool LinkAtom::isLinkAtom ( ) const
inlinenodiscardoverridevirtual

Reimplemented from Atom.

Definition at line 178 of file atom.h.

◆ resolveSquareBracketParams()

void LinkAtom::resolveSquareBracketParams ( )
overridevirtual

This function resolves the parameters that were enclosed in square brackets.

If the parameters have already been resolved, it does nothing and returns immediately.

Reimplemented from Atom.

Definition at line 406 of file atom.cpp.

References m_resolved.

Referenced by domain(), and genus().

Here is the caller graph for this function:

Member Data Documentation

◆ location

Location LinkAtom::location

Definition at line 192 of file atom.h.

◆ m_domain

Tree* LinkAtom::m_domain {}
protected

Definition at line 197 of file atom.h.

Referenced by LinkAtom(), LinkAtom(), LinkAtom(), and domain().

◆ m_genus

Genus LinkAtom::m_genus {}
protected

Definition at line 196 of file atom.h.

Referenced by LinkAtom(), LinkAtom(), LinkAtom(), and genus().

◆ m_resolved

bool LinkAtom::m_resolved {}
protected

Definition at line 195 of file atom.h.

Referenced by LinkAtom(), LinkAtom(), LinkAtom(), and resolveSquareBracketParams().

◆ m_squareBracketParams

QString LinkAtom::m_squareBracketParams {}
protected

Definition at line 198 of file atom.h.


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