MD::Code

Search for usage in LXR

MD::Code< Trait > Class Template Reference

#include <doc.h>

Inheritance diagram for MD::Code< Trait >:

Public Member Functions

 Code (const typename Trait::String &t, bool fensedCode, bool inl)
 
 ~Code () override=default
 
void applyCode (const Code< Trait > &other)
 
std::shared_ptr< Item< Trait > > clone (Document< Trait > *doc=nullptr) const override
 
const WithPositionendDelim () const
 
bool isFensedCode () const
 
bool isInline () const
 
void setEndDelim (const WithPosition &d)
 
void setFensedCode (bool on=true)
 
void setInline (bool on=true)
 
void setStartDelim (const WithPosition &d)
 
void setSyntax (const typename Trait::String &s)
 
void setSyntaxPos (const WithPosition &p)
 
void setText (const typename Trait::String &t)
 
const WithPositionstartDelim () const
 
const Trait::String & syntax () const
 
const WithPositionsyntaxPos () const
 
const Trait::String & text () const
 
ItemType type () const override
 
- Public Member Functions inherited from MD::ItemWithOpts< Trait >
 ~ItemWithOpts () override=default
 
void applyItemWithOpts (const ItemWithOpts< Trait > &other)
 
StylescloseStyles ()
 
const StylescloseStyles () const
 
StylesopenStyles ()
 
const StylesopenStyles () const
 
int opts () const
 
void setOpts (int o)
 
- Public Member Functions inherited from MD::Item< Trait >
 ~Item () override=default
 
- Public Member Functions inherited from MD::WithPosition
 WithPosition ()=default
 
 WithPosition (long long int startColumn, long long int startLine, long long int endColumn, long long int endLine)
 
virtual ~WithPosition ()=default
 
void applyPositions (const WithPosition &other)
 
long long int endColumn () const
 
long long int endLine () const
 
void setEndColumn (long long int c)
 
void setEndLine (long long int l)
 
void setStartColumn (long long int c)
 
void setStartLine (long long int l)
 
long long int startColumn () const
 
long long int startLine () const
 

Additional Inherited Members

- Public Types inherited from MD::ItemWithOpts< Trait >
using Styles = typename Trait::template Vector<StyleDelim>
 
- Protected Member Functions inherited from MD::ItemWithOpts< Trait >
 ItemWithOpts ()=default
 
- Protected Member Functions inherited from MD::Item< Trait >
 Item ()=default
 

Detailed Description

template<class Trait>
class MD::Code< Trait >

Code.

Definition at line 1268 of file doc.h.

Constructor & Destructor Documentation

◆ Code()

template<class Trait >
MD::Code< Trait >::Code ( const typename Trait::String & t,
bool fensedCode,
bool inl )
inlineexplicit

Definition at line 1271 of file doc.h.

◆ ~Code()

template<class Trait >
MD::Code< Trait >::~Code ( )
overridedefault

Member Function Documentation

◆ applyCode()

template<class Trait >
void MD::Code< Trait >::applyCode ( const Code< Trait > & other)
inline

Apply other code to this.

Definition at line 1282 of file doc.h.

◆ clone()

template<class Trait >
std::shared_ptr< Item< Trait > > MD::Code< Trait >::clone ( Document< Trait > * doc = nullptr) const
inlineoverridevirtual

Clone this code.

Implements MD::Item< Trait >.

Reimplemented in MD::Math< Trait >.

Definition at line 1297 of file doc.h.

◆ endDelim()

template<class Trait >
const WithPosition & MD::Code< Trait >::endDelim ( ) const
inline
Returns
Position of the ending service characters.

Definition at line 1374 of file doc.h.

◆ isFensedCode()

template<class Trait >
bool MD::Code< Trait >::isFensedCode ( ) const
inline
Returns
Is this a fensed code block?

Definition at line 1386 of file doc.h.

◆ isInline()

template<class Trait >
bool MD::Code< Trait >::isInline ( ) const
inline
Returns
Is this code inline?

Definition at line 1326 of file doc.h.

◆ setEndDelim()

template<class Trait >
void MD::Code< Trait >::setEndDelim ( const WithPosition & d)
inline

Set position of the ending service characters.

Definition at line 1380 of file doc.h.

◆ setFensedCode()

template<class Trait >
void MD::Code< Trait >::setFensedCode ( bool on = true)
inline

Set this code block to be a fensed code block.

Definition at line 1392 of file doc.h.

◆ setInline()

template<class Trait >
void MD::Code< Trait >::setInline ( bool on = true)
inline

Set this code to be inline.

Definition at line 1332 of file doc.h.

◆ setStartDelim()

template<class Trait >
void MD::Code< Trait >::setStartDelim ( const WithPosition & d)
inline

Set position of the start service characters.

Definition at line 1368 of file doc.h.

◆ setSyntax()

template<class Trait >
void MD::Code< Trait >::setSyntax ( const typename Trait::String & s)
inline

Set syntax of the fensed code block.

Definition at line 1344 of file doc.h.

◆ setSyntaxPos()

template<class Trait >
void MD::Code< Trait >::setSyntaxPos ( const WithPosition & p)
inline

Set position of the syntax of the fensed code block.

Definition at line 1356 of file doc.h.

◆ setText()

template<class Trait >
void MD::Code< Trait >::setText ( const typename Trait::String & t)
inline

Set content of the code.

Definition at line 1320 of file doc.h.

◆ startDelim()

template<class Trait >
const WithPosition & MD::Code< Trait >::startDelim ( ) const
inline
Returns
Position of the start service characters.

Definition at line 1362 of file doc.h.

◆ syntax()

template<class Trait >
const Trait::String & MD::Code< Trait >::syntax ( ) const
inline
Returns
Syntax of the fensed code block.

Definition at line 1338 of file doc.h.

◆ syntaxPos()

template<class Trait >
const WithPosition & MD::Code< Trait >::syntaxPos ( ) const
inline
Returns
Position of the syntax of the fensed code block.

Definition at line 1350 of file doc.h.

◆ text()

template<class Trait >
const Trait::String & MD::Code< Trait >::text ( ) const
inline
Returns
Content of the code.

Definition at line 1314 of file doc.h.

◆ type()

template<class Trait >
ItemType MD::Code< Trait >::type ( ) const
inlineoverridevirtual
Returns
Type of the item.

Implements MD::Item< Trait >.

Reimplemented in MD::Math< Trait >.

Definition at line 1308 of file doc.h.


The documentation for this class was generated from the following file:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:19:15 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.