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 (const QString &text) override
 Resolves the parameters that were enclosed in square brackets, supplied as text, setting the domain and genus to appropriate values.
virtual int flags () const override
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

Genus m_genus {}
Treem_domain {}
QStringList 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 , TitleLeft ,
  TitleRight , 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 173 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 392 of file atom.cpp.

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

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 439 of file atom.cpp.

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

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 454 of file atom.cpp.

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

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 186 of file atom.h.

References m_domain.

◆ flags()

int LinkAtom::flags ( ) const
overridevirtual

Reimplemented from Atom.

Definition at line 464 of file atom.cpp.

References QmlAttachedProperties.

◆ genus()

Genus LinkAtom::genus ( )
inlineoverridevirtual

Reimplemented from Atom.

Definition at line 182 of file atom.h.

References m_genus.

◆ isLinkAtom()

bool LinkAtom::isLinkAtom ( ) const
inlinenodiscardoverridevirtual

Reimplemented from Atom.

Definition at line 181 of file atom.h.

◆ resolveSquareBracketParams()

void LinkAtom::resolveSquareBracketParams ( const QString & text)
overridevirtual

Resolves the parameters that were enclosed in square brackets, supplied as text, setting the domain and genus to appropriate values.

Reimplemented from Atom.

Definition at line 405 of file atom.cpp.

Member Data Documentation

◆ location

Location LinkAtom::location

Definition at line 194 of file atom.h.

◆ m_domain

Tree* LinkAtom::m_domain {}
protected

Definition at line 198 of file atom.h.

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

◆ m_genus

Genus LinkAtom::m_genus {}
protected

Definition at line 197 of file atom.h.

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

◆ m_squareBracketParams

QStringList LinkAtom::m_squareBracketParams {}
protected

Definition at line 199 of file atom.h.


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