MD::Block

Search for usage in LXR

MD::Block< Trait > Class Template Reference

#include <doc.h>

Inheritance diagram for MD::Block< Trait >:

Public Types

using Items = typename Trait::template Vector<ItemSharedPointer>
 
using ItemSharedPointer = std::shared_ptr<Item<Trait>>
 

Public Member Functions

 ~Block () override=default
 
void appendItem (ItemSharedPointer i)
 
void applyBlock (const Block< Trait > &other, Document< Trait > *doc=nullptr)
 
ItemSharedPointer getItemAt (long long int idx) const
 
void insertItem (long long int idx, ItemSharedPointer i)
 
bool isEmpty () const
 
const Itemsitems () const
 
void removeItemAt (long long int idx)
 
- Public Member Functions inherited from MD::Item< Trait >
 ~Item () override=default
 
virtual std::shared_ptr< Item< Trait > > clone (Document< Trait > *doc=nullptr) const =0
 
virtual ItemType type () const =0
 
- 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
 

Protected Member Functions

 Block ()=default
 
- Protected Member Functions inherited from MD::Item< Trait >
 Item ()=default
 

Detailed Description

template<class Trait>
class MD::Block< Trait >

Abstract block (storage of child items).

Definition at line 603 of file doc.h.

Member Typedef Documentation

◆ Items

template<class Trait>
using MD::Block< Trait >::Items = typename Trait::template Vector<ItemSharedPointer>

Type of list of children.

Definition at line 614 of file doc.h.

◆ ItemSharedPointer

template<class Trait>
using MD::Block< Trait >::ItemSharedPointer = std::shared_ptr<Item<Trait>>

Type of pointer to child item.

Definition at line 612 of file doc.h.

Constructor & Destructor Documentation

◆ Block()

template<class Trait>
MD::Block< Trait >::Block ( )
protecteddefault

◆ ~Block()

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

Member Function Documentation

◆ appendItem()

template<class Trait>
void MD::Block< Trait >::appendItem ( ItemSharedPointer i)
inline

Append child item.

Definition at line 642 of file doc.h.

◆ applyBlock()

template<class Trait>
void MD::Block< Trait >::applyBlock ( const Block< Trait > & other,
Document< Trait > * doc = nullptr )
inline

Apply other block to this.

Definition at line 617 of file doc.h.

◆ getItemAt()

template<class Trait>
ItemSharedPointer MD::Block< Trait >::getItemAt ( long long int idx) const
inline
Returns
Child item at the given position.

Definition at line 655 of file doc.h.

◆ insertItem()

template<class Trait>
void MD::Block< Trait >::insertItem ( long long int idx,
ItemSharedPointer i )
inline

Insert child item at give position.

Definition at line 636 of file doc.h.

◆ isEmpty()

template<class Trait>
bool MD::Block< Trait >::isEmpty ( ) const
inline
Returns
Is there no children.

Definition at line 661 of file doc.h.

◆ items()

template<class Trait>
const Items & MD::Block< Trait >::items ( ) const
inline
Returns
List of child items.

Definition at line 630 of file doc.h.

◆ removeItemAt()

template<class Trait>
void MD::Block< Trait >::removeItemAt ( long long int idx)
inline

Remove child item at the given position.

Definition at line 648 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-2025 The KDE developers.
Generated on Fri Feb 28 2025 11:48:49 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.