MD::Anchor Class

class MD::Anchor

Just an anchor. More...

Header: #include <md4qt/doc.h>
CMake: find_package(md4qt REQUIRED COMPONENTS md4qt)
target_link_libraries(mytarget PRIVATE md4qt::md4qt)
Inherits: MD::Item

Public Functions

Anchor(const QString &l)
const QString &label() const

Reimplemented Public Functions

virtual QSharedPointer<MD::Item> clone(MD::Document *doc = nullptr) const override
virtual MD::ItemType type() const override

Detailed Description

This library supports recursive Markdown parsing - parsed Markdown file may has links to other Markdown files, that may be parsed recursively with the root file. So in the resulting document can be represented more than one Markdown file. Each file in the document starts with MD::Anchor, it just shows that during traversing through the document you reached new file.

Member Function Documentation

[explicit] Anchor::Anchor(const QString &l)

Initializing constructor.

l Label.

[override virtual] QSharedPointer<MD::Item> Anchor::clone(MD::Document *doc = nullptr) const

Reimplements: Item::clone(MD::Document *doc) const.

Clone this anchor.

doc Parent of new item.

const QString &Anchor::label() const

Returns label of this anchor.

[override virtual] MD::ItemType Anchor::type() const

Reimplements: Item::type() const.

Returns item type.