MD::Item Class
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, MD::TableRow, and MD::YAMLHeader |
Public Types
Public Functions
| virtual Item::SharedPointer | clone(MD::Document *doc = nullptr) const = 0 |
| virtual MD::ItemType | type() const = 0 |
| virtual void | write(QTextStream &stream, MD::SerialiseHelper *helper) const = 0 |
| virtual void | writeStartOfLine(QTextStream &stream) const |
Protected Functions
| Item() |
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 Type Documentation
[alias] Item::SharedPointer
Type of smart pointer to item.
Member Function Documentation
[protected] Item::Item()
Default constructor.
[pure virtual] Item::SharedPointer Item::clone(MD::Document *doc = nullptr) const
Clone this item.
doc Parent of new item.
[pure virtual] MD::ItemType Item::type() const
Returns type of the item.
[pure virtual] void Item::write(QTextStream &stream, MD::SerialiseHelper *helper) const
Serialise item into Markdown.
stream Stream.
helper Serialisation helper.
[virtual] void Item::writeStartOfLine(QTextStream &stream) const
Serialise start of line
stream Stream.