MD::Document Class
template <typename Trait> class MD::DocumentDocument. More...
Header: | #include <md4qt/doc.h> |
CMake: | find_package(md4qt REQUIRED COMPONENTS md4qt) target_link_libraries(mytarget PRIVATE md4qt::md4qt) |
Inherits: | MD::Block |
Public Types
Public Functions
std::shared_ptr<MD::Item<Trait>> | clone(MD::Document<Trait> *doc = nullptr) const override |
const MD::Document<Trait>::Footnotes & | footnotesMap() const |
void | insertFootnote(const typename Trait::String &id, MD::Document<Trait>::FootnoteSharedPointer fn) |
void | insertLabeledHeading(const typename Trait::String &label, MD::Document<Trait>::HeadingSharedPointer h) |
void | insertLabeledLink(const typename Trait::String &label, MD::Document<Trait>::LinkSharedPointer lnk) |
const MD::Document<Trait>::LabeledHeadings & | labeledHeadings() const |
const MD::Document<Trait>::LabeledLinks & | labeledLinks() const |
MD::ItemType | type() const override |
Detailed Description
Member Type Documentation
[alias]
Document::FootnoteSharedPointer
Type of a smart pointer to footnote.
[alias]
Document::Footnotes
Type of a map of footnotes.
[alias]
Document::HeadingSharedPointer
Type of a smart pointer to heading.
[alias]
Document::LabeledHeadings
Type of a map of headings.
[alias]
Document::LabeledLinks
Type of a map of shortcut links.
[alias]
Document::LinkSharedPointer
Type of a smart pointer to link.
Member Function Documentation
std::shared_ptr<MD::Item<Trait>> Document::clone(MD::Document<Trait> *doc = nullptr) const
Clone this document.
doc Parent of new item.
const MD::Document<Trait>::Footnotes &Document::footnotesMap() const
Returns map of footnotes.
void Document::insertFootnote(const typename Trait::String &id, MD::Document<Trait>::FootnoteSharedPointer fn)
Insert footnote with the give ID.
id ID.
fn Footnote.
void Document::insertLabeledHeading(const typename Trait::String &label, MD::Document<Trait>::HeadingSharedPointer h)
Insert heading with the given label.
label Label.
h Heading.
void Document::insertLabeledLink(const typename Trait::String &label, MD::Document<Trait>::LinkSharedPointer lnk)
Insert shortcut link with the given label.
label Label.
lnk Link.
const MD::Document<Trait>::LabeledHeadings &Document::labeledHeadings() const
Returns map of headings.
const MD::Document<Trait>::LabeledLinks &Document::labeledLinks() const
Returns map of shortcut links.
MD::ItemType Document::type() const
Returns type of the item.