MD::Item Class
template <typename Trait> class MD::ItemBase class for item in Markdown document. More...
Header: | #include <md4qt/doc.h> |
CMake: | find_package(md4qt REQUIRED COMPONENTS md4qt) target_link_libraries(mytarget PRIVATE md4qt::md4qt) |
Inherits: | MD::WithPosition |
Inherited By: | MD::Anchor, MD::Block, MD::Heading, MD::HorizontalLine, MD::ItemWithOpts, MD::PageBreak, MD::Table, and MD::TableRow |
Public Functions
virtual std::shared_ptr<MD::Item<Trait>> | clone(MD::Document<Trait> *doc = nullptr) const = 0 |
virtual MD::ItemType | type() const = 0 |
Detailed Description
All items in MD::Document derived from this class. Main thing that this class does is a virtual method MD::Item::type that return type of the item, so when working with MD::Document a developer can know what type of item he has a pointer to.
Member Function Documentation
[pure virtual]
std::shared_ptr<MD::Item<Trait>> Item::clone(MD::Document<Trait> *doc = nullptr) const
Clone this item.
doc Parent of new item.
[pure virtual]
MD::ItemType Item::type() const
Returns type of the item.