MD::Code Class
template <typename Trait> class MD::CodeCode. More...
Header: | #include <md4qt/doc.h> |
CMake: | find_package(md4qt REQUIRED COMPONENTS md4qt) target_link_libraries(mytarget PRIVATE md4qt::md4qt) |
Inherits: | MD::ItemWithOpts |
Inherited By: |
Public Functions
void | applyCode(const MD::Code<Trait> &other) |
std::shared_ptr<MD::Item<Trait>> | clone(MD::Document<Trait> *doc = nullptr) const override |
const MD::WithPosition & | endDelim() const |
bool | isFensedCode() const |
bool | isInline() const |
void | setEndDelim(const MD::WithPosition &d) |
void | setFensedCode(bool on = true) |
void | setInline(bool on = true) |
void | setStartDelim(const MD::WithPosition &d) |
void | setSyntax(const typename Trait::String &s) |
void | setSyntaxPos(const MD::WithPosition &p) |
void | setText(const typename Trait::String &t) |
const MD::WithPosition & | startDelim() const |
const typename Trait::String & | syntax() const |
const MD::WithPosition & | syntaxPos() const |
const typename Trait::String & | text() const |
MD::ItemType | type() const override |
Detailed Description
Member Function Documentation
void Code::applyCode(const MD::Code<Trait> &other)
Apply other code to this.
other Value to apply.
std::shared_ptr<MD::Item<Trait>> Code::clone(MD::Document<Trait> *doc = nullptr) const
Clone this code.
doc Parent of new item.
const MD::WithPosition &Code::endDelim() const
Returns position of the ending service characters.
See also setEndDelim().
bool Code::isFensedCode() const
Returns whether this a fensed code block?
bool Code::isInline() const
Returns whether this code inline?
void Code::setEndDelim(const MD::WithPosition &d)
Set position of the ending service characters.
d New value.
See also endDelim().
void Code::setFensedCode(bool on = true)
Set this code block to be a fensed code block.
on New value.
See also isFensedCode().
void Code::setInline(bool on = true)
Set this code to be inline.
on New value.
See also isInline().
void Code::setStartDelim(const MD::WithPosition &d)
Set position of the start service characters.
d New value.
See also startDelim().
void Code::setSyntax(const typename Trait::String &s)
Set syntax of the fensed code block.
s New value.
See also syntax().
void Code::setSyntaxPos(const MD::WithPosition &p)
Set position of the syntax of the fensed code block.
p New value.
See also syntaxPos().
void Code::setText(const typename Trait::String &t)
Set content of the code.
t New value.
See also text().
const MD::WithPosition &Code::startDelim() const
Returns position of the start service characters.
See also setStartDelim().
const typename Trait::String &Code::syntax() const
Returns syntax of the fensed code block.
See also setSyntax().
const MD::WithPosition &Code::syntaxPos() const
Returns position of the syntax of the fensed code block.
See also setSyntaxPos().
const typename Trait::String &Code::text() const
Returns content of the code.
See also setText().
MD::ItemType Code::type() const
Returns type of the item.